• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Cinder V2 Interfaces
  5. Backup
  6. Restore Backup

Restore Backup

Function Description

This interface is used to restore a volume using a backup.

Interface Format

Method

URI

Description

POST

/v2/{tenant_id}/backups/{backup_id}/restore

This interface is used to restore a volume using a backup.

Restrictions

A volume cannot be restored if its status is not available.

A volume cannot be restored if its size is less than that of the backup used to restore it.

Expanded Interface

N/A

Request Parameter

Parameter

Type

Mandatory

Remarks

volume_id

Uuid

No

Specifies the ID of the volume to be restored.

Response Parameter

Parameter

Type

Mandatory

Remarks

backup_id

Uuid

Yes

Specifies the backup ID.

volume_id

Uuid

Yes

Specifies the volume ID.

volume_name

String

Yes

Specifies the volume name.

Request Example

post /v2/b23b579f08c84228b9b4673c46f0c442/backups/1d1139d8-8989-49d3-8aa1-83eb691e6db2/restore
{
"restore":{
      "volume_id":"2748f2f2-4394-4e6e-af8d-8dd34496c024"
   }
}

Response Example

{
    "restore": {
        "backup_id": "1d1139d8-8989-49d3-8aa1-83eb691e6db2", 
        "volume_id": "2748f2f2-4394-4e6e-af8d-8dd34496c024"
        " volume_name ": "test_volume"
    }
}

Error Code

See section Processing Return Code.