addsnapshot

Use the addsnapshot command to save a version of a set of volumes.

Syntax

Add snapshot to a volumegroup

Read syntax diagramSkip visual syntax diagram addsnapshot -volumegroupvolumegroup_idvolumegroup_namevolumegroup_uuid-retentiondaysdays-safeguarded-retentiondaysdays-retentionminutesminutes-namename-poolid_listname_list-prepare-ignorelegacy

Add snapshot to a list of volumes

Read syntax diagramSkip visual syntax diagram addsnapshot -volumeslist_of_volume_idslist_of_volume_nameslist_of_volume_uids-poolid_listname_list-namename-prepare-ignorelegacy-safeguarded-retentiondaysdays-retentionminutes minutes-retentiondays days

Trigger a snapshot using the snapshot name and parentuid

Read syntax diagramSkip visual syntax diagram addsnapshot -triggername_of_snapshot_to_trigger-parentuidid

Trigger a snapshot of a volumegroup

Read syntax diagramSkip visual syntax diagram addsnapshot -triggername_of_snapshot_to_trigger-volumegroupvolumegroup_id_or_nameoor volumegroup_uuid

Trigger a snapshot using a snapshot ID

Read syntax diagramSkip visual syntax diagram addsnapshot -triggeridsnapshot_id

Parameters

-pool id_list | name_list
(Optional) Specifies the name or ID for the maximum of two storage pools for the new snapshots.
-name name
(Optional) Specifies the name given to the new snapshot.
-prepare
(Optional) Prepare the snapshot by creating all the objects. The snapshot will not be populated until it is triggered.
-ignorelegacy
(Optional) Specifies the addition of the volume snapshots although there are already legacy FlashCopy mappings using the volume as a source.
-retentionminutes
(Optional) Specifies the number of minutes to wait before removing the snapshot. This parameter cannot be specified together with the -safeguarded parameter.
Note: If a snapshot is created using the -retentionminutes parameter then the system will automatically remove the snapshot after the specified number of minutes has passed. A snapshot that is being used at that time to populate a clone or restore operation will not be immediately deleted, but will instead move to the dependent_deleting state. A snapshot that is not being used will be removed immediately.
-trigger name
(Optional) Specifies the name of a previously prepared snapshot. This parameter must be specified together with either the volume group ID or the parent UID.
-volumegroup volumegroup_id_or_nameor volumegroup_uuid
(Optional) Specifies the name or ID of the volume group, the volumes within which the snapshots are to be added or triggered.
-volumes list_of_volume_ids_or_names_or_volume_uids
(Optional) Specifies the names, IDs, or UIDs of the volumes to which snapshots are added.
-parentuid id
(Optional) Specifies the UID identifying the parent volumes of the snapshot to be triggered. This parameter enables the user to identify a prepared snapshot which does not have a volume group.
-triggerid snapshot_id
(Optional) Specifies the snapshot ID of a previously prepared snapshot.
-safeguarded
(Optional) Specifies a snapshot as Safeguarded. This parameter must be specified together with the -retentiondays parameter.
-retentiondays days
(Optional) Specifies a retention period in days. The value must be a number 1 - 365.
Note:
Highly available snapshot creation supports the following parameters:
  • name
  • volumegroup
  • safeguarded
  • retentiondays
  • retentionminutes
Note: This command is available during the upgrade process.
Note: Volume group snapshot is not permitted for a default volume group.
When using the partition IP address to run this command, consider the following:
  • The user must identify objects using the name or UUID. Short IDs cannot be specified when using the partition IP address.
  • Only objects belonging to the partition can be created or acted upon. When creating new objects, the -partition parameter will be auto-populated for the partition. You cannot move items out of a partition when using the partition IP address.

Invocation example: add snapshot to a volumegroup

addsnapshot -volumegroup volumegroup12

The resulting output:

Snapshot, id [1], successfully created or triggered

Invocation example: adding a snapshot to a list of volumes

addsnapshot -volumes volume0:volume1:volume2:volume3

The resulting output:

Snapshot, id [1], successfully created or triggered

Invocation example: add a snapshot called noon_snapshot to a volumegroup

addsnapshot -name noon_snapshot -volumegroup volumegroup12

The resulting output:

Snapshot, id [2], successfully created or triggered

Invocation example: create a prepared snapshot

addsnapshot -prepare -pool child -name noon_snapshot -volumegroup volumegroup12

The resulting output:

Snapshot, id [1519], successfully created or triggered

Invocation example: trigger the snapshot using the snapshot name

addsnapshot -trigger noon_snapshot -volumegroup volumegroup12

The resulting output:

Snapshot, id [1519], successfully created or triggered

Invocation example: create a prepared snapshot of a list of volumes

addsnapshot -prepare -name snap1 -volumes vol1:vol2:vol3

The resulting output:

Snapshot, id [1520], successfully created or triggered.

Invocation example: trigger the snapshot of a list of volumes

addsnapshot -trigger snap1 -parentuid 22000

The resulting output:

Snapshot, id [1520], successfully created or triggered.

Invocation example: trigger a snapshot using a snapshot id

addsnapshot -triggerid 1520

The resulting output:

Snapshot, id [1520], successfully created or triggered.

An invocation example to create a Safeguarded snapshot with an expiration of 10 days

addsnapshot -volumegroup 0  -safeguarded -retentiondays 10

The following output is displayed:

Snapshot, id [0], successfully created or triggered.

Invocation example: create a snapshot with a retention period of 5 minutes

svctask addsnapshot -retentionminutes 5 -volumegroup volumegroup12

The following output is displayed:

Snapshot, id [1], successfully created or triggered.

Invocation example: create a prepared snapshot of a list of volumes with a retention period of 3 minutes

svctask addsnapshot -prepare -retentionminutes 3 -volumes 1:4

The following output is displayed:

Snapshot, id [8], successfully created or triggered.