cmdsnapgrp

Use the cmdsnapgrp command to run a specific action against a snapshot group that is in a FlashSystem/IBM® Spectrum Accelerate snapshot session.

A snapshot group is a grouping of snapshots of individual volumes in a consistency group at a specific point in time.

Syntax

Read syntax diagramSkip visual syntax diagramcmdsnapgrp-help-h-?-quiet-action deletedisbandduplicatelockoverwriterenamerestoreset_priorityunlock -groupsnapshot_group_name -restorefromsnapshot_group_name-priority 1234-newnamesnapshot_group_namesession_name -

Parameters

-help | -h | -?
Lists help for the command. If you specify additional parameters and arguments, those parameters and arguments are ignored.
-quiet
Suppresses the confirmation prompt for this command. This flag answers yes to all confirmation prompts.
-action action_type
Specifies the action that you want to complete for a snapshot group in a session. The valid values are:
delete
Deletes the snapshot group and all the individual snapshots that are in the group from the session and from FlashSystem/IBM Spectrum® Accelerate.
If the deleted snapshot group is the last snapshot group that is associated with the session, the session returns to the Defined state.
disband
Disbands the snapshot group. When a snapshot group is disbanded, the snapshot group no longer exists. All snapshots in the snapshot group become individual snapshots that are no longer associated to the consistency group or the session.
After a snapshot group is disbanded, it is no longer shown in or managed by the copy services management server. If the disbanded snapshot group is the last snapshot group that is associated with the session, the session returns to the Defined state.
duplicate
Duplicates the snapshot group. When a snapshot group is duplicated, a new snapshot group is created with new snapshots for all volumes that are in the duplicated group. A name for the duplicated snapshot group is generated automatically by FlashSystem/IBM Spectrum Accelerate.
lock
Locks a snapshot group. If the snapshot group is locked, write operations to the snapshots within the snapshot group are prevented. By default, a snapshot group is locked when it is created.
This action is valid only if the snapshot group is unlocked.
overwrite
Overwrites the snapshot group to reflect the data that is on the master volume.
rename
Renames the snapshot group.
To specify the new name, use the -newname parameter.
restore
Restores the contents of a snapshot group by using another snapshot group in the session. Both of the snapshot groups must contain the same subset of volumes.
To specify the snapshot group from which you want to restore, use the -restorefrom parameter.
set_priority
Sets the priority in which a snapshot group is deleted. The value is the number 1 - 4. A value of 1 specifies that the snapshot group is deleted last. A value of 4 specifies that the snapshot group is deleted first.
To set the deletion priority, use the -priority parameter.
unlock
Unlocks a snapshot group. If the snapshot group is unlocked, write operations to the snapshots within the snapshot group are enabled and the snapshot group is shown as modified if you run the lssnapgrp command.
This action is valid only if the snapshot group is locked.
-group snapshot_group_name
Specifies the name of the snapshot group that you want to run the action against.
-restorefrom snapshot_group_name
Specifies the name of the snapshot group that you want to use to restore the snapshot group that is defined by the -group parameter.
This parameter is required if the -action parameter value is restore.
-priority { 1 | 2 | 3 | 4 }
Specifies the priority in which the snapshot group will be deleted from the session. The value is the number 1 - 4. A value of 1 specifies that the snapshot group is deleted last. A value of 4 specifies that the snapshot group is deleted first.
This parameter is required if the -action parameter value is set_prioirity.
-newname snapshot_group_name
Specifies the new name for the snapshot group.
This parameter is required if the -action parameter value is rename.
session_name | -

Specifies the name of the session that contains the snapshot group.

Alternatively, use the dash (-) to specify that input for this parameter comes from an input stream (stdin). The dash is supported only in single-shot mode.

Example: Deleting a snapshot group

The following command deletes the snapshot group snap1_002.snap_group_00018 in the session snap1.

csmcli> cmdsnapgrp -group snap1_002.snap_group_00018 -action delete -quiet snap1 

The following output is returned:

IWNR1322I The Delete command has completed for snapshot groups 
snap1_002.snap_group_00018 in session snap1.

Example: Disbanding a snapshot group

The following command disbands the snapshot group snap1_002.snap_group_00017 in the session snap1.

csmcli> cmdsnapgrp -group snap1_002.snap_group_00017 -action disband -quiet snap1 

The following output is returned:

IWNR1322I The Disband command has completed for snapshot groups 
snap1_002.snap_group_00017 in session snap1.

Example: Duplicating a snapshot group

The following command duplicates the snapshot group snap1_002.snap_group_0001 in the session snap1.

csmcli> cmdsnapgrp -group snap1_002.snap_group_0001 -action duplicate -quiet snap1

The following output is returned:

IWNR1322I The Duplicate command has completed for snapshot groups 
snap1_002.snap_group_0001 in session snap1.

Example: Locking a snapshot group

The following command locks the snapshot group snap1_002.snap_group_0001 in the session snap1.

csmcli> cmdsnapgrp -group snap1_002.snap_group_0001 -action lock -quiet snap1

The following output is returned:

IWNR1322I The Lock command has completed for snapshot groups 
snap1_002.snap_group_0001 in session snap1.

Example: Overwriting a snapshot group

The following command overwrites the snapshot group snap1_002.snap_group_0001 in the session snap1.

csmcli> cmdsnapgrp -group snap1_002.snap_group_0001 -action overwrite -quiet snap1 

The following output is returned:

IWNR1322I The Overwrite command has completed for snapshot groups 
snap1_002.snap_group_0001 in session snap1.

Example: Renaming a snapshot group

The following command renames the snapshot group snap1_002.snap_group_00016 to snapgroup1 in the session snap1.

csmcli> cmdsnapgrp -group snap1_002.snap_group_00016 -action rename 
-newname snapgroup1 -quiet snap1

The following output is returned:

IWNR1326I The snapshot group snap1_002.snap_group_00016 in session 
snap1 was renamed to snapgroup1.

Example: Restoring a snapshot group

The following command restores the snapshot group snap1_002.snap_group_0001 from snap1_002.snap_group_00017 in the session snap1.

csmcli> cmdsnapgrp -group snap1_002.snap_group_0001 -action restore 
-restorefrom snap1_002.snap_group_00017 -quiet snap1 

The following output is returned:

IWNR1325I The snapshot group snap1_002.snap_group_0001 in session 
snap1 was restored from snapshot group snap1_002.snap_group_00017.

Example: Setting the deletion priority for a snapshot group

The following command sets a deletion priority of 4 for the snapshot group snap1_002.snap_group_0001 in the session snap1.

csmcli> cmdsnapgrp -group snap1_002.snap_group_0001 -action set_priority -priority 4 
-quiet snap1

The following output is returned:

IWNR1324I The deletion priority for snapshot groups 
snap1_002.snap_group_0001 in session snap1 was set to 4.

Example: Unlocking a snapshot group

The following command unlocks the snapshot group snap1_002.snap_group_0001 in the session snap1.

csmcli> cmdsnapgrp -group snap1_002.snap_group_0001 -action unlock -quiet snap1 

The following output is returned:

IWNR1322I The Unlock command has completed for snapshot groups 
snap1_002.snap_group_0001 in session snap1.