Snapshot
Overview
A snapshot is a point-in-time capture of data status in a disk. Before you perform mission-critical operations, you can take snapshots for the data volume or root volume of a VM instance so that you can immediately roll back on failure. For long-term backup, we recommend that you use disaster recovery related services.
Inventory
Volume Snapshot Group Inventory
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| uuid | The UUID. For more information, see Resource Property. | 3.6.0 | ||
| name | The name. For more information, see Resource Property. | 3.6.0 | ||
| description | The description. For more information, see Resource Property. | Yes | 3.6.0 | |
| snapshotCount | The number of snapshots in a snapshot group. | 3.6.0 | ||
| vmInstanceUuid | The VM instance UUID. | 3.6.0 | ||
| volumeSnapshotRefs | 3.6.0 | |||
| groupBy | Groups rows into subgroups based on values of columns or expressions. This field is equivalent to the Group By clause in MySQL, such as groupBy=type. | Yes | 3.6.0 | |
| createDate | The creation date. For more information, see Resource Property. | 3.6.0 | ||
| lastOpDate | The last operation date. For more information, see Resource Property. | 3.6.0 | ||
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 3.6.0 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 3.6.0 |
Sample
{
"inventories": [
{
"createDate": "Sep 12, 2019 5:26:18 PM",
"description": "",
"lastOpDate": "Sep 12, 2019 5:26:18 PM",
"name": "Snapshot-4",
"snapshotCount": 2,
"uuid": "63854129e8aa42258aa83d0d9d45032c",
"vmInstanceUuid": "c0220ee607bf4afabc2a66532b0b0387",
"volumeSnapshotRefs": [
{
"createDate": "Sep 12, 2019 5:26:18 PM",
"deviceId": 1,
"lastOpDate": "Sep 12, 2019 5:26:18 PM",
"snapshotDeleted": false,
"volumeName": "Volume-1",
"volumeSnapshotGroupUuid": "63854129e8aa42258aa83d0d9d45032c",
"volumeSnapshotInstallPath": "/Cloud_ps/dataVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-1b746a6adb584ee89c65ab51c3634416/snapshots/2b47066db7c641019495204a39d00abb.qcow2",
"volumeSnapshotName": "Snapshot-4-Volume-1",
"volumeSnapshotUuid": "75c17cf55b2a4a70877e274d5c5ec77b",
"volumeType": "Data",
"volumeUuid": "1b746a6adb584ee89c65ab51c3634416"
},
{
"createDate": "Sep 12, 2019 5:26:18 PM",
"deviceId": 0,
"lastOpDate": "Sep 12, 2019 5:26:18 PM",
"snapshotDeleted": false,
"volumeName": "ROOT-for-VM-1",
"volumeSnapshotGroupUuid": "63854129e8aa42258aa83d0d9d45032c",
"volumeSnapshotInstallPath": "/Cloud_ps/rootVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-b2026ce722584b0383b247640e2961e2/snapshots/d0ea588f6c5d4e539a54ff4f64112e86.qcow2",
"volumeSnapshotName": "Snapshot-4-ROOT-for-VM-1",
"volumeSnapshotUuid": "6daba46d758445d4af7812738ba93e7d",
"volumeType": "Root",
"volumeUuid": "b2026ce722584b0383b247640e2961e2"
}
]
},
{
"createDate": "Sep 12, 2019 5:26:28 PM",
"description": "",
"lastOpDate": "Sep 12, 2019 5:26:28 PM",
"name": "Snapshot-5",
"snapshotCount": 2,
"uuid": "ce6bbd10e379472886e4d74448e43066",
"vmInstanceUuid": "c0220ee607bf4afabc2a66532b0b0387",
"volumeSnapshotRefs": [
{
"createDate": "Sep 12, 2019 5:26:28 PM",
"deviceId": 0,
"lastOpDate": "Sep 12, 2019 5:26:28 PM",
"snapshotDeleted": false,
"volumeName": "ROOT-for-VM-1",
"volumeSnapshotGroupUuid": "ce6bbd10e379472886e4d74448e43066",
"volumeSnapshotInstallPath": "/Cloud_ps/rootVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-b2026ce722584b0383b247640e2961e2/snapshots/6daba46d758445d4af7812738ba93e7d.qcow2",
"volumeSnapshotName": "Snapshot-5-ROOT-for-VM-1",
"volumeSnapshotUuid": "9eac8e8d51fc450d91e713bc4fdd20a2",
"volumeType": "Root",
"volumeUuid": "b2026ce722584b0383b247640e2961e2"
},
{
"createDate": "Sep 12, 2019 5:26:28 PM",
"deviceId": 1,
"lastOpDate": "Sep 12, 2019 5:26:28 PM",
"snapshotDeleted": false,
"volumeName": "Volume-1",
"volumeSnapshotGroupUuid": "ce6bbd10e379472886e4d74448e43066",
"volumeSnapshotInstallPath": "/Cloud_ps/dataVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-1b746a6adb584ee89c65ab51c3634416/snapshots/75c17cf55b2a4a70877e274d5c5ec77b.qcow2",
"volumeSnapshotName": "Snapshot-5-Volume-1",
"volumeSnapshotUuid": "88864416e95846f68b5e881cdca1eedf",
"volumeType": "Data",
"volumeUuid": "1b746a6adb584ee89c65ab51c3634416"
}
]
},
{
"createDate": "Sep 12, 2019 5:26:00 PM",
"description": "",
"lastOpDate": "Sep 12, 2019 5:26:00 PM",
"name": "Snapshot-2",
"snapshotCount": 2,
"uuid": "d6939afab0824cab8e9a57a25686a7d4",
"vmInstanceUuid": "c0220ee607bf4afabc2a66532b0b0387",
"volumeSnapshotRefs": [
{
"createDate": "Sep 12, 2019 5:26:00 PM",
"deviceId": 1,
"lastOpDate": "Sep 12, 2019 5:26:00 PM",
"snapshotDeleted": false,
"volumeName": "Volume-1",
"volumeSnapshotGroupUuid": "d6939afab0824cab8e9a57a25686a7d4",
"volumeSnapshotInstallPath": "/Cloud_ps/dataVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-1b746a6adb584ee89c65ab51c3634416/snapshots/d403f271636a488fbd25afd74ca589f8.qcow2",
"volumeSnapshotName": "Snapshot-2-Volume-1",
"volumeSnapshotUuid": "2b47066db7c641019495204a39d00abb",
"volumeType": "Data",
"volumeUuid": "1b746a6adb584ee89c65ab51c3634416"
},
{
"createDate": "Sep 12, 2019 5:26:00 PM",
"deviceId": 0,
"lastOpDate": "Sep 12, 2019 5:26:00 PM",
"snapshotDeleted": false,
"volumeName": "ROOT-for-VM-1",
"volumeSnapshotGroupUuid": "d6939afab0824cab8e9a57a25686a7d4",
"volumeSnapshotInstallPath": "/Cloud_ps/rootVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-b2026ce722584b0383b247640e2961e2/snapshots/ce2fe3b2faba4b32b1c2fadbd462cc6d.qcow2",
"volumeSnapshotName": "Snapshot-2-ROOT-for-VM-1",
"volumeSnapshotUuid": "400cabe156424e7282bb4606c40907dc",
"volumeType": "Root",
"volumeUuid": "b2026ce722584b0383b247640e2961e2"
}
]
},
{
"createDate": "Sep 12, 2019 5:25:40 PM",
"description": "",
"lastOpDate": "Sep 12, 2019 5:25:40 PM",
"name": "Snapshot-1",
"snapshotCount": 2,
"uuid": "e5bad705d61a424aa703578f86ce8522",
"vmInstanceUuid": "c0220ee607bf4afabc2a66532b0b0387",
"volumeSnapshotRefs": [
{
"createDate": "Sep 12, 2019 5:25:40 PM",
"deviceId": 1,
"lastOpDate": "Sep 12, 2019 5:25:40 PM",
"snapshotDeleted": false,
"volumeName": "Volume-1",
"volumeSnapshotGroupUuid": "e5bad705d61a424aa703578f86ce8522",
"volumeSnapshotInstallPath": "/Cloud_ps/dataVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-1b746a6adb584ee89c65ab51c3634416/1b746a6adb584ee89c65ab51c3634416.qcow2",
"volumeSnapshotName": "Snapshot-1-Volume-1",
"volumeSnapshotUuid": "d403f271636a488fbd25afd74ca589f8",
"volumeType": "Data",
"volumeUuid": "1b746a6adb584ee89c65ab51c3634416"
},
{
"createDate": "Sep 12, 2019 5:25:40 PM",
"deviceId": 0,
"lastOpDate": "Sep 12, 2019 5:25:40 PM",
"snapshotDeleted": false,
"volumeName": "ROOT-for-VM-1",
"volumeSnapshotGroupUuid": "e5bad705d61a424aa703578f86ce8522",
"volumeSnapshotInstallPath": "/Cloud_ps/rootVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-b2026ce722584b0383b247640e2961e2/b2026ce722584b0383b247640e2961e2.qcow2",
"volumeSnapshotName": "Snapshot-1-ROOT-for-VM-1",
"volumeSnapshotUuid": "ce2fe3b2faba4b32b1c2fadbd462cc6d",
"volumeType": "Root",
"volumeUuid": "b2026ce722584b0383b247640e2961e2"
}
]
}
],
"success": true
}Operations
CreateVolumeSnapshotGroup
Creates a snapshot group. For
example,
CreateVolumeSnapshotGroup rootVolumeUuid=901cae4fd9f43a1ca20da4146ddaec50 name=testParameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| rootVolumeUuid | The root volume UUID. | 3.6.0 | ||
| name | The resource name. | 3.6.0 | ||
| description | The detailed description of the resource. | Yes | 3.6.0 | |
| resourceUuid | Yes | 3.6.0 | ||
| tagUuids | The tag UUID list. | Yes | 3.6.0 | |
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 3.6.0 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 3.6.0 | |
| timeout | Yes |
DeleteVolumeSnapshotGroup
Deletes a snapshot group. For
example,
DeleteVolumeSnapshotGroup uuid=f7b2175eebba3161b029689cb32f9b14Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| uuid | The resource UUID. | 3.6.0 | ||
| deleteMode | Yes | 3.6.0 | ||
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 3.6.0 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 3.6.0 | |
| scope | The data merge direction. Pull: Merge forward; Commit: Merge backward; Auto: Automatically select the optimal merge direction. | Yes | 5.4.0 | |
| direction | The data merge direction. Pull: Merge forward; Commit: Merge backward; Auto: Automatically select the optimal merge direction. | Yes | 5.4.0 | |
| timeout | Yes |
UpdateVolumeSnapshotGroup
Updates a snapshot group. For
example,
UpdateVolumeSnapshotGroup uuid=c39089cddbd836628f346b14beafe2d3 name=testParameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| name | The resource name. | Yes | 3.6.0 | |
| description | The detailed description of the resource. | Yes | 3.6.0 | |
| uuid | The resource UUID. | 3.6.0 | ||
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 3.6.0 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 3.6.0 | |
| timeout | Yes |
QueryVolumeSnapshotGroup
Queries a snapshot group. For
example,
QueryVolumeSnapshotGroup vmInstanceUuid=9480c1736b9c3798b3030cd990f0db8fPrimitive Fields of Query
Nested and Expanded Fields of Query
| Field | Inventory | Description | Starting Version |
|---|---|---|---|
| volumeSnapshot | Volume Snapshot Inventory | The volume snapshots that are associated with the snapshot group. | 3.6.0 |
| volumeSnapshotRef | Volume Snapshot Inventory | The reference between volume snapshot and snapshot groups. | 3.6.0 |
| volumeSnapshotRefs | Volume Snapshot Inventory | The references between volume snapshot and snapshot groups. | 3.6.0 |
CheckVolumeSnapshotGroupAvailability
Checks the availability of a snapshot group. For
example,
CheckVolumeSnapshotGroupAvailability uuids=cc389f9eb3223c698f565621d2abcf72Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| uuids | The snapshot group UUIDs. | 3.6.0 | ||
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 3.6.0 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 3.6.0 | |
| timeout | Yes |
RevertVmFromSnapshotGroup
Reverts a snapshot group. For
example,
RevertVmFromSnapshotGroup uuid=37050441a903313297e65e09ccbeb30fParameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| uuid | The snapshot group UUID. | 3.6.0 | ||
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 3.6.0 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 3.6.0 | |
| timeout | Yes |
UndoSnapshotCreation
Reverts a snapshot created latest. For
example,
UndoSnapshotCreation uuid=7fc32ad187c939d8aca65977560c2714 snapShotUuid=7677380457d136629f44c93c99978accParameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| uuid | The volume UUID. | 5.1.8 | ||
| snapShotUuid | 5.1.8 | |||
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 5.1.8 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 5.1.8 | |
| timeout | Yes |
UngroupVolumeSnapshotGroup
Ungroups a snapshot group. For
example,
UngroupVolumeSnapshotGroup uuid=8903cef5a11c3457881bfd7bd5f04757Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| uuid | The snapshot group UUID. | 3.6.0 | ||
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 3.6.0 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 3.6.0 | |
| timeout | Yes |
GetMemorySnapshotGroupReference
Retrieve memory snapshot groups indexed by resources. For
example,
GetMemorySnapshotGroupReference resourceUuid=8903cef5a11c3457881bfd7bd5f04757 resourceType=293e9dd057c831608cf59cd377ba0d03Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| resourceUuid | The resource UUID. | 4.4.24 | ||
| resourceType | The resource type. | |||
| userTags | The user tags. For more information, see CreateUserTag. | Yes | 4.4.24 | |
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 4.4.24 | |
| timeout | Yes |
Tags
You can create a user tag on a snapshot group by using
resourceType=VolumeSnapshotVO. For
example,
CreateUserTag resourceType=VolumeSnapshotVO tag=golden-ResourceStack
resourceUuid=27260a1dfa93453087d67c69dc78805c