addsnapshot
Use the addsnapshot command to save a version of a set of volumes.
Syntax
Parameters
- (Optional) Specifies the name or ID for the maximum of two storage pools for the new snapshots.
- (Optional) Specifies the name given to the new snapshot.
- (Optional) Prepare the snapshot by creating all the objects. The snapshot will not be populated until it is triggered.
- (Optional) Specifies the addition of the volume snapshots although there are already legacy FlashCopy mappings using the volume as a source.
- (Optional) Specifies the number of minutes to wait before removing the snapshot. This parameter cannot be specified together with the -safeguarded parameter.
- (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.
- (Optional) Specifies the name or ID of the volume group, the volumes within which the snapshots are to be added or triggered.
- (Optional) Specifies the names, IDs, or UIDs of the volumes to which snapshots are added.
- (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.
- (Optional) Specifies the snapshot ID of a previously prepared snapshot.
- (Optional) Specifies a snapshot as Safeguarded. This parameter must be specified together with the -retentiondays parameter.
- (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.
