# Public Cloud › Storage › Volume Backup API

> Part of the OVHcloud developer hub. Index of every page and section: https://developers.eu.ovhcloud.com/llms.txt
> The Public Cloud product's sections: https://developers.eu.ovhcloud.com/reference/public-cloud/llms.txt
> Everything in one file: https://developers.eu.ovhcloud.com/llms-full.txt

> 5 operations of the OVHcloud API. Calls carry `authorization: Bearer $OVH_TOKEN`; the EU host is shown, Canada and the United States answer on api.ca.ovhcloud.com and api.us.ovhcloud.com.

Page: https://developers.eu.ovhcloud.com/reference/public-cloud/storage/volume-backup/

OpenAPI v1: https://api.eu.ovhcloud.com/v1/__schemas/developer-hub-navigation/public-cloud/storage/volume-backup.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/public-cloud/storage/volume-backup.json?format=openapi3

## Operations

- `GET /publicCloud/project/{projectId}/storage/block/backup` — List backups
- `GET /publicCloud/project/{projectId}/storage/block/backup/{id}` — Get a backup
- `POST /publicCloud/project/{projectId}/storage/block/backup` — Create a backup
- `DELETE /publicCloud/project/{projectId}/storage/block/backup/{id}` — Delete a backup
- `PUT /publicCloud/project/{projectId}/storage/block/backup/{id}` — Update a backup

## List backups

`GET /v2/publicCloud/project/{projectId}/storage/block/backup`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/storage/volume-backup/#getVolumeBackups

**Status:** Stable production version  
**IAM actions:** `publicCloudProject:apiovh:volume/backup/get`

Returns the volume backups of the project.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `X-Pagination-Cursor` | header | string |  | Pagination cursor |
| `X-Pagination-Size` | header | integer |  | Pagination size |
| `projectId` | path | string | yes | Project ID |
| `volumeId` | query | string (uuid) |  | Filter by source volume ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.blockStorage.Backup[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Computed hash representing the current target specification value |
| `createdAt` | string (date-time) | read-only | Creation date of the backup |
| `currentState` | publicCloud.blockStorage.BackupCurrentState | read-only | Current observed state of the backup from the infrastructure |
| `currentState.capabilities` | publicCloud.blockStorage.BackupCapability[] | read-only | Per-action availability for the current backup state |
| `currentState.capabilities[].enabled` | boolean | read-only | Whether the action can currently be performed |
| `currentState.capabilities[].name` | publicCloud.blockStorage.BackupCapabilityNameEnum | read-only | Action the capability refers to — one of `CREATE_VOLUME`, `DELETE`, `RENAME`, `RESTORE_TO_VOLUME` |
| `currentState.capabilities[].reason` | publicCloud.blockStorage.BackupCapabilityReasonEnum | read-only | Why the action is disabled. Null when `enabled` is true. — one of `HAS_DEPENDENT_BACKUPS`, `INVALID_STATUS` |
| `currentState.description` | string | read-only | Backup description |
| `currentState.encryption` | publicCloud.blockStorage.BlockEncryption | read-only | Encryption of the source volume at backup time. Null when `volumeType` is null and the backup records no customer key, or when the backup cannot be read. |
| `currentState.encryption.enabled` | boolean | yes | Whether the volume is encrypted at rest with LUKS |
| `currentState.encryption.kms` | publicCloud.blockStorage.BlockEncryptionKms |  | Customer-managed OVH Key Management Service (OKMS) key used to encrypt the volume. When omitted and enabled is true, the volume is encrypted with an OVH-managed key (OMK). Ignored (must be absent) when enabled is false. Immutable after creation. |
| `currentState.location` | publicCloud.common.Location | read-only | Current location |
| `currentState.location.availabilityZone` | string |  | Availability zone within the region |
| `currentState.location.region` | string | yes | Region code |
| `currentState.name` | string | read-only | Current backup name |
| `currentState.size` | integer | read-only | Size of the backup in GB |
| `currentState.status` | publicCloud.blockStorage.BackupStatusEnum | read-only | Backup status on the infrastructure — one of `AVAILABLE`, `CREATING`, `DELETED`, `DELETING`, `ERROR`, `ERROR_DELETING`, `ERROR_RESTORING`, `RESTORING`, `UNMANAGING` |
| `currentState.volumeId` | string (uuid) | read-only | Identifier of the source volume |
| `currentState.volumeType` | publicCloud.blockStorage.VolumeTypeEnum | read-only | Volume type of the source volume at backup time. Null when the backup did not record it, when the type has no API value, or when the backup cannot be read. — one of `CLASSIC`, `HIGH_SPEED`, `HIGH_SPEED_GEN2` |
| `currentTasks` | common.CurrentTask[] | read-only | Ongoing asynchronous tasks related to the backup |
| `currentTasks[].errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `currentTasks[].errors[].message` | string | read-only | Error description |
| `currentTasks[].id` | string (uuid) | read-only | Identifier of the current task |
| `currentTasks[].link` | string | read-only | Link to the task details |
| `currentTasks[].status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `currentTasks[].type` | string | read-only | Type of the current task |
| `id` | string (uuid) | read-only | Unique identifier of the backup |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Backup readiness in the system — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | publicCloud.blockStorage.BackupTargetSpec | read-only | Last target specification of the backup |
| `targetSpec.description` | string |  | Desired backup description |
| `targetSpec.location` | publicCloud.common.Location | yes | Target location |
| `targetSpec.location.availabilityZone` | string |  | Availability zone within the region |
| `targetSpec.location.region` | string | yes | Region code |
| `targetSpec.name` | string | yes | Desired backup name |
| `targetSpec.volumeId` | string (uuid) | yes | Identifier of the source volume to backup |
| `updatedAt` | string (date-time) | read-only | Last update date of the backup |

```json
[
  {
    "checksum": "string",
    "createdAt": "2024-01-01T12:00:00Z",
    "currentState": {
      "capabilities": [
        {
          "enabled": true,
          "name": "CREATE_VOLUME",
          "reason": "HAS_DEPENDENT_BACKUPS"
        }
      ],
      "description": "string",
      "encryption": {
        "enabled": true,
        "kms": {
          "domainId": "00000000-0000-0000-0000-000000000000",
          "serviceKeyId": "00000000-0000-0000-0000-000000000000"
        }
      },
      "location": {
        "availabilityZone": "string",
        "region": "string"
      },
      "name": "string",
      "size": 0,
      "status": "AVAILABLE",
      "volumeId": "00000000-0000-0000-0000-000000000000",
      "volumeType": "CLASSIC"
    },
    "currentTasks": [
      {
        "errors": [
          {
            "message": "string"
          }
        ],
        "id": "00000000-0000-0000-0000-000000000000",
        "link": "string",
        "status": "ERROR",
        "type": "string"
      }
    ],
    "id": "00000000-0000-0000-0000-000000000000",
    "resourceStatus": "CREATING",
    "targetSpec": {
      "description": "string",
      "location": {
        "availabilityZone": "string",
        "region": "string"
      },
      "name": "string",
      "volumeId": "00000000-0000-0000-0000-000000000000"
    },
    "updatedAt": "2024-01-01T12:00:00Z"
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/storage/block/backup" \
  -H "accept: application/json" \
  -H "X-Schemas-Version: 2026-06" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/publicCloud/project/{projectId}/storage/block/backup")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/publicCloud/project/{projectId}/storage/block/backup");

print_r($result);
?>
```

## Get a backup

`GET /v2/publicCloud/project/{projectId}/storage/block/backup/{id}`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/storage/volume-backup/#getVolumeBackup

**Status:** Stable production version  
**IAM actions:** `publicCloudProject:apiovh:volume/backup/get`

Returns the backup configuration and its current state, including its size and source volume.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string (uuid) | yes | Id |
| `projectId` | path | string | yes | Project ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.blockStorage.Backup | successful operation |
| 404 | object | Error 404 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Computed hash representing the current target specification value |
| `createdAt` | string (date-time) | read-only | Creation date of the backup |
| `currentState` | publicCloud.blockStorage.BackupCurrentState | read-only | Current observed state of the backup from the infrastructure |
| `currentState.capabilities` | publicCloud.blockStorage.BackupCapability[] | read-only | Per-action availability for the current backup state |
| `currentState.capabilities[].enabled` | boolean | read-only | Whether the action can currently be performed |
| `currentState.capabilities[].name` | publicCloud.blockStorage.BackupCapabilityNameEnum | read-only | Action the capability refers to — one of `CREATE_VOLUME`, `DELETE`, `RENAME`, `RESTORE_TO_VOLUME` |
| `currentState.capabilities[].reason` | publicCloud.blockStorage.BackupCapabilityReasonEnum | read-only | Why the action is disabled. Null when `enabled` is true. — one of `HAS_DEPENDENT_BACKUPS`, `INVALID_STATUS` |
| `currentState.description` | string | read-only | Backup description |
| `currentState.encryption` | publicCloud.blockStorage.BlockEncryption | read-only | Encryption of the source volume at backup time. Null when `volumeType` is null and the backup records no customer key, or when the backup cannot be read. |
| `currentState.encryption.enabled` | boolean | yes | Whether the volume is encrypted at rest with LUKS |
| `currentState.encryption.kms` | publicCloud.blockStorage.BlockEncryptionKms |  | Customer-managed OVH Key Management Service (OKMS) key used to encrypt the volume. When omitted and enabled is true, the volume is encrypted with an OVH-managed key (OMK). Ignored (must be absent) when enabled is false. Immutable after creation. |
| `currentState.location` | publicCloud.common.Location | read-only | Current location |
| `currentState.location.availabilityZone` | string |  | Availability zone within the region |
| `currentState.location.region` | string | yes | Region code |
| `currentState.name` | string | read-only | Current backup name |
| `currentState.size` | integer | read-only | Size of the backup in GB |
| `currentState.status` | publicCloud.blockStorage.BackupStatusEnum | read-only | Backup status on the infrastructure — one of `AVAILABLE`, `CREATING`, `DELETED`, `DELETING`, `ERROR`, `ERROR_DELETING`, `ERROR_RESTORING`, `RESTORING`, `UNMANAGING` |
| `currentState.volumeId` | string (uuid) | read-only | Identifier of the source volume |
| `currentState.volumeType` | publicCloud.blockStorage.VolumeTypeEnum | read-only | Volume type of the source volume at backup time. Null when the backup did not record it, when the type has no API value, or when the backup cannot be read. — one of `CLASSIC`, `HIGH_SPEED`, `HIGH_SPEED_GEN2` |
| `currentTasks` | common.CurrentTask[] | read-only | Ongoing asynchronous tasks related to the backup |
| `currentTasks[].errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `currentTasks[].errors[].message` | string | read-only | Error description |
| `currentTasks[].id` | string (uuid) | read-only | Identifier of the current task |
| `currentTasks[].link` | string | read-only | Link to the task details |
| `currentTasks[].status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `currentTasks[].type` | string | read-only | Type of the current task |
| `id` | string (uuid) | read-only | Unique identifier of the backup |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Backup readiness in the system — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | publicCloud.blockStorage.BackupTargetSpec | read-only | Last target specification of the backup |
| `targetSpec.description` | string |  | Desired backup description |
| `targetSpec.location` | publicCloud.common.Location | yes | Target location |
| `targetSpec.location.availabilityZone` | string |  | Availability zone within the region |
| `targetSpec.location.region` | string | yes | Region code |
| `targetSpec.name` | string | yes | Desired backup name |
| `targetSpec.volumeId` | string (uuid) | yes | Identifier of the source volume to backup |
| `updatedAt` | string (date-time) | read-only | Last update date of the backup |

```json
{
  "checksum": "string",
  "createdAt": "2024-01-01T12:00:00Z",
  "currentState": {
    "capabilities": [
      {
        "enabled": true,
        "name": "CREATE_VOLUME",
        "reason": "HAS_DEPENDENT_BACKUPS"
      }
    ],
    "description": "string",
    "encryption": {
      "enabled": true,
      "kms": {
        "domainId": "00000000-0000-0000-0000-000000000000",
        "serviceKeyId": "00000000-0000-0000-0000-000000000000"
      }
    },
    "location": {
      "availabilityZone": "string",
      "region": "string"
    },
    "name": "string",
    "size": 0,
    "status": "AVAILABLE",
    "volumeId": "00000000-0000-0000-0000-000000000000",
    "volumeType": "CLASSIC"
  },
  "currentTasks": [
    {
      "errors": [
        {
          "message": "string"
        }
      ],
      "id": "00000000-0000-0000-0000-000000000000",
      "link": "string",
      "status": "ERROR",
      "type": "string"
    }
  ],
  "id": "00000000-0000-0000-0000-000000000000",
  "resourceStatus": "CREATING",
  "targetSpec": {
    "description": "string",
    "location": {
      "availabilityZone": "string",
      "region": "string"
    },
    "name": "string",
    "volumeId": "00000000-0000-0000-0000-000000000000"
  },
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/storage/block/backup/{id}" \
  -H "accept: application/json" \
  -H "X-Schemas-Version: 2026-06" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/publicCloud/project/{projectId}/storage/block/backup/{id}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/publicCloud/project/{projectId}/storage/block/backup/{id}");

print_r($result);
?>
```

## Create a backup

`POST /v2/publicCloud/project/{projectId}/storage/block/backup`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/storage/volume-backup/#createVolumeBackup

**Status:** Stable production version  
**IAM actions:** `publicCloudProject:apiovh:volume/backup/create`

Creates a backup of a volume in the given region.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `projectId` | path | string | yes | Project ID |

### Request body (required)

Type: `publicCloud.blockStorage.BackupCreation`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `targetSpec` | publicCloud.blockStorage.BackupTargetSpec | yes | Desired target specification for the backup |
| `targetSpec.description` | string |  | Desired backup description |
| `targetSpec.location` | publicCloud.common.Location | yes | Target location |
| `targetSpec.location.availabilityZone` | string |  | Availability zone within the region |
| `targetSpec.location.region` | string | yes | Region code |
| `targetSpec.name` | string | yes | Desired backup name |
| `targetSpec.volumeId` | string (uuid) | yes | Identifier of the source volume to backup |

```json
{
  "targetSpec": {
    "description": "string",
    "location": {
      "availabilityZone": "string",
      "region": "string"
    },
    "name": "string",
    "volumeId": "00000000-0000-0000-0000-000000000000"
  }
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.blockStorage.Backup | successful operation |
| 409 | object | Error 409 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Computed hash representing the current target specification value |
| `createdAt` | string (date-time) | read-only | Creation date of the backup |
| `currentState` | publicCloud.blockStorage.BackupCurrentState | read-only | Current observed state of the backup from the infrastructure |
| `currentState.capabilities` | publicCloud.blockStorage.BackupCapability[] | read-only | Per-action availability for the current backup state |
| `currentState.capabilities[].enabled` | boolean | read-only | Whether the action can currently be performed |
| `currentState.capabilities[].name` | publicCloud.blockStorage.BackupCapabilityNameEnum | read-only | Action the capability refers to — one of `CREATE_VOLUME`, `DELETE`, `RENAME`, `RESTORE_TO_VOLUME` |
| `currentState.capabilities[].reason` | publicCloud.blockStorage.BackupCapabilityReasonEnum | read-only | Why the action is disabled. Null when `enabled` is true. — one of `HAS_DEPENDENT_BACKUPS`, `INVALID_STATUS` |
| `currentState.description` | string | read-only | Backup description |
| `currentState.encryption` | publicCloud.blockStorage.BlockEncryption | read-only | Encryption of the source volume at backup time. Null when `volumeType` is null and the backup records no customer key, or when the backup cannot be read. |
| `currentState.encryption.enabled` | boolean | yes | Whether the volume is encrypted at rest with LUKS |
| `currentState.encryption.kms` | publicCloud.blockStorage.BlockEncryptionKms |  | Customer-managed OVH Key Management Service (OKMS) key used to encrypt the volume. When omitted and enabled is true, the volume is encrypted with an OVH-managed key (OMK). Ignored (must be absent) when enabled is false. Immutable after creation. |
| `currentState.location` | publicCloud.common.Location | read-only | Current location |
| `currentState.location.availabilityZone` | string |  | Availability zone within the region |
| `currentState.location.region` | string | yes | Region code |
| `currentState.name` | string | read-only | Current backup name |
| `currentState.size` | integer | read-only | Size of the backup in GB |
| `currentState.status` | publicCloud.blockStorage.BackupStatusEnum | read-only | Backup status on the infrastructure — one of `AVAILABLE`, `CREATING`, `DELETED`, `DELETING`, `ERROR`, `ERROR_DELETING`, `ERROR_RESTORING`, `RESTORING`, `UNMANAGING` |
| `currentState.volumeId` | string (uuid) | read-only | Identifier of the source volume |
| `currentState.volumeType` | publicCloud.blockStorage.VolumeTypeEnum | read-only | Volume type of the source volume at backup time. Null when the backup did not record it, when the type has no API value, or when the backup cannot be read. — one of `CLASSIC`, `HIGH_SPEED`, `HIGH_SPEED_GEN2` |
| `currentTasks` | common.CurrentTask[] | read-only | Ongoing asynchronous tasks related to the backup |
| `currentTasks[].errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `currentTasks[].errors[].message` | string | read-only | Error description |
| `currentTasks[].id` | string (uuid) | read-only | Identifier of the current task |
| `currentTasks[].link` | string | read-only | Link to the task details |
| `currentTasks[].status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `currentTasks[].type` | string | read-only | Type of the current task |
| `id` | string (uuid) | read-only | Unique identifier of the backup |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Backup readiness in the system — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | publicCloud.blockStorage.BackupTargetSpec | read-only | Last target specification of the backup |
| `targetSpec.description` | string |  | Desired backup description |
| `targetSpec.location` | publicCloud.common.Location | yes | Target location |
| `targetSpec.location.availabilityZone` | string |  | Availability zone within the region |
| `targetSpec.location.region` | string | yes | Region code |
| `targetSpec.name` | string | yes | Desired backup name |
| `targetSpec.volumeId` | string (uuid) | yes | Identifier of the source volume to backup |
| `updatedAt` | string (date-time) | read-only | Last update date of the backup |

```json
{
  "checksum": "string",
  "createdAt": "2024-01-01T12:00:00Z",
  "currentState": {
    "capabilities": [
      {
        "enabled": true,
        "name": "CREATE_VOLUME",
        "reason": "HAS_DEPENDENT_BACKUPS"
      }
    ],
    "description": "string",
    "encryption": {
      "enabled": true,
      "kms": {
        "domainId": "00000000-0000-0000-0000-000000000000",
        "serviceKeyId": "00000000-0000-0000-0000-000000000000"
      }
    },
    "location": {
      "availabilityZone": "string",
      "region": "string"
    },
    "name": "string",
    "size": 0,
    "status": "AVAILABLE",
    "volumeId": "00000000-0000-0000-0000-000000000000",
    "volumeType": "CLASSIC"
  },
  "currentTasks": [
    {
      "errors": [
        {
          "message": "string"
        }
      ],
      "id": "00000000-0000-0000-0000-000000000000",
      "link": "string",
      "status": "ERROR",
      "type": "string"
    }
  ],
  "id": "00000000-0000-0000-0000-000000000000",
  "resourceStatus": "CREATING",
  "targetSpec": {
    "description": "string",
    "location": {
      "availabilityZone": "string",
      "region": "string"
    },
    "name": "string",
    "volumeId": "00000000-0000-0000-0000-000000000000"
  },
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/storage/block/backup" \
  -H "accept: application/json" \
  -H "X-Schemas-Version: 2026-06" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: publicCloud.blockStorage.BackupCreation
result = client.post("/v2/publicCloud/project/{projectId}/storage/block/backup",
	targetSpec = None, # Desired target specification for the backup (type: publicCloud.blockStorage.BackupTargetSpec)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: publicCloud.blockStorage.BackupCreation
$result = $ovh->post("/v2/publicCloud/project/{projectId}/storage/block/backup", array(
	targetSpec => null, // Desired target specification for the backup (type: publicCloud.blockStorage.BackupTargetSpec)
));

print_r($result);
?>
```

## Delete a backup

`DELETE /v2/publicCloud/project/{projectId}/storage/block/backup/{id}`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/storage/volume-backup/#deleteVolumeBackup

**Status:** Stable production version  
**IAM actions:** `publicCloudProject:apiovh:volume/backup/delete`

Deletes the backup.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string (uuid) | yes | Id |
| `projectId` | path | string | yes | Project ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.blockStorage.Backup | successful operation |
| 404 | object | Error 404 response |
| 409 | object | Error 409 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Computed hash representing the current target specification value |
| `createdAt` | string (date-time) | read-only | Creation date of the backup |
| `currentState` | publicCloud.blockStorage.BackupCurrentState | read-only | Current observed state of the backup from the infrastructure |
| `currentState.capabilities` | publicCloud.blockStorage.BackupCapability[] | read-only | Per-action availability for the current backup state |
| `currentState.capabilities[].enabled` | boolean | read-only | Whether the action can currently be performed |
| `currentState.capabilities[].name` | publicCloud.blockStorage.BackupCapabilityNameEnum | read-only | Action the capability refers to — one of `CREATE_VOLUME`, `DELETE`, `RENAME`, `RESTORE_TO_VOLUME` |
| `currentState.capabilities[].reason` | publicCloud.blockStorage.BackupCapabilityReasonEnum | read-only | Why the action is disabled. Null when `enabled` is true. — one of `HAS_DEPENDENT_BACKUPS`, `INVALID_STATUS` |
| `currentState.description` | string | read-only | Backup description |
| `currentState.encryption` | publicCloud.blockStorage.BlockEncryption | read-only | Encryption of the source volume at backup time. Null when `volumeType` is null and the backup records no customer key, or when the backup cannot be read. |
| `currentState.encryption.enabled` | boolean | yes | Whether the volume is encrypted at rest with LUKS |
| `currentState.encryption.kms` | publicCloud.blockStorage.BlockEncryptionKms |  | Customer-managed OVH Key Management Service (OKMS) key used to encrypt the volume. When omitted and enabled is true, the volume is encrypted with an OVH-managed key (OMK). Ignored (must be absent) when enabled is false. Immutable after creation. |
| `currentState.location` | publicCloud.common.Location | read-only | Current location |
| `currentState.location.availabilityZone` | string |  | Availability zone within the region |
| `currentState.location.region` | string | yes | Region code |
| `currentState.name` | string | read-only | Current backup name |
| `currentState.size` | integer | read-only | Size of the backup in GB |
| `currentState.status` | publicCloud.blockStorage.BackupStatusEnum | read-only | Backup status on the infrastructure — one of `AVAILABLE`, `CREATING`, `DELETED`, `DELETING`, `ERROR`, `ERROR_DELETING`, `ERROR_RESTORING`, `RESTORING`, `UNMANAGING` |
| `currentState.volumeId` | string (uuid) | read-only | Identifier of the source volume |
| `currentState.volumeType` | publicCloud.blockStorage.VolumeTypeEnum | read-only | Volume type of the source volume at backup time. Null when the backup did not record it, when the type has no API value, or when the backup cannot be read. — one of `CLASSIC`, `HIGH_SPEED`, `HIGH_SPEED_GEN2` |
| `currentTasks` | common.CurrentTask[] | read-only | Ongoing asynchronous tasks related to the backup |
| `currentTasks[].errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `currentTasks[].errors[].message` | string | read-only | Error description |
| `currentTasks[].id` | string (uuid) | read-only | Identifier of the current task |
| `currentTasks[].link` | string | read-only | Link to the task details |
| `currentTasks[].status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `currentTasks[].type` | string | read-only | Type of the current task |
| `id` | string (uuid) | read-only | Unique identifier of the backup |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Backup readiness in the system — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | publicCloud.blockStorage.BackupTargetSpec | read-only | Last target specification of the backup |
| `targetSpec.description` | string |  | Desired backup description |
| `targetSpec.location` | publicCloud.common.Location | yes | Target location |
| `targetSpec.location.availabilityZone` | string |  | Availability zone within the region |
| `targetSpec.location.region` | string | yes | Region code |
| `targetSpec.name` | string | yes | Desired backup name |
| `targetSpec.volumeId` | string (uuid) | yes | Identifier of the source volume to backup |
| `updatedAt` | string (date-time) | read-only | Last update date of the backup |

```json
{
  "checksum": "string",
  "createdAt": "2024-01-01T12:00:00Z",
  "currentState": {
    "capabilities": [
      {
        "enabled": true,
        "name": "CREATE_VOLUME",
        "reason": "HAS_DEPENDENT_BACKUPS"
      }
    ],
    "description": "string",
    "encryption": {
      "enabled": true,
      "kms": {
        "domainId": "00000000-0000-0000-0000-000000000000",
        "serviceKeyId": "00000000-0000-0000-0000-000000000000"
      }
    },
    "location": {
      "availabilityZone": "string",
      "region": "string"
    },
    "name": "string",
    "size": 0,
    "status": "AVAILABLE",
    "volumeId": "00000000-0000-0000-0000-000000000000",
    "volumeType": "CLASSIC"
  },
  "currentTasks": [
    {
      "errors": [
        {
          "message": "string"
        }
      ],
      "id": "00000000-0000-0000-0000-000000000000",
      "link": "string",
      "status": "ERROR",
      "type": "string"
    }
  ],
  "id": "00000000-0000-0000-0000-000000000000",
  "resourceStatus": "CREATING",
  "targetSpec": {
    "description": "string",
    "location": {
      "availabilityZone": "string",
      "region": "string"
    },
    "name": "string",
    "volumeId": "00000000-0000-0000-0000-000000000000"
  },
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/storage/block/backup/{id}" \
  -H "accept: application/json" \
  -H "X-Schemas-Version: 2026-06" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/v2/publicCloud/project/{projectId}/storage/block/backup/{id}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/v2/publicCloud/project/{projectId}/storage/block/backup/{id}");

print_r($result);
?>
```

## Update a backup

`PUT /v2/publicCloud/project/{projectId}/storage/block/backup/{id}`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/storage/volume-backup/#editVolumeBackup

**Status:** Stable production version  
**IAM actions:** `publicCloudProject:apiovh:volume/backup/edit`

Updates the backup name and description. Send the current checksum to prevent overwriting a concurrent change.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string (uuid) | yes | Id |
| `projectId` | path | string | yes | Project ID |

### Request body (required)

Type: `publicCloud.blockStorage.BackupUpdate`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string |  | Optional concurrency-control checksum. When supplied, it must match the resource's current checksum or the request is rejected with a 409 checksum-mismatch conflict. When omitted or empty, the concurrency check is skipped and the write is forced (last-write-wins). |
| `targetSpec` | publicCloud.blockStorage.BackupUpdateTargetSpec | yes | Desired target specification for the backup |
| `targetSpec.description` | string |  | Desired backup description |
| `targetSpec.name` | string |  | Desired backup name |

```json
{
  "checksum": "string",
  "targetSpec": {
    "description": "string",
    "name": "string"
  }
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.blockStorage.Backup | successful operation |
| 404 | object | Error 404 response |
| 409 | object | Error 409 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Computed hash representing the current target specification value |
| `createdAt` | string (date-time) | read-only | Creation date of the backup |
| `currentState` | publicCloud.blockStorage.BackupCurrentState | read-only | Current observed state of the backup from the infrastructure |
| `currentState.capabilities` | publicCloud.blockStorage.BackupCapability[] | read-only | Per-action availability for the current backup state |
| `currentState.capabilities[].enabled` | boolean | read-only | Whether the action can currently be performed |
| `currentState.capabilities[].name` | publicCloud.blockStorage.BackupCapabilityNameEnum | read-only | Action the capability refers to — one of `CREATE_VOLUME`, `DELETE`, `RENAME`, `RESTORE_TO_VOLUME` |
| `currentState.capabilities[].reason` | publicCloud.blockStorage.BackupCapabilityReasonEnum | read-only | Why the action is disabled. Null when `enabled` is true. — one of `HAS_DEPENDENT_BACKUPS`, `INVALID_STATUS` |
| `currentState.description` | string | read-only | Backup description |
| `currentState.encryption` | publicCloud.blockStorage.BlockEncryption | read-only | Encryption of the source volume at backup time. Null when `volumeType` is null and the backup records no customer key, or when the backup cannot be read. |
| `currentState.encryption.enabled` | boolean | yes | Whether the volume is encrypted at rest with LUKS |
| `currentState.encryption.kms` | publicCloud.blockStorage.BlockEncryptionKms |  | Customer-managed OVH Key Management Service (OKMS) key used to encrypt the volume. When omitted and enabled is true, the volume is encrypted with an OVH-managed key (OMK). Ignored (must be absent) when enabled is false. Immutable after creation. |
| `currentState.location` | publicCloud.common.Location | read-only | Current location |
| `currentState.location.availabilityZone` | string |  | Availability zone within the region |
| `currentState.location.region` | string | yes | Region code |
| `currentState.name` | string | read-only | Current backup name |
| `currentState.size` | integer | read-only | Size of the backup in GB |
| `currentState.status` | publicCloud.blockStorage.BackupStatusEnum | read-only | Backup status on the infrastructure — one of `AVAILABLE`, `CREATING`, `DELETED`, `DELETING`, `ERROR`, `ERROR_DELETING`, `ERROR_RESTORING`, `RESTORING`, `UNMANAGING` |
| `currentState.volumeId` | string (uuid) | read-only | Identifier of the source volume |
| `currentState.volumeType` | publicCloud.blockStorage.VolumeTypeEnum | read-only | Volume type of the source volume at backup time. Null when the backup did not record it, when the type has no API value, or when the backup cannot be read. — one of `CLASSIC`, `HIGH_SPEED`, `HIGH_SPEED_GEN2` |
| `currentTasks` | common.CurrentTask[] | read-only | Ongoing asynchronous tasks related to the backup |
| `currentTasks[].errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `currentTasks[].errors[].message` | string | read-only | Error description |
| `currentTasks[].id` | string (uuid) | read-only | Identifier of the current task |
| `currentTasks[].link` | string | read-only | Link to the task details |
| `currentTasks[].status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `currentTasks[].type` | string | read-only | Type of the current task |
| `id` | string (uuid) | read-only | Unique identifier of the backup |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Backup readiness in the system — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | publicCloud.blockStorage.BackupTargetSpec | read-only | Last target specification of the backup |
| `targetSpec.description` | string |  | Desired backup description |
| `targetSpec.location` | publicCloud.common.Location | yes | Target location |
| `targetSpec.location.availabilityZone` | string |  | Availability zone within the region |
| `targetSpec.location.region` | string | yes | Region code |
| `targetSpec.name` | string | yes | Desired backup name |
| `targetSpec.volumeId` | string (uuid) | yes | Identifier of the source volume to backup |
| `updatedAt` | string (date-time) | read-only | Last update date of the backup |

```json
{
  "checksum": "string",
  "createdAt": "2024-01-01T12:00:00Z",
  "currentState": {
    "capabilities": [
      {
        "enabled": true,
        "name": "CREATE_VOLUME",
        "reason": "HAS_DEPENDENT_BACKUPS"
      }
    ],
    "description": "string",
    "encryption": {
      "enabled": true,
      "kms": {
        "domainId": "00000000-0000-0000-0000-000000000000",
        "serviceKeyId": "00000000-0000-0000-0000-000000000000"
      }
    },
    "location": {
      "availabilityZone": "string",
      "region": "string"
    },
    "name": "string",
    "size": 0,
    "status": "AVAILABLE",
    "volumeId": "00000000-0000-0000-0000-000000000000",
    "volumeType": "CLASSIC"
  },
  "currentTasks": [
    {
      "errors": [
        {
          "message": "string"
        }
      ],
      "id": "00000000-0000-0000-0000-000000000000",
      "link": "string",
      "status": "ERROR",
      "type": "string"
    }
  ],
  "id": "00000000-0000-0000-0000-000000000000",
  "resourceStatus": "CREATING",
  "targetSpec": {
    "description": "string",
    "location": {
      "availabilityZone": "string",
      "region": "string"
    },
    "name": "string",
    "volumeId": "00000000-0000-0000-0000-000000000000"
  },
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/storage/block/backup/{id}" \
  -H "accept: application/json" \
  -H "X-Schemas-Version: 2026-06" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: publicCloud.blockStorage.BackupUpdate
result = client.put("/v2/publicCloud/project/{projectId}/storage/block/backup/{id}",
	checksum = None, # Optional concurrency-control checksum. When supplied, it must match the resource's current checksum or the request is rejected with a 409 checksum-mismatch conflict. When omitted or empty, the concurrency check is skipped and the write is forced (last-write-wins). (type: string, nullable)
	targetSpec = None, # Desired target specification for the backup (type: publicCloud.blockStorage.BackupUpdateTargetSpec)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: publicCloud.blockStorage.BackupUpdate
$result = $ovh->put("/v2/publicCloud/project/{projectId}/storage/block/backup/{id}", array(
	checksum => null, // Optional concurrency-control checksum. When supplied, it must match the resource's current checksum or the request is rejected with a 409 checksum-mismatch conflict. When omitted or empty, the concurrency check is skipped and the write is forced (last-write-wins). (type: string, nullable)
	targetSpec => null, // Desired target specification for the backup (type: publicCloud.blockStorage.BackupUpdateTargetSpec)
));

print_r($result);
?>
```
