• Native OpenStack API

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

Create Backup

Function Description

This interface is used to back up a volume.

Interface Format

Method

URI

Description

POST

/v2/{tenant_id}/backups

Backs up a volume.

Restrictions

If the volume status is not available or in-use, it cannot be backed up.

The backup name cannot start with autobk.

The default backup mode is full backup and incremental backup will be performed subsequently. incremental in the request body will be ignored.

Backup is based on the snapshot technology. Therefore, parameter snapshot_id in the request body is mandatory.

The container field in the request will be ignored.

Expanded Interface

N/A

Request Parameter

Parameter

Type

Mandatory

Remarks

backup

Dict

Yes

Specifies the backup information.

container

String

No

Specifies the volume backup container.

decription

String

No

Specifies the volume backup description.

incremental

Boolean

No

true indicates the incremental backup and false indicates the full backup.

volume_id

Uuid

Yes

Specifies the ID of the volume to be backed up.

force

Boolean

No

true indicates that a volume that is being attached to a VM is forcibly backed up.

name

String

No

Specifies the volume backup name.

snapshot_id

Uuid

Yes

Specifies the ID of the snapshot associated with the backup.

project_id

String

No

project ID

Response Parameter

Parameter

Type

Mandatory

Remarks

backup

Dict

Yes

Specifies the volume backup information.

id

Uuid

Yes

Specifies the volume backup ID.

name

String

Yes

Specifies the volume backup name.

links

List

Yes

Specifies the volume backup URL.

Request Example

post /v2/5751d8c3f2f6415993ee4326b41630ec/backups
{
"backup":{
      "volume_id":"2748f2f2-4394-4e6e-af8d-8dd34496c024",
      "snapshot_id":"2bb856e1-b3d8-4432-a858-09e4ce939389",
      "name":"backup-0001"
   }
}

Response Example

{
  "backup": {
    "id": "54ba0e69-48a0-4a77-9cdf-a7979a7e2648",
    "links": [
      {
        "href": "https://volume.Region.dc1.domainname.com/v2/5751d8c3f2f6415993ee4326b41630ec/backups/54ba0e69-48a0-4a77-9cdf-a7979a7e2648",
        "rel": "self"
      },
      {
        "href": "https://volume.Region.dc1.domainname.com/5751d8c3f2f6415993ee4326b41630ec/backups/54ba0e69-48a0-4a77-9cdf-a7979a7e2648",
        "rel": "bookmark"
      }
    ],
    "name": "backup-0001"
  }
}

Error Code

See section Processing Return Code.