Help Center/ Elastic Volume Service/ API Reference/ Out-of-Date APIs/ API/ Snapshot Management/ Rolling Back a Snapshot to an EVS Disk (Deprecated)
Updated on 2024-02-27 GMT+08:00

Rolling Back a Snapshot to an EVS Disk (Deprecated)

Function

This API is used to roll back a snapshot to an EVS disk.

Note: This API has been deprecated. Use another API.

Constraints

  • A snapshot can be rolled back only to its source disk. Rollback to another disk is not possible.

  • You can roll back a disk from a snapshot only when the disk is in the available or error_rollbacking state.

  • Snapshots whose names started with the autobk_snapshot_ prefix are automatically created by the system when backups are created. Such snapshots cannot be used to roll back data.

Calling Method

For details, see Calling APIs.

URI

POST /v3/{project_id}/os-vendor-snapshots/{snapshot_id}/rollback

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

The project ID.

snapshot_id

Yes

String

The snapshot ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

A token obtained from IAM is valid for 24 hours. When using a token for authentication, cache it to avoid frequently calling the API.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

rollback

Yes

RollbackSnapshotOptionV3 object

The snapshot rollback information. For details, see Parameters in the rollback field.

Table 4 RollbackSnapshotOptionV3

Parameter

Mandatory

Type

Description

name

No

String

The name of the disk to be rolled back. You can enter up to 64 characters. For details about how to query the target disk name, see the "name" field in the response in Querying Details About a Disk.

NOTE:

Do not use the name parameter alone. If name is going to be used, volume_id must also be specified.

volume_id

Yes

String

The ID of the disk to be rolled back. For details about how to query the target disk ID, see the "volume_id" field in the response of Querying Details About an EVS Snapshot.

Response Parameters

Status code: 202

Table 5 Response body parameters

Parameter

Type

Description

rollback

RollbackBody object

The snapshot rollback information.

For details, see·Parameters in the rollback field.

Table 6 RollbackBody

Parameter

Type

Description

volume_id

String

The ID of the target disk for snapshot rollback.

Status code: 400

Table 7 Response body parameters

Parameter

Type

Description

error

Error object

The error message returned if an error occurs. For details, seeParameters in the error field.

Table 8 Error

Parameter

Type

Description

code

String

The error code returned if an error occurs. For the error codes and their meanings, see Error Codes.

message

String

The error message returned if an error occurs.

Example Requests

POST https://{endpoint}/v3/{project_id}/os-vendor-snapshots/{snapshot_id}/rollback

{
  "rollback" : {
    "name" : "test-001",
    "volume_id" : "5aa119a8-d25b-45a7-8d1b-88e127885635"
  }
}

Example Responses

Status code: 202

Accepted

{
  "rollback" : {
    "volume_id" : "5aa119a8-d25b-45a7-8d1b-88e127885635"
  }
}

Status code: 400

Bad Request

{
  "error" : {
    "message" : "XXXX",
    "code" : "XXX"
  }
}

Status Codes

Status Code

Description

202

Accepted

400

Bad Request

Error Codes

See Error Codes.