Restoring Data Using a Backup
Function
This API is used to restore data using a backup.
URI
POST /v3/{project_id}/backups/{backup_id}/restore
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
backup_id |
Yes |
String |
Backup ID |
|
project_id |
Yes |
String |
Project ID |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
User token. Obtained by calling the corresponding IAM API. If the request is successfully processed, the value of X-Subject-Token included in the response header is the token value. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
restore |
Yes |
BackupRestore object |
Request body for restoring data |
|
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 the server is powered on after restoration. By default it is powered on after restoration. Default: true |
|
server_id |
No |
String |
ID of the target VM to be restored. This parameter is mandatory for VM restoration. |
|
volume_id |
No |
String |
ID of the target disk to be restored. This parameter is mandatory for disk restoration. |
|
resource_id |
No |
String |
ID of the resource to be restored |
Response Parameters
None
Example Requests
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.
Last Article: Replicating a Backup
Next Article: Policies
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.