If the data in an EVS disk is incorrect or damaged, you can roll back the data from a snapshot to the source EVS disk to restore the data.
Query the snapshot list, obtain the ID of the snapshot and the ID of the snapshot's source disk, and then roll back the snapshot to the source disk.
To meet the preceding requirements, call the following APIs:
URI format: GET /v3/{project_id}/snapshots
For details, see OpenStack Cinder API v3 > EVS Snapshot > Querying EVS Snapshots in the Elastic Volume Service API Reference.
{ "snapshots": [ { "created_at": "2016-02-16T16:54:14.981520", "description": null, "id": "b836dc3d-4e10-4ea4-a34c-8f6b0460a583", "metadata": { }, "name": "test01", "size": 1, "status": "available", "volume_id": "ba5730ea-8621-4ae8-b702-ff0ffc12c209", "updated_at": null }, { "created_at": "2016-02-16T16:54:19.475397", "description": null, "id": "83be494d-329e-4a78-8ac5-9af900f48b95", "metadata": { }, "name": "test02", "size": 1, "status": "available", "volume_id": "ba5730ea-8621-4ae8-b702-ff0ffc12c209", "updated_at": null }, { "created_at": "2016-02-16T16:54:24.367414", "description": null, "id": "dd360f46-7593-4d35-8f2c-5566fd0bd79e", "metadata": { }, "name": "test03", "size": 1, "status": "available", "volume_id": "ba5730ea-8621-4ae8-b702-ff0ffc12c209", "updated_at": null }, { "created_at": "2016-02-16T16:54:29.766740", "description": null, "id": "4c29796a-8cf4-4482-9afc-e66da9a81240", "metadata": { }, "name": "test04", "size": 1, "status": "available", "volume_id": "ba5730ea-8621-4ae8-b702-ff0ffc12c209", "updated_at": null } ], "snapshots_links": null }
URI format: POST /v3/{project_id}/os-vendor-snapshots/{snapshot_id}/rollback
For details, see API v3 > EVS Snapshot > Rolling Back a Snapshot to an EVS Disk in the Elastic Volume Service API Reference.
POST /v3/000efdc5f9064584b718b181df137bd7/os-vendor-snapshots/b836dc3d-4e10-4ea4-a34c-8f6b0460a583 /rollback
{ "rollback": { "name": "test-001", "volume_id": "5aa119a8-d25b-45a7-8d1b-88e127885635" } }
{ "rollback": { "volume_id": "5aa119a8-d25b-45a7-8d1b-88e127885635" } }
{ "error": { "message": "XXXX", "code": "XXX" } }
{ "badRequest": { "message": "XXXX", "code": "XXX" } }