Creating backups
POST /v3/{project_id}/backups
Create a backup from a volume or snapshot.
Source: https://docs.openstack.org/api-ref/block-storage/v3/#create-a-backup
Request
Parameters
Name | In | Type | Description |
---|---|---|---|
project_id
|
path | string | The UUID of the project. |
backup
|
body | object | A backup object. |
volume_id
|
body | string | The UUID of the volume. |
container (Optional) |
body | string | The container name or null. |
description (Optional) |
body | string | The backup description or null. |
incremental (Optional) |
body | boolean | The backup mode. A valid value is true for the incremental backup mode or false for the full backup mode. Default is false . |
force (Optional) |
body | boolean | Indicates whether to back up, even if the volume is attached. Default is false . |
name (Optional) |
body | string | The name of the volume backup. |
availability_zone (Optional) |
body | string | The name of the availability zone. |
snapshot_id (Optional) |
body | string | The UUID of the source volume snapshot. |
metadata (Optional) |
body | object |
The backup metadata key value pairs. New in version 3.43 |
Example
# curl -ks -H 'Content-Type: application/json' -H 'X-Auth-Token: gAAAAA<...>' -d '\{ "backup": { "volume_id": "98db149d-b9e6-42d7-814d-492563c56fef", "name": "vm2/cirros/Boot volume-2024-05-09T10:41:13", "description": "New backup", "incremental": false, "snapshot_id": null } }' https://<node_IP_addr>:8776/v3/3046fb2c2a314a0fbb32607caa1e5277/backups
Response
Parameters
Name | In | Type | Description |
---|---|---|---|
backup
|
body | object | A backup object. |
id
|
body | string | The UUID of the backup. |
links
|
body | array | Links for the backup. |
name
|
body | string | The backup name. |
metadata (Optional) |
body | object |
The backup metadata key value pairs. New in version 3.43 |
Status codes
Success
Code | Reason |
---|---|
202 - Accepted
|
Request was accepted for processing, but the processing has not been completed. A ‘location’ header is included in the response which contains a link to check the progress of the request. |
Error
Code | Reason |
---|---|
400 - Bad Request
|
Some content in the request was invalid. |
Example
{ "backup": { "id": "bcb8fc88-a0ba-4cd0-801a-e9face1eac88", "name": "vm2/cirros/Boot volume-2024-05-09T10:41:13", "links": [ { "rel": "self", "href": "https://<node_IP_addr>:8776/v3/3046fb2c2a314a0fbb32607caa1e5277/backups/bcb8fc88-a0ba-4cd0-801a-e9face1eac88" }, { "rel": "bookmark", "href": "https://<node_IP_addr>:8776/3046fb2c2a314a0fbb32607caa1e5277/backups/bcb8fc88-a0ba-4cd0-801a-e9face1eac88" } ] } }