RollbackToGroupSnapshot

You can use RollbackToGroupSnapshot to roll back all individual volumes in a snapshot group to each volume's individual snapshot.

Rolling back to a group snapshot creates a temporary snapshot of each volume within the group snapshot.
Note: Creating a snapshot is allowed if cluster fullness is at stage 1, 2, or 3. Snapshots are not created when cluster fullness is at stage 4 or 5.

Parameters

This method has the following input parameters:

Name Description Type Default value Required
groupSnapshotID Unique ID of the group snapshot. integer None Yes
attributes List of name-value pairs in JSON object format. JSON object None No
name Name for the group snapshot of the volume's current state that is created if saveCurrentState is set to true. If you do not give a name, then the name of the snapshots (group and individual volume) are set to a timestamp of the time that the rollback occurred. string None No
saveCurrentState Specifies whether to save previous active volume image or not. Valid values:
  • true: The previous active volume image is kept.
  • false: The previous active volume image is deleted.
boolean false No

Return values

This method has the following return values:

Name Description Type
members An array containing volumeIDs and snapshotIDs of members of the group snapshot. Values:
  • checksum: A small string representation of the data in the stored snapshot. This checksum can be used later to compare other snapshots to detect errors in the data. (string)
  • snapshotID: Unique ID of a snapshot from which the new snapshot is made. The snapshotID must be a snapshot on the given volume. (integer)
  • volumeID: The source volume ID for the snapshot. (integer)
JSON object array
groupSnapshotID

If saveCurrentState was set to false, this value is null.

If saveCurrentState was set to true, the unique ID of the newly created group snapshot.

integer
groupSnapshot

If saveCurrentState was set to false, this value is null.

If saveCurrentState was set to true, an object containing information about the group snapshot which RollbackToGroupSnapshot just rolled back to.

groupSnapshot

Request example

Requests for this method are similar to the following example:

{
  "id": 438,
  "method": "RollbackToGroupSnapshot",
  "params": {
    "groupSnapshotID": 1,
    "name": "grpsnap1",
    "saveCurrentState": true
  }
}

Response example

This method returns a response similar to the following example:

{
  "id": 438,
  "result": {
    "groupSnapshot": {
      "attributes": {},
      "createTime": "2016-04-06T17:27:17Z",
      "groupSnapshotID": 1,
      "groupSnapshotUUID": "468fe181-0002-4b1d-ae7f-8b2a5c171eee",
      "members": [
        {
          "attributes": {},
          "checksum": "0x0",
          "createTime": "2016-04-06T17:27:17Z",
          "enableRemoteReplication": false,
          "expirationReason": "None",
          "expirationTime": null,
          "groupID": 1,
          "groupSnapshotUUID": "468fe181-0002-4b1d-ae7f-8b2a5c171eee",
          "name": "2016-04-06T17:27:17Z",
          "snapshotID": 4,
          "snapshotUUID": "03563c5e-51c4-4e3b-a256-a4d0e6b7959d",
          "status": "done",
          "totalSize": 1000341504,
          "virtualVolumeID": null,
          "volumeID": 2
        }
      ],
      "name": "2016-04-06T17:27:17Z",
      "status": "done"
    },
    "groupSnapshotID": 3,
    "members": [
      {
        "checksum": "0x0",
        "snapshotID": 2,
        "snapshotUUID": "719b162c-e170-4d80-b4c7-1282ed88f4e1",
        "volumeID": 2
      }
    ]
  }
}