Restoring a Backup
Function
This API is used to restore backup data.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
URI
POST /v3/{project_id}/backups/{backup_id}/restore
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
backup_id |
Yes |
String |
Backup ID. Default value: N/A For details about how to obtain the backup ID, see Obtaining a Backup ID. |
project_id |
Yes |
String |
Project ID. Default value: N/A For details about how to obtain the project ID, see Obtaining a Project ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. You can obtain it by calling the IAM API for obtaining a user token. The user token is the value of X-Subject-Token in the response header. Default value: N/A |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
restore |
Yes |
BackupRestore object |
Request body of restoring a backup |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
mappings |
No |
Array of BackupRestoreServerMapping objects |
Restored mapping relationship. This parameter is mandatory for VM restoration and optional for disk restoration. |
power_on |
No |
Boolean |
Whether to start the VM after the restoration. The default value is true. |
server_id |
No |
String |
ID of the VM to be restored. This parameter is mandatory for full-server restoration. Default value: N/A For details, see Obtaining an ECS ID. |
volume_id |
No |
String |
ID of the volume to be restored. This parameter is mandatory for volume restoration. Default value: N/A For details, see Obtaining an EVS Disk ID. |
resource_id |
No |
String |
ID of the resource to be restored. It is in UUID format. You can query the resource ID based on the type of the resource to be backed up. Default value: N/A |
details |
No |
RestoreDetails object |
Restoration details |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
backup_id |
Yes |
String |
Volume backup ID. You can view the disk backup ID in the cloud server backup details on the console or obtain it by calling the API for querying a specific backup. Default value: N/A |
volume_id |
Yes |
String |
ID of the volume to be restored. Default value: N/A For details, see Obtaining an EVS Disk ID. |
Response Parameters
Status code: 202
Accepted
None
Example Requests
Restoring from a specified backup
POST https://{endpoint}/v3/{f841e01fd2b14e7fa41b6ae7aa6b0594}/backups/a5200268-74a5-4806-acc6-95793ab0228b/restore { "restore" : { "mappings" : [ { "backup_id" : "5d822633-2bbf-4af8-a16e-5ab1c7705235", "volume_id" : "eccbcfdd-f843-4bbb-b2c0-a5ce861f9376" } ], "power_on" : true, "server_id" : "94eba8b2-acc9-4d82-badc-127144cc5526" } }
Example Responses
None
Status Codes
Status Code |
Description |
---|---|
202 |
Accepted |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot