# Private Cloud › Managed VMware › Managed VMware vSphere › Backup & Replication › Veeam Managed Backup API

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

> 25 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/private-cloud/managed-vmware/managed-vmware-vsphere/backup-replication/veeam-managed-backup/

OpenAPI v1: https://api.eu.ovhcloud.com/1.0/__schemas/developer-hub-navigation/private-cloud/managed-vmware/managed-vmware-vsphere/backup-replication/veeam-managed-backup.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/private-cloud/managed-vmware/managed-vmware-vsphere/backup-replication/veeam-managed-backup.json?format=openapi3

## Operations

- `GET /dedicatedCloud/{serviceName}/backupRepository` — List backup repositories
- `GET /dedicatedCloud/{serviceName}/backupRepository/{repositoryId}` — Get a backup repository
- `GET /dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup` — Get the backup option
- `POST /dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup/batchRestore` — Restore the last backups
- `GET /dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup/canOptimizeProxies` — Get backup proxy recommendations
- `POST /dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup/changeProperties` — Update the backup option
- `POST /dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup/disable` — Disable the backup option
- `POST /dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup/enable` — Enable the backup option
- `POST /dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup/generateReport` — Send a backup report
- `GET /dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup/offerCapabilities` — List backup offers
- `POST /dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup/optimizeProxies` — Optimize backup proxies
- `GET /dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backupRepository` — List datacenter backup repositories
- `GET /dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backupRepository/{repositoryId}` — Get a backup repository
- `POST /dedicatedCloud/{serviceName}/datacenter/{datacenterId}/checkBackupJobs` — Check backup jobs
- `GET /dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/backupJob` — Get a VM backup job
- `POST /dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/backupJob` — Update a VM backup job
- `POST /dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/backupJob/disable` — Disable a VM backup job
- `POST /dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/backupJob/enable` — Enable a VM backup job
- `GET /dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/backupJob/restorePoints` — List VM restore points
- `GET /dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/backupJob/restorePoints/{restorePointId}` — Get a VM restore point
- `POST /dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/backupJob/restorePoints/{restorePointId}/restore` — Restore a VM restore point
- `POST /dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/disableBackup` — Disable VM backup
- `POST /dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/editBackup` — Update VM backup days
- `POST /dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/enableBackup` — Enable VM backup
- `POST /dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/restoreBackup` — Restore a VM backup

## List backup repositories

`GET /1.0/dedicatedCloud/{serviceName}/backupRepository`

Link: https://developers.eu.ovhcloud.com/reference/private-cloud/managed-vmware/managed-vmware-vsphere/backup-replication/veeam-managed-backup/#get-dedicatedcloud-servicename-backuprepository

**Status:** Stable production version  
**IAM actions:** `pccVMware:apiovh:backupRepository/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Domain of the service |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | integer[] | successful operation |

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/dedicatedCloud/{serviceName}/backupRepository" \
  -H "accept: application/json" \
  -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("/dedicatedCloud/{serviceName}/backupRepository")

# 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("/dedicatedCloud/{serviceName}/backupRepository");

print_r($result);
?>
```

## Get a backup repository

`GET /1.0/dedicatedCloud/{serviceName}/backupRepository/{repositoryId}`

Link: https://developers.eu.ovhcloud.com/reference/private-cloud/managed-vmware/managed-vmware-vsphere/backup-replication/veeam-managed-backup/#get-dedicatedcloud-servicename-backuprepository-repositoryid

**Status:** Stable production version  
**IAM actions:** `pccVMware:apiovh:backupRepository/get`

Get a backup repository. Returns the backup repository: name, replication zone, replication status and last successful replication date.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `repositoryId` | path | integer | yes | Repository Id |
| `serviceName` | path | string | yes | Domain of the service |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicatedCloud.BackupRepository | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `lastSuccessfulReplicationDate` | string (date-time) | read-only | Replication last successful date |
| `replication` | dedicatedCloud.option.StateEnum | read-only | Replication status — one of `disabled`, `disabling`, `enabled`, `enabling`, `error`, `migrating`, `unknown` |
| `replicationZone` | string | read-only | Replication zone |
| `repositoryId` | integer | read-only | Repository Id |
| `repositoryName` | string | read-only | Repository Name |
| `syncStatus` | dedicatedCloud.backup.ReplicationSyncStatus | read-only | Replication sync status — one of `ok`, `out-of-sync`, `sync-required`, `unknown` |

```json
{
  "lastSuccessfulReplicationDate": "2024-01-01T12:00:00Z",
  "replication": "disabled",
  "replicationZone": "string",
  "repositoryId": 0,
  "repositoryName": "string",
  "syncStatus": "ok"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/dedicatedCloud/{serviceName}/backupRepository/{repositoryId}" \
  -H "accept: application/json" \
  -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("/dedicatedCloud/{serviceName}/backupRepository/{repositoryId}")

# 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("/dedicatedCloud/{serviceName}/backupRepository/{repositoryId}");

print_r($result);
?>
```

## Get the backup option

`GET /1.0/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup`

Link: https://developers.eu.ovhcloud.com/reference/private-cloud/managed-vmware/managed-vmware-vsphere/backup-replication/veeam-managed-backup/#get-dedicatedcloud-servicename-datacenter-datacenterid-backup

**Status:** Stable production version  
**IAM actions:** `pccVMware:apiovh:datacenter/backup/get`

Get the backup option. Returns the backup option of the datacenter: offer, state, schedule hour, encryption and report settings.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `datacenterId` | path | integer | yes | Id of the Datacenter |
| `serviceName` | path | string | yes | Domain of the service |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicatedCloud.Backup | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `backupDurationInReport` | boolean | read-only | Duration on email report |
| `backupOffer` | dedicatedCloud.backup.OfferTypeEnum | read-only | Backup offer type — one of `advanced`, `backup`, `classic`, `legacy`, `premium` |
| `backupSizeInReport` | boolean | read-only | Backup size on day on email report |
| `diskSizeInReport` | boolean | read-only | Disk size on mail report |
| `encryption` | boolean | read-only | Backup is encrypted |
| `fullDayInReport` | boolean | read-only | Full day on mail report |
| `hostname` | string | read-only | Name of the backup server virtual machine. |
| `mailAddress` | string | read-only | Unique additional email address for backup daily report |
| `replicationZone` | string | read-only | Backup replication zone |
| `restorePointInReport` | boolean | read-only | RestorePoint number on mail report |
| `scheduleHour` | time | read-only | Schedule hour for start backup |
| `state` | dedicatedCloud.BackupStateEnum | read-only | This Backup current state — one of `disabled`, `disabling`, `enabled`, `enabling`, `error`, `migrating`, `removing` |
| `vmwareVmId` | string | read-only | The moref of the backup server virtual machine |

```json
{
  "backupDurationInReport": true,
  "backupOffer": "advanced",
  "backupSizeInReport": true,
  "diskSizeInReport": true,
  "encryption": true,
  "fullDayInReport": true,
  "hostname": "string",
  "mailAddress": "string",
  "replicationZone": "string",
  "restorePointInReport": true,
  "scheduleHour": "15:04:05",
  "state": "disabled",
  "vmwareVmId": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup" \
  -H "accept: application/json" \
  -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("/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/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("/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup");

print_r($result);
?>
```

## Restore the last backups

`POST /1.0/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup/batchRestore`

Link: https://developers.eu.ovhcloud.com/reference/private-cloud/managed-vmware/managed-vmware-vsphere/backup-replication/veeam-managed-backup/#post-dedicatedcloud-servicename-datacenter-datacenterid-backup-batchrestore

**Status:** Stable production version  
**IAM actions:** `pccVMware:apiovh:datacenter/backup/batchRestore`

Restore the last backups. Restores each backup job, or a single virtual machine, from its last restore point. Find the repository and job names in the report sent by `generateReport`. Returns a task to track progress.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `datacenterId` | path | integer | yes | Id of the Datacenter |
| `serviceName` | path | string | yes | Domain of the service |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `backupJobName` | string |  | The backup job name pcc-XXX-XXX-XXX-XXX_vm-XXX if you want to restore one single virtual machine. It can be retrieved in the report sent by generateReport |
| `backupRepositoryName` | string | yes | The backup files location name bkp-XXXXX, it can be retrieved in the report sent by generateReport |

```json
{
  "backupJobName": "string",
  "backupRepositoryName": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicatedCloud.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdBy` | string | read-only | Creator of the task |
| `createdFrom` | string | read-only | Origin of the task |
| `datacenterId` | integer | read-only | datacenterId of the associated dedicatedCloud.Datacenter object |
| `description` | string | read-only | Current progress description |
| `endDate` | string (date-time) | read-only | Task end date |
| `executionDate` | string (date-time) | read-only | Task execution date |
| `filerId` | integer | read-only | filerId of the associated dedicatedCloud.Filer object |
| `hostId` | integer | read-only | hostId of the associated dedicatedCloud.Host object |
| `lastModificationDate` | string (date-time) | read-only | Task last modification date |
| `maintenanceDateFrom` | string (date-time) | read-only | Maintenance task min allowed execution date |
| `maintenanceDateTo` | string (date-time) | read-only | Maintenance task max allowed execution date |
| `name` | string | read-only | Task name |
| `network` | string | read-only | network of the associated dedicatedCloud.Ip object |
| `networkAccessId` | integer | read-only | networkAccessId of the associated dedicatedCloud.AllowedNetwork object |
| `orderId` | integer | read-only | orderId of the associated billing.Order object |
| `parentTaskId` | integer | read-only | taskId of the parent dedicatedCloud.Task object |
| `progress` | integer | read-only | Current progress |
| `state` | dedicatedCloud.TaskStateEnum | read-only | Current Task state — one of `canceled`, `doing`, `done`, `error`, `fixing`, `toCancel`, `toCreate`, `todo`, `unknown`, `waitingForChilds`, `waitingTodo` |
| `taskId` | integer | read-only | Task id |
| `type` | string | read-only | Task type |
| `userId` | integer | read-only | userId of the associated dedicatedCloud.User object |
| `vlanId` | integer | read-only | vlanId of the parent dedicatedCloud.Vlan object |

```json
{
  "createdBy": "string",
  "createdFrom": "string",
  "datacenterId": 0,
  "description": "string",
  "endDate": "2024-01-01T12:00:00Z",
  "executionDate": "2024-01-01T12:00:00Z",
  "filerId": 0,
  "hostId": 0,
  "lastModificationDate": "2024-01-01T12:00:00Z",
  "maintenanceDateFrom": "2024-01-01T12:00:00Z",
  "maintenanceDateTo": "2024-01-01T12:00:00Z",
  "name": "string",
  "network": "string",
  "networkAccessId": 0,
  "orderId": 0,
  "parentTaskId": 0,
  "progress": 0,
  "state": "canceled",
  "taskId": 0,
  "type": "string",
  "userId": 0,
  "vlanId": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup/batchRestore" \
  -H "accept: application/json" \
  -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
)

result = client.post("/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup/batchRestore",
	backupJobName = None, # The backup job name pcc-XXX-XXX-XXX-XXX_vm-XXX if you want to restore one single virtual machine. It can be retrieved in the report sent by generateReport (type: string, nullable)
	backupRepositoryName = None, # The backup files location name bkp-XXXXX, it can be retrieved in the report sent by generateReport (type: string)
)

# 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->post("/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup/batchRestore", array(
	backupJobName => null, // The backup job name pcc-XXX-XXX-XXX-XXX_vm-XXX if you want to restore one single virtual machine. It can be retrieved in the report sent by generateReport (type: string, nullable)
	backupRepositoryName => null, // The backup files location name bkp-XXXXX, it can be retrieved in the report sent by generateReport (type: string)
));

print_r($result);
?>
```

## Get backup proxy recommendations

`GET /1.0/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup/canOptimizeProxies`

Link: https://developers.eu.ovhcloud.com/reference/private-cloud/managed-vmware/managed-vmware-vsphere/backup-replication/veeam-managed-backup/#get-dedicatedcloud-servicename-datacenter-datacenterid-backup-canoptimizeproxies

**Status:** Stable production version  
**IAM actions:** `pccVMware:apiovh:datacenter/backup/canOptimizeProxies/get`

Get backup proxy recommendations. Returns a recommendation to add or remove backup proxies, with the number of proxies deployed and impacted.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `datacenterId` | path | integer | yes | Id of the Datacenter |
| `serviceName` | path | string | yes | Domain of the service |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicatedCloud.backup.OptimizeProxies | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `message` | dedicatedCloud.backup.OptimizeMessageEnum |  | Brief information about recommendation — one of `hasMoreBackupJobs`, `hasMoreProxies`, `hasSufficientProxies`, `noBackupJobs` |
| `numberOfProxiesDeployed` | integer |  | Number of proxies deployed in the Datacenter |
| `numberOfProxiesImpact` | integer |  | Number of proxies get impacted by recommendation |
| `recommendation` | dedicatedCloud.backup.OptimizeRecommendationEnum |  | Action recommended for the optimization — one of `add`, `optimized`, `remove` |

```json
{
  "message": "hasMoreBackupJobs",
  "numberOfProxiesDeployed": 0,
  "numberOfProxiesImpact": 0,
  "recommendation": "add"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup/canOptimizeProxies" \
  -H "accept: application/json" \
  -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("/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup/canOptimizeProxies")

# 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("/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup/canOptimizeProxies");

print_r($result);
?>
```

## Update the backup option

`POST /1.0/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup/changeProperties`

Link: https://developers.eu.ovhcloud.com/reference/private-cloud/managed-vmware/managed-vmware-vsphere/backup-replication/veeam-managed-backup/#post-dedicatedcloud-servicename-datacenter-datacenterid-backup-changeproperties

**Status:** Stable production version  
**IAM actions:** `pccVMware:apiovh:datacenter/backup/changeProperties`

Update the backup option. Changes the backup offer, the schedule hour (UTC) and the additional email address for the daily report. Returns a task to track progress.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `datacenterId` | path | integer | yes | Id of the Datacenter |
| `serviceName` | path | string | yes | Domain of the service |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `backupDurationInReport` | boolean |  | Deprecated - Duration on email report |
| `backupOffer` | dedicatedCloud.backup.OfferTypeEnum | yes | Backup offer type — one of `advanced`, `backup`, `classic`, `legacy`, `premium` |
| `backupSizeInReport` | boolean |  | Deprecated - Backup size on day on email report |
| `diskSizeInReport` | boolean |  | Deprecated - Disk size on mail report |
| `fullDayInReport` | boolean |  | Deprecated - Full day on mail report |
| `mailAddress` | string |  | Unique additional email address for backup daily report |
| `restorePointInReport` | boolean |  | Deprecated - RestorePoint number on mail report |
| `scheduleHour` | time |  | Schedule hour for start backup. UTC Timezone |

```json
{
  "backupDurationInReport": true,
  "backupOffer": "advanced",
  "backupSizeInReport": true,
  "diskSizeInReport": true,
  "fullDayInReport": true,
  "mailAddress": "string",
  "restorePointInReport": true,
  "scheduleHour": "15:04:05"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicatedCloud.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdBy` | string | read-only | Creator of the task |
| `createdFrom` | string | read-only | Origin of the task |
| `datacenterId` | integer | read-only | datacenterId of the associated dedicatedCloud.Datacenter object |
| `description` | string | read-only | Current progress description |
| `endDate` | string (date-time) | read-only | Task end date |
| `executionDate` | string (date-time) | read-only | Task execution date |
| `filerId` | integer | read-only | filerId of the associated dedicatedCloud.Filer object |
| `hostId` | integer | read-only | hostId of the associated dedicatedCloud.Host object |
| `lastModificationDate` | string (date-time) | read-only | Task last modification date |
| `maintenanceDateFrom` | string (date-time) | read-only | Maintenance task min allowed execution date |
| `maintenanceDateTo` | string (date-time) | read-only | Maintenance task max allowed execution date |
| `name` | string | read-only | Task name |
| `network` | string | read-only | network of the associated dedicatedCloud.Ip object |
| `networkAccessId` | integer | read-only | networkAccessId of the associated dedicatedCloud.AllowedNetwork object |
| `orderId` | integer | read-only | orderId of the associated billing.Order object |
| `parentTaskId` | integer | read-only | taskId of the parent dedicatedCloud.Task object |
| `progress` | integer | read-only | Current progress |
| `state` | dedicatedCloud.TaskStateEnum | read-only | Current Task state — one of `canceled`, `doing`, `done`, `error`, `fixing`, `toCancel`, `toCreate`, `todo`, `unknown`, `waitingForChilds`, `waitingTodo` |
| `taskId` | integer | read-only | Task id |
| `type` | string | read-only | Task type |
| `userId` | integer | read-only | userId of the associated dedicatedCloud.User object |
| `vlanId` | integer | read-only | vlanId of the parent dedicatedCloud.Vlan object |

```json
{
  "createdBy": "string",
  "createdFrom": "string",
  "datacenterId": 0,
  "description": "string",
  "endDate": "2024-01-01T12:00:00Z",
  "executionDate": "2024-01-01T12:00:00Z",
  "filerId": 0,
  "hostId": 0,
  "lastModificationDate": "2024-01-01T12:00:00Z",
  "maintenanceDateFrom": "2024-01-01T12:00:00Z",
  "maintenanceDateTo": "2024-01-01T12:00:00Z",
  "name": "string",
  "network": "string",
  "networkAccessId": 0,
  "orderId": 0,
  "parentTaskId": 0,
  "progress": 0,
  "state": "canceled",
  "taskId": 0,
  "type": "string",
  "userId": 0,
  "vlanId": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup/changeProperties" \
  -H "accept: application/json" \
  -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
)

result = client.post("/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup/changeProperties",
	backupDurationInReport = None, # Deprecated - Duration on email report (type: boolean, nullable)
	backupOffer = None, # Backup offer type (type: dedicatedCloud.backup.OfferTypeEnum)
	backupSizeInReport = None, # Deprecated - Backup size on day on email report (type: boolean, nullable)
	diskSizeInReport = None, # Deprecated - Disk size on mail report (type: boolean, nullable)
	fullDayInReport = None, # Deprecated - Full day on mail report (type: boolean, nullable)
	mailAddress = None, # Unique additional email address for backup daily report (type: string, nullable)
	restorePointInReport = None, # Deprecated - RestorePoint number on mail report (type: boolean, nullable)
	scheduleHour = None, # Schedule hour for start backup. UTC Timezone (type: time, nullable)
)

# 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->post("/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup/changeProperties", array(
	backupDurationInReport => null, // Deprecated - Duration on email report (type: boolean, nullable)
	backupOffer => null, // Backup offer type (type: dedicatedCloud.backup.OfferTypeEnum)
	backupSizeInReport => null, // Deprecated - Backup size on day on email report (type: boolean, nullable)
	diskSizeInReport => null, // Deprecated - Disk size on mail report (type: boolean, nullable)
	fullDayInReport => null, // Deprecated - Full day on mail report (type: boolean, nullable)
	mailAddress => null, // Unique additional email address for backup daily report (type: string, nullable)
	restorePointInReport => null, // Deprecated - RestorePoint number on mail report (type: boolean, nullable)
	scheduleHour => null, // Schedule hour for start backup. UTC Timezone (type: time, nullable)
));

print_r($result);
?>
```

## Disable the backup option

`POST /1.0/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup/disable`

Link: https://developers.eu.ovhcloud.com/reference/private-cloud/managed-vmware/managed-vmware-vsphere/backup-replication/veeam-managed-backup/#post-dedicatedcloud-servicename-datacenter-datacenterid-backup-disable

**Status:** Stable production version  
**IAM actions:** `pccVMware:apiovh:datacenter/backup/disable`

Disable the backup option. Disables the backup option of the datacenter. Returns a task to track progress.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `datacenterId` | path | integer | yes | Id of the Datacenter |
| `serviceName` | path | string | yes | Domain of the service |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicatedCloud.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdBy` | string | read-only | Creator of the task |
| `createdFrom` | string | read-only | Origin of the task |
| `datacenterId` | integer | read-only | datacenterId of the associated dedicatedCloud.Datacenter object |
| `description` | string | read-only | Current progress description |
| `endDate` | string (date-time) | read-only | Task end date |
| `executionDate` | string (date-time) | read-only | Task execution date |
| `filerId` | integer | read-only | filerId of the associated dedicatedCloud.Filer object |
| `hostId` | integer | read-only | hostId of the associated dedicatedCloud.Host object |
| `lastModificationDate` | string (date-time) | read-only | Task last modification date |
| `maintenanceDateFrom` | string (date-time) | read-only | Maintenance task min allowed execution date |
| `maintenanceDateTo` | string (date-time) | read-only | Maintenance task max allowed execution date |
| `name` | string | read-only | Task name |
| `network` | string | read-only | network of the associated dedicatedCloud.Ip object |
| `networkAccessId` | integer | read-only | networkAccessId of the associated dedicatedCloud.AllowedNetwork object |
| `orderId` | integer | read-only | orderId of the associated billing.Order object |
| `parentTaskId` | integer | read-only | taskId of the parent dedicatedCloud.Task object |
| `progress` | integer | read-only | Current progress |
| `state` | dedicatedCloud.TaskStateEnum | read-only | Current Task state — one of `canceled`, `doing`, `done`, `error`, `fixing`, `toCancel`, `toCreate`, `todo`, `unknown`, `waitingForChilds`, `waitingTodo` |
| `taskId` | integer | read-only | Task id |
| `type` | string | read-only | Task type |
| `userId` | integer | read-only | userId of the associated dedicatedCloud.User object |
| `vlanId` | integer | read-only | vlanId of the parent dedicatedCloud.Vlan object |

```json
{
  "createdBy": "string",
  "createdFrom": "string",
  "datacenterId": 0,
  "description": "string",
  "endDate": "2024-01-01T12:00:00Z",
  "executionDate": "2024-01-01T12:00:00Z",
  "filerId": 0,
  "hostId": 0,
  "lastModificationDate": "2024-01-01T12:00:00Z",
  "maintenanceDateFrom": "2024-01-01T12:00:00Z",
  "maintenanceDateTo": "2024-01-01T12:00:00Z",
  "name": "string",
  "network": "string",
  "networkAccessId": 0,
  "orderId": 0,
  "parentTaskId": 0,
  "progress": 0,
  "state": "canceled",
  "taskId": 0,
  "type": "string",
  "userId": 0,
  "vlanId": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup/disable" \
  -H "accept: application/json" \
  -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.post("/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup/disable")

# 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->post("/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup/disable");

print_r($result);
?>
```

## Enable the backup option

`POST /1.0/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup/enable`

Link: https://developers.eu.ovhcloud.com/reference/private-cloud/managed-vmware/managed-vmware-vsphere/backup-replication/veeam-managed-backup/#post-dedicatedcloud-servicename-datacenter-datacenterid-backup-enable

**Status:** Deprecated, will be removed  
**Deprecated** since 2019-06-01, removed on 2019-07-01; use `/order/cart/{cartId}/privateCloud` instead.  
**IAM actions:** `pccVMware:apiovh:datacenter/backup/enable`

Enable the backup option. Enables the backup option with the given offer. Deprecated: order the option with `/order/cart/{cartId}/privateCloud` instead.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `datacenterId` | path | integer | yes | Id of the Datacenter |
| `serviceName` | path | string | yes | Domain of the service |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `backupOffer` | dedicatedCloud.backup.OfferTypeEnum |  | Backup offer type — one of `advanced`, `backup`, `classic`, `legacy`, `premium` |

```json
{
  "backupOffer": "advanced"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicatedCloud.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdBy` | string | read-only | Creator of the task |
| `createdFrom` | string | read-only | Origin of the task |
| `datacenterId` | integer | read-only | datacenterId of the associated dedicatedCloud.Datacenter object |
| `description` | string | read-only | Current progress description |
| `endDate` | string (date-time) | read-only | Task end date |
| `executionDate` | string (date-time) | read-only | Task execution date |
| `filerId` | integer | read-only | filerId of the associated dedicatedCloud.Filer object |
| `hostId` | integer | read-only | hostId of the associated dedicatedCloud.Host object |
| `lastModificationDate` | string (date-time) | read-only | Task last modification date |
| `maintenanceDateFrom` | string (date-time) | read-only | Maintenance task min allowed execution date |
| `maintenanceDateTo` | string (date-time) | read-only | Maintenance task max allowed execution date |
| `name` | string | read-only | Task name |
| `network` | string | read-only | network of the associated dedicatedCloud.Ip object |
| `networkAccessId` | integer | read-only | networkAccessId of the associated dedicatedCloud.AllowedNetwork object |
| `orderId` | integer | read-only | orderId of the associated billing.Order object |
| `parentTaskId` | integer | read-only | taskId of the parent dedicatedCloud.Task object |
| `progress` | integer | read-only | Current progress |
| `state` | dedicatedCloud.TaskStateEnum | read-only | Current Task state — one of `canceled`, `doing`, `done`, `error`, `fixing`, `toCancel`, `toCreate`, `todo`, `unknown`, `waitingForChilds`, `waitingTodo` |
| `taskId` | integer | read-only | Task id |
| `type` | string | read-only | Task type |
| `userId` | integer | read-only | userId of the associated dedicatedCloud.User object |
| `vlanId` | integer | read-only | vlanId of the parent dedicatedCloud.Vlan object |

```json
{
  "createdBy": "string",
  "createdFrom": "string",
  "datacenterId": 0,
  "description": "string",
  "endDate": "2024-01-01T12:00:00Z",
  "executionDate": "2024-01-01T12:00:00Z",
  "filerId": 0,
  "hostId": 0,
  "lastModificationDate": "2024-01-01T12:00:00Z",
  "maintenanceDateFrom": "2024-01-01T12:00:00Z",
  "maintenanceDateTo": "2024-01-01T12:00:00Z",
  "name": "string",
  "network": "string",
  "networkAccessId": 0,
  "orderId": 0,
  "parentTaskId": 0,
  "progress": 0,
  "state": "canceled",
  "taskId": 0,
  "type": "string",
  "userId": 0,
  "vlanId": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup/enable" \
  -H "accept: application/json" \
  -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: dedicatedCloud.backup.OfferTypeEnum
result = client.post("/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup/enable",
	backupOffer = None, # Backup offer type (type: dedicatedCloud.backup.OfferTypeEnum, nullable)
)

# 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: dedicatedCloud.backup.OfferTypeEnum
$result = $ovh->post("/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup/enable", array(
	backupOffer => null, // Backup offer type (type: dedicatedCloud.backup.OfferTypeEnum, nullable)
));

print_r($result);
?>
```

## Send a backup report

`POST /1.0/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup/generateReport`

Link: https://developers.eu.ovhcloud.com/reference/private-cloud/managed-vmware/managed-vmware-vsphere/backup-replication/veeam-managed-backup/#post-dedicatedcloud-servicename-datacenter-datacenterid-backup-generatereport

**Status:** Stable production version  
**IAM actions:** `pccVMware:apiovh:datacenter/backup/generateReport`

Send a backup report. Sends a report with all backup information by email. Returns a task to track progress.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `datacenterId` | path | integer | yes | Id of the Datacenter |
| `serviceName` | path | string | yes | Domain of the service |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicatedCloud.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdBy` | string | read-only | Creator of the task |
| `createdFrom` | string | read-only | Origin of the task |
| `datacenterId` | integer | read-only | datacenterId of the associated dedicatedCloud.Datacenter object |
| `description` | string | read-only | Current progress description |
| `endDate` | string (date-time) | read-only | Task end date |
| `executionDate` | string (date-time) | read-only | Task execution date |
| `filerId` | integer | read-only | filerId of the associated dedicatedCloud.Filer object |
| `hostId` | integer | read-only | hostId of the associated dedicatedCloud.Host object |
| `lastModificationDate` | string (date-time) | read-only | Task last modification date |
| `maintenanceDateFrom` | string (date-time) | read-only | Maintenance task min allowed execution date |
| `maintenanceDateTo` | string (date-time) | read-only | Maintenance task max allowed execution date |
| `name` | string | read-only | Task name |
| `network` | string | read-only | network of the associated dedicatedCloud.Ip object |
| `networkAccessId` | integer | read-only | networkAccessId of the associated dedicatedCloud.AllowedNetwork object |
| `orderId` | integer | read-only | orderId of the associated billing.Order object |
| `parentTaskId` | integer | read-only | taskId of the parent dedicatedCloud.Task object |
| `progress` | integer | read-only | Current progress |
| `state` | dedicatedCloud.TaskStateEnum | read-only | Current Task state — one of `canceled`, `doing`, `done`, `error`, `fixing`, `toCancel`, `toCreate`, `todo`, `unknown`, `waitingForChilds`, `waitingTodo` |
| `taskId` | integer | read-only | Task id |
| `type` | string | read-only | Task type |
| `userId` | integer | read-only | userId of the associated dedicatedCloud.User object |
| `vlanId` | integer | read-only | vlanId of the parent dedicatedCloud.Vlan object |

```json
{
  "createdBy": "string",
  "createdFrom": "string",
  "datacenterId": 0,
  "description": "string",
  "endDate": "2024-01-01T12:00:00Z",
  "executionDate": "2024-01-01T12:00:00Z",
  "filerId": 0,
  "hostId": 0,
  "lastModificationDate": "2024-01-01T12:00:00Z",
  "maintenanceDateFrom": "2024-01-01T12:00:00Z",
  "maintenanceDateTo": "2024-01-01T12:00:00Z",
  "name": "string",
  "network": "string",
  "networkAccessId": 0,
  "orderId": 0,
  "parentTaskId": 0,
  "progress": 0,
  "state": "canceled",
  "taskId": 0,
  "type": "string",
  "userId": 0,
  "vlanId": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup/generateReport" \
  -H "accept: application/json" \
  -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.post("/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup/generateReport")

# 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->post("/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup/generateReport");

print_r($result);
?>
```

## List backup offers

`GET /1.0/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup/offerCapabilities`

Link: https://developers.eu.ovhcloud.com/reference/private-cloud/managed-vmware/managed-vmware-vsphere/backup-replication/veeam-managed-backup/#get-dedicatedcloud-servicename-datacenter-datacenterid-backup-offercapabilities

**Status:** Stable production version  
**IAM actions:** `pccVMware:apiovh:datacenter/backup/offerCapabilities/get`

List backup offers. Returns the features of each backup offer: retention, encryption, replication, backup days and report options.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `datacenterId` | path | integer | yes | Id of the Datacenter |
| `serviceName` | path | string | yes | Domain of the service |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicatedCloud.backup.BackupCapabilities[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `backupDays` | boolean |  | Customized backup days |
| `customReport` | boolean |  | Customized Backup report |
| `dedicatedProxy` | boolean |  | Indicates additional backup proxy for large disk size VM |
| `encryption` | boolean |  | Indicates if backup will be encrypted |
| `mailAddress` | boolean |  | Indicates if customer can add an additional email address for backup report |
| `minimumFullBackups` | integer |  | Minimum number of full backups |
| `offerName` | string |  | Name of offer type |
| `proxyPerHost` | boolean |  | Backup Proxy per host |
| `replication` | boolean |  | Backup Replication enabled |
| `retention` | integer |  | Restore points |
| `scheduleHour` | boolean |  | Scheduled hour of backup start customizable |

```json
[
  {
    "backupDays": true,
    "customReport": true,
    "dedicatedProxy": true,
    "encryption": true,
    "mailAddress": true,
    "minimumFullBackups": 0,
    "offerName": "string",
    "proxyPerHost": true,
    "replication": true,
    "retention": 0,
    "scheduleHour": true
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup/offerCapabilities" \
  -H "accept: application/json" \
  -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("/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup/offerCapabilities")

# 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("/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup/offerCapabilities");

print_r($result);
?>
```

## Optimize backup proxies

`POST /1.0/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup/optimizeProxies`

Link: https://developers.eu.ovhcloud.com/reference/private-cloud/managed-vmware/managed-vmware-vsphere/backup-replication/veeam-managed-backup/#post-dedicatedcloud-servicename-datacenter-datacenterid-backup-optimizeproxies

**Status:** Stable production version  
**IAM actions:** `pccVMware:apiovh:datacenter/backup/optimizeProxies`

Optimize backup proxies. Optimizes the number of backup proxies of the datacenter. Returns a task to track progress.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `datacenterId` | path | integer | yes | Id of the Datacenter |
| `serviceName` | path | string | yes | Domain of the service |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicatedCloud.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdBy` | string | read-only | Creator of the task |
| `createdFrom` | string | read-only | Origin of the task |
| `datacenterId` | integer | read-only | datacenterId of the associated dedicatedCloud.Datacenter object |
| `description` | string | read-only | Current progress description |
| `endDate` | string (date-time) | read-only | Task end date |
| `executionDate` | string (date-time) | read-only | Task execution date |
| `filerId` | integer | read-only | filerId of the associated dedicatedCloud.Filer object |
| `hostId` | integer | read-only | hostId of the associated dedicatedCloud.Host object |
| `lastModificationDate` | string (date-time) | read-only | Task last modification date |
| `maintenanceDateFrom` | string (date-time) | read-only | Maintenance task min allowed execution date |
| `maintenanceDateTo` | string (date-time) | read-only | Maintenance task max allowed execution date |
| `name` | string | read-only | Task name |
| `network` | string | read-only | network of the associated dedicatedCloud.Ip object |
| `networkAccessId` | integer | read-only | networkAccessId of the associated dedicatedCloud.AllowedNetwork object |
| `orderId` | integer | read-only | orderId of the associated billing.Order object |
| `parentTaskId` | integer | read-only | taskId of the parent dedicatedCloud.Task object |
| `progress` | integer | read-only | Current progress |
| `state` | dedicatedCloud.TaskStateEnum | read-only | Current Task state — one of `canceled`, `doing`, `done`, `error`, `fixing`, `toCancel`, `toCreate`, `todo`, `unknown`, `waitingForChilds`, `waitingTodo` |
| `taskId` | integer | read-only | Task id |
| `type` | string | read-only | Task type |
| `userId` | integer | read-only | userId of the associated dedicatedCloud.User object |
| `vlanId` | integer | read-only | vlanId of the parent dedicatedCloud.Vlan object |

```json
{
  "createdBy": "string",
  "createdFrom": "string",
  "datacenterId": 0,
  "description": "string",
  "endDate": "2024-01-01T12:00:00Z",
  "executionDate": "2024-01-01T12:00:00Z",
  "filerId": 0,
  "hostId": 0,
  "lastModificationDate": "2024-01-01T12:00:00Z",
  "maintenanceDateFrom": "2024-01-01T12:00:00Z",
  "maintenanceDateTo": "2024-01-01T12:00:00Z",
  "name": "string",
  "network": "string",
  "networkAccessId": 0,
  "orderId": 0,
  "parentTaskId": 0,
  "progress": 0,
  "state": "canceled",
  "taskId": 0,
  "type": "string",
  "userId": 0,
  "vlanId": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup/optimizeProxies" \
  -H "accept: application/json" \
  -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.post("/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup/optimizeProxies")

# 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->post("/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup/optimizeProxies");

print_r($result);
?>
```

## List datacenter backup repositories

`GET /1.0/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backupRepository`

Link: https://developers.eu.ovhcloud.com/reference/private-cloud/managed-vmware/managed-vmware-vsphere/backup-replication/veeam-managed-backup/#get-dedicatedcloud-servicename-datacenter-datacenterid-backuprepository

**Status:** Deprecated, will be removed  
**Deprecated** since 2022-10-01, removed on 2023-07-01; use `/dedicatedCloud/{serviceName}/backupRepository` instead.  
**IAM actions:** `pccVMware:apiovh:datacenter/backupRepository/get`

List datacenter backup repositories. Returns the IDs of the backup repositories of the datacenter. Deprecated: use `/dedicatedCloud/{serviceName}/backupRepository` instead.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `datacenterId` | path | integer | yes | Id of the Datacenter |
| `serviceName` | path | string | yes | Domain of the service |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | integer[] | successful operation |

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backupRepository" \
  -H "accept: application/json" \
  -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("/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backupRepository")

# 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("/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backupRepository");

print_r($result);
?>
```

## Get a backup repository

`GET /1.0/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backupRepository/{repositoryId}`

Link: https://developers.eu.ovhcloud.com/reference/private-cloud/managed-vmware/managed-vmware-vsphere/backup-replication/veeam-managed-backup/#get-dedicatedcloud-servicename-datacenter-datacenterid-backuprepository-repositoryid

**Status:** Deprecated, will be removed  
**Deprecated** since 2022-10-01, removed on 2023-07-01; use `/dedicatedCloud/{serviceName}/backupRepository/{repositoryId}` instead.  
**IAM actions:** `pccVMware:apiovh:datacenter/backupRepository/get`

Get a backup repository. Returns the backup repository: name, replication zone, replication status and last successful replication date.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `datacenterId` | path | integer | yes | Id of the Datacenter |
| `repositoryId` | path | integer | yes | Repository Id |
| `serviceName` | path | string | yes | Domain of the service |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicatedCloud.BackupRepository | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `lastSuccessfulReplicationDate` | string (date-time) | read-only | Replication last successful date |
| `replication` | dedicatedCloud.option.StateEnum | read-only | Replication status — one of `disabled`, `disabling`, `enabled`, `enabling`, `error`, `migrating`, `unknown` |
| `replicationZone` | string | read-only | Replication zone |
| `repositoryId` | integer | read-only | Repository Id |
| `repositoryName` | string | read-only | Repository Name |
| `syncStatus` | dedicatedCloud.backup.ReplicationSyncStatus | read-only | Replication sync status — one of `ok`, `out-of-sync`, `sync-required`, `unknown` |

```json
{
  "lastSuccessfulReplicationDate": "2024-01-01T12:00:00Z",
  "replication": "disabled",
  "replicationZone": "string",
  "repositoryId": 0,
  "repositoryName": "string",
  "syncStatus": "ok"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backupRepository/{repositoryId}" \
  -H "accept: application/json" \
  -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("/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backupRepository/{repositoryId}")

# 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("/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backupRepository/{repositoryId}");

print_r($result);
?>
```

## Check backup jobs

`POST /1.0/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/checkBackupJobs`

Link: https://developers.eu.ovhcloud.com/reference/private-cloud/managed-vmware/managed-vmware-vsphere/backup-replication/veeam-managed-backup/#post-dedicatedcloud-servicename-datacenter-datacenterid-checkbackupjobs

**Status:** Stable production version  
**IAM actions:** `pccVMware:apiovh:datacenter/checkBackupJobs`

Check backup jobs. Checks that the backup jobs of the datacenter are set correctly after virtual machines moved to another datacenter. Returns a task to track progress.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `datacenterId` | path | integer | yes | Id of the Datacenter |
| `serviceName` | path | string | yes | Domain of the service |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicatedCloud.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdBy` | string | read-only | Creator of the task |
| `createdFrom` | string | read-only | Origin of the task |
| `datacenterId` | integer | read-only | datacenterId of the associated dedicatedCloud.Datacenter object |
| `description` | string | read-only | Current progress description |
| `endDate` | string (date-time) | read-only | Task end date |
| `executionDate` | string (date-time) | read-only | Task execution date |
| `filerId` | integer | read-only | filerId of the associated dedicatedCloud.Filer object |
| `hostId` | integer | read-only | hostId of the associated dedicatedCloud.Host object |
| `lastModificationDate` | string (date-time) | read-only | Task last modification date |
| `maintenanceDateFrom` | string (date-time) | read-only | Maintenance task min allowed execution date |
| `maintenanceDateTo` | string (date-time) | read-only | Maintenance task max allowed execution date |
| `name` | string | read-only | Task name |
| `network` | string | read-only | network of the associated dedicatedCloud.Ip object |
| `networkAccessId` | integer | read-only | networkAccessId of the associated dedicatedCloud.AllowedNetwork object |
| `orderId` | integer | read-only | orderId of the associated billing.Order object |
| `parentTaskId` | integer | read-only | taskId of the parent dedicatedCloud.Task object |
| `progress` | integer | read-only | Current progress |
| `state` | dedicatedCloud.TaskStateEnum | read-only | Current Task state — one of `canceled`, `doing`, `done`, `error`, `fixing`, `toCancel`, `toCreate`, `todo`, `unknown`, `waitingForChilds`, `waitingTodo` |
| `taskId` | integer | read-only | Task id |
| `type` | string | read-only | Task type |
| `userId` | integer | read-only | userId of the associated dedicatedCloud.User object |
| `vlanId` | integer | read-only | vlanId of the parent dedicatedCloud.Vlan object |

```json
{
  "createdBy": "string",
  "createdFrom": "string",
  "datacenterId": 0,
  "description": "string",
  "endDate": "2024-01-01T12:00:00Z",
  "executionDate": "2024-01-01T12:00:00Z",
  "filerId": 0,
  "hostId": 0,
  "lastModificationDate": "2024-01-01T12:00:00Z",
  "maintenanceDateFrom": "2024-01-01T12:00:00Z",
  "maintenanceDateTo": "2024-01-01T12:00:00Z",
  "name": "string",
  "network": "string",
  "networkAccessId": 0,
  "orderId": 0,
  "parentTaskId": 0,
  "progress": 0,
  "state": "canceled",
  "taskId": 0,
  "type": "string",
  "userId": 0,
  "vlanId": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/checkBackupJobs" \
  -H "accept: application/json" \
  -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.post("/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/checkBackupJobs")

# 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->post("/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/checkBackupJobs");

print_r($result);
?>
```

## Get a VM backup job

`GET /1.0/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/backupJob`

Link: https://developers.eu.ovhcloud.com/reference/private-cloud/managed-vmware/managed-vmware-vsphere/backup-replication/veeam-managed-backup/#get-dedicatedcloud-servicename-datacenter-datacenterid-vm-vmid-backupjob

**Status:** Deprecated, will be removed  
**Deprecated** since 2017-10-03, removed on 2018-01-01; use `/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}` instead.  
**IAM actions:** `pccVMware:apiovh:datacenter/vm/backupJob/get`

Get a VM backup job. Returns the backup job of the virtual machine: offer, backup days, retention and state. Deprecated: use the backup data of the virtual machine instead.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `datacenterId` | path | integer | yes | Id of the Datacenter |
| `serviceName` | path | string | yes | Domain of the service |
| `vmId` | path | integer | yes | Id of the virtual machine. |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicatedCloud.BackupJob | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `allocatedDisk` | number | read-only | Disk space allocated to the virtual machine |
| `backupDays` | dedicatedCloud.backup.BackupDaysEnum[] | read-only | List of days your Virtual Machine will be backuped |
| `encryption` | boolean | read-only | Backup is encrypted |
| `offerType` | dedicatedCloud.backup.OfferTypeEnum | read-only | Offer type of the backup job — one of `advanced`, `backup`, `classic`, `legacy`, `premium` |
| `retentionTime` | integer | read-only | Number of days before the backup is deleted |
| `state` | dedicatedCloud.backup.StateEnum | read-only | State of the backup job — one of `deleting`, `delivered`, `disabled`, `disabling`, `enabling`, `error`, `migrating`, `pending`, `removed`, `stopping`, `toCreate`, `toDelete`, … |
| `vmName` | string | read-only | Name of the virtual Machine |

```json
{
  "allocatedDisk": 0,
  "backupDays": [
    "Friday"
  ],
  "encryption": true,
  "offerType": "advanced",
  "retentionTime": 0,
  "state": "deleting",
  "vmName": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/backupJob" \
  -H "accept: application/json" \
  -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("/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/backupJob")

# 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("/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/backupJob");

print_r($result);
?>
```

## Update a VM backup job

`POST /1.0/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/backupJob`

Link: https://developers.eu.ovhcloud.com/reference/private-cloud/managed-vmware/managed-vmware-vsphere/backup-replication/veeam-managed-backup/#post-dedicatedcloud-servicename-datacenter-datacenterid-vm-vmid-backupjob

**Status:** Deprecated, will be removed  
**Deprecated** since 2017-10-03, removed on 2018-01-01; use `/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}` instead.  
**IAM actions:** `pccVMware:apiovh:datacenter/vm/backupJob/create`

Update a VM backup job. Changes the backup days of the virtual machine. Deprecated: use the backup routes of the virtual machine instead.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `datacenterId` | path | integer | yes | Id of the Datacenter |
| `serviceName` | path | string | yes | Domain of the service |
| `vmId` | path | integer | yes | Id of the virtual machine. |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `backupDays` | dedicatedCloud.backup.BackupDaysEnum[] | yes | List of days your Virtual Machine will be backuped |

```json
{
  "backupDays": [
    "Friday"
  ]
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicatedCloud.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdBy` | string | read-only | Creator of the task |
| `createdFrom` | string | read-only | Origin of the task |
| `datacenterId` | integer | read-only | datacenterId of the associated dedicatedCloud.Datacenter object |
| `description` | string | read-only | Current progress description |
| `endDate` | string (date-time) | read-only | Task end date |
| `executionDate` | string (date-time) | read-only | Task execution date |
| `filerId` | integer | read-only | filerId of the associated dedicatedCloud.Filer object |
| `hostId` | integer | read-only | hostId of the associated dedicatedCloud.Host object |
| `lastModificationDate` | string (date-time) | read-only | Task last modification date |
| `maintenanceDateFrom` | string (date-time) | read-only | Maintenance task min allowed execution date |
| `maintenanceDateTo` | string (date-time) | read-only | Maintenance task max allowed execution date |
| `name` | string | read-only | Task name |
| `network` | string | read-only | network of the associated dedicatedCloud.Ip object |
| `networkAccessId` | integer | read-only | networkAccessId of the associated dedicatedCloud.AllowedNetwork object |
| `orderId` | integer | read-only | orderId of the associated billing.Order object |
| `parentTaskId` | integer | read-only | taskId of the parent dedicatedCloud.Task object |
| `progress` | integer | read-only | Current progress |
| `state` | dedicatedCloud.TaskStateEnum | read-only | Current Task state — one of `canceled`, `doing`, `done`, `error`, `fixing`, `toCancel`, `toCreate`, `todo`, `unknown`, `waitingForChilds`, `waitingTodo` |
| `taskId` | integer | read-only | Task id |
| `type` | string | read-only | Task type |
| `userId` | integer | read-only | userId of the associated dedicatedCloud.User object |
| `vlanId` | integer | read-only | vlanId of the parent dedicatedCloud.Vlan object |

```json
{
  "createdBy": "string",
  "createdFrom": "string",
  "datacenterId": 0,
  "description": "string",
  "endDate": "2024-01-01T12:00:00Z",
  "executionDate": "2024-01-01T12:00:00Z",
  "filerId": 0,
  "hostId": 0,
  "lastModificationDate": "2024-01-01T12:00:00Z",
  "maintenanceDateFrom": "2024-01-01T12:00:00Z",
  "maintenanceDateTo": "2024-01-01T12:00:00Z",
  "name": "string",
  "network": "string",
  "networkAccessId": 0,
  "orderId": 0,
  "parentTaskId": 0,
  "progress": 0,
  "state": "canceled",
  "taskId": 0,
  "type": "string",
  "userId": 0,
  "vlanId": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/backupJob" \
  -H "accept: application/json" \
  -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: dedicatedCloud.backup.BackupDaysEnum[]
result = client.post("/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/backupJob",
	backupDays = None, # List of days your Virtual Machine will be backuped (type: dedicatedCloud.backup.BackupDaysEnum[])
)

# 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: dedicatedCloud.backup.BackupDaysEnum[]
$result = $ovh->post("/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/backupJob", array(
	backupDays => null, // List of days your Virtual Machine will be backuped (type: dedicatedCloud.backup.BackupDaysEnum[])
));

print_r($result);
?>
```

## Disable a VM backup job

`POST /1.0/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/backupJob/disable`

Link: https://developers.eu.ovhcloud.com/reference/private-cloud/managed-vmware/managed-vmware-vsphere/backup-replication/veeam-managed-backup/#post-dedicatedcloud-servicename-datacenter-datacenterid-vm-vmid-backupjob-disable

**Status:** Deprecated, will be removed  
**Deprecated** since 2017-10-03, removed on 2018-01-01; use `/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}` instead.  
**IAM actions:** `pccVMware:apiovh:datacenter/vm/backupJob/disable`

Disable a VM backup job. Stops the backups of the virtual machine. Deprecated: use the backup routes of the virtual machine instead.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `datacenterId` | path | integer | yes | Id of the Datacenter |
| `serviceName` | path | string | yes | Domain of the service |
| `vmId` | path | integer | yes | Id of the virtual machine. |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicatedCloud.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdBy` | string | read-only | Creator of the task |
| `createdFrom` | string | read-only | Origin of the task |
| `datacenterId` | integer | read-only | datacenterId of the associated dedicatedCloud.Datacenter object |
| `description` | string | read-only | Current progress description |
| `endDate` | string (date-time) | read-only | Task end date |
| `executionDate` | string (date-time) | read-only | Task execution date |
| `filerId` | integer | read-only | filerId of the associated dedicatedCloud.Filer object |
| `hostId` | integer | read-only | hostId of the associated dedicatedCloud.Host object |
| `lastModificationDate` | string (date-time) | read-only | Task last modification date |
| `maintenanceDateFrom` | string (date-time) | read-only | Maintenance task min allowed execution date |
| `maintenanceDateTo` | string (date-time) | read-only | Maintenance task max allowed execution date |
| `name` | string | read-only | Task name |
| `network` | string | read-only | network of the associated dedicatedCloud.Ip object |
| `networkAccessId` | integer | read-only | networkAccessId of the associated dedicatedCloud.AllowedNetwork object |
| `orderId` | integer | read-only | orderId of the associated billing.Order object |
| `parentTaskId` | integer | read-only | taskId of the parent dedicatedCloud.Task object |
| `progress` | integer | read-only | Current progress |
| `state` | dedicatedCloud.TaskStateEnum | read-only | Current Task state — one of `canceled`, `doing`, `done`, `error`, `fixing`, `toCancel`, `toCreate`, `todo`, `unknown`, `waitingForChilds`, `waitingTodo` |
| `taskId` | integer | read-only | Task id |
| `type` | string | read-only | Task type |
| `userId` | integer | read-only | userId of the associated dedicatedCloud.User object |
| `vlanId` | integer | read-only | vlanId of the parent dedicatedCloud.Vlan object |

```json
{
  "createdBy": "string",
  "createdFrom": "string",
  "datacenterId": 0,
  "description": "string",
  "endDate": "2024-01-01T12:00:00Z",
  "executionDate": "2024-01-01T12:00:00Z",
  "filerId": 0,
  "hostId": 0,
  "lastModificationDate": "2024-01-01T12:00:00Z",
  "maintenanceDateFrom": "2024-01-01T12:00:00Z",
  "maintenanceDateTo": "2024-01-01T12:00:00Z",
  "name": "string",
  "network": "string",
  "networkAccessId": 0,
  "orderId": 0,
  "parentTaskId": 0,
  "progress": 0,
  "state": "canceled",
  "taskId": 0,
  "type": "string",
  "userId": 0,
  "vlanId": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/backupJob/disable" \
  -H "accept: application/json" \
  -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.post("/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/backupJob/disable")

# 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->post("/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/backupJob/disable");

print_r($result);
?>
```

## Enable a VM backup job

`POST /1.0/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/backupJob/enable`

Link: https://developers.eu.ovhcloud.com/reference/private-cloud/managed-vmware/managed-vmware-vsphere/backup-replication/veeam-managed-backup/#post-dedicatedcloud-servicename-datacenter-datacenterid-vm-vmid-backupjob-enable

**Status:** Deprecated, will be removed  
**Deprecated** since 2017-10-03, removed on 2018-01-01; use `/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}` instead.  
**IAM actions:** `pccVMware:apiovh:datacenter/vm/backupJob/enable`

Enable a VM backup job. Starts backing up the virtual machine on the given days. Deprecated: use the backup routes of the virtual machine instead.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `datacenterId` | path | integer | yes | Id of the Datacenter |
| `serviceName` | path | string | yes | Domain of the service |
| `vmId` | path | integer | yes | Id of the virtual machine. |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `backupDays` | dedicatedCloud.backup.BackupDaysEnum[] | yes | Backup offer type |

```json
{
  "backupDays": [
    "Friday"
  ]
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicatedCloud.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdBy` | string | read-only | Creator of the task |
| `createdFrom` | string | read-only | Origin of the task |
| `datacenterId` | integer | read-only | datacenterId of the associated dedicatedCloud.Datacenter object |
| `description` | string | read-only | Current progress description |
| `endDate` | string (date-time) | read-only | Task end date |
| `executionDate` | string (date-time) | read-only | Task execution date |
| `filerId` | integer | read-only | filerId of the associated dedicatedCloud.Filer object |
| `hostId` | integer | read-only | hostId of the associated dedicatedCloud.Host object |
| `lastModificationDate` | string (date-time) | read-only | Task last modification date |
| `maintenanceDateFrom` | string (date-time) | read-only | Maintenance task min allowed execution date |
| `maintenanceDateTo` | string (date-time) | read-only | Maintenance task max allowed execution date |
| `name` | string | read-only | Task name |
| `network` | string | read-only | network of the associated dedicatedCloud.Ip object |
| `networkAccessId` | integer | read-only | networkAccessId of the associated dedicatedCloud.AllowedNetwork object |
| `orderId` | integer | read-only | orderId of the associated billing.Order object |
| `parentTaskId` | integer | read-only | taskId of the parent dedicatedCloud.Task object |
| `progress` | integer | read-only | Current progress |
| `state` | dedicatedCloud.TaskStateEnum | read-only | Current Task state — one of `canceled`, `doing`, `done`, `error`, `fixing`, `toCancel`, `toCreate`, `todo`, `unknown`, `waitingForChilds`, `waitingTodo` |
| `taskId` | integer | read-only | Task id |
| `type` | string | read-only | Task type |
| `userId` | integer | read-only | userId of the associated dedicatedCloud.User object |
| `vlanId` | integer | read-only | vlanId of the parent dedicatedCloud.Vlan object |

```json
{
  "createdBy": "string",
  "createdFrom": "string",
  "datacenterId": 0,
  "description": "string",
  "endDate": "2024-01-01T12:00:00Z",
  "executionDate": "2024-01-01T12:00:00Z",
  "filerId": 0,
  "hostId": 0,
  "lastModificationDate": "2024-01-01T12:00:00Z",
  "maintenanceDateFrom": "2024-01-01T12:00:00Z",
  "maintenanceDateTo": "2024-01-01T12:00:00Z",
  "name": "string",
  "network": "string",
  "networkAccessId": 0,
  "orderId": 0,
  "parentTaskId": 0,
  "progress": 0,
  "state": "canceled",
  "taskId": 0,
  "type": "string",
  "userId": 0,
  "vlanId": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/backupJob/enable" \
  -H "accept: application/json" \
  -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: dedicatedCloud.backup.BackupDaysEnum[]
result = client.post("/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/backupJob/enable",
	backupDays = None, # Backup offer type (type: dedicatedCloud.backup.BackupDaysEnum[])
)

# 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: dedicatedCloud.backup.BackupDaysEnum[]
$result = $ovh->post("/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/backupJob/enable", array(
	backupDays => null, // Backup offer type (type: dedicatedCloud.backup.BackupDaysEnum[])
));

print_r($result);
?>
```

## List VM restore points

`GET /1.0/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/backupJob/restorePoints`

Link: https://developers.eu.ovhcloud.com/reference/private-cloud/managed-vmware/managed-vmware-vsphere/backup-replication/veeam-managed-backup/#get-dedicatedcloud-servicename-datacenter-datacenterid-vm-vmid-backupjob-restorepoints

**Status:** Deprecated, will be removed  
**Deprecated** since 2017-10-03, removed on 2018-01-01; use `/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}` instead.  
**IAM actions:** `pccVMware:apiovh:datacenter/vm/backupJob/restorePoints/get`

List VM restore points. Returns the IDs of the restore points of the virtual machine. Deprecated: use the backup data of the virtual machine instead.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `datacenterId` | path | integer | yes | Id of the Datacenter |
| `serviceName` | path | string | yes | Domain of the service |
| `vmId` | path | integer | yes | Id of the virtual machine. |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | integer[] | successful operation |

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/backupJob/restorePoints" \
  -H "accept: application/json" \
  -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("/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/backupJob/restorePoints")

# 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("/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/backupJob/restorePoints");

print_r($result);
?>
```

## Get a VM restore point

`GET /1.0/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/backupJob/restorePoints/{restorePointId}`

Link: https://developers.eu.ovhcloud.com/reference/private-cloud/managed-vmware/managed-vmware-vsphere/backup-replication/veeam-managed-backup/#get-dedicatedcloud-servicename-datacenter-datacenterid-vm-vmid-backupjob-restorepoints-restorepointid

**Status:** Deprecated, will be removed  
**Deprecated** since 2017-10-03, removed on 2018-01-01; use `/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}` instead.  
**IAM actions:** `pccVMware:apiovh:datacenter/vm/backupJob/restorePoints/get`

Get a VM restore point. Returns the restore point: type, size, creation time and whether it is corrupted. Deprecated: use the backup data of the virtual machine instead.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `datacenterId` | path | integer | yes | Id of the Datacenter |
| `restorePointId` | path | integer | yes | Id of the restore point. |
| `serviceName` | path | string | yes | Domain of the service |
| `vmId` | path | integer | yes | Id of the virtual machine. |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicatedCloud.RestorePoint | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creationTime` | string | read-only | Creation time of the restore point |
| `isCorrupted` | boolean | read-only | Show if the restore point is corrupted |
| `restorePointId` | integer | read-only | Id of the restore point. |
| `restorePointSize` | complexType.UnitAndValue_long | read-only | Size of the restore point |
| `restorePointSize.unit` | string |  |  |
| `restorePointSize.value` | integer |  |  |
| `type` | dedicatedCloud.backup.BackupTypeEnum | read-only | Type of the restore point — one of `full`, `incremental` |

```json
{
  "creationTime": "string",
  "isCorrupted": true,
  "restorePointId": 0,
  "restorePointSize": {
    "unit": "string",
    "value": 0
  },
  "type": "full"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/backupJob/restorePoints/{restorePointId}" \
  -H "accept: application/json" \
  -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("/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/backupJob/restorePoints/{restorePointId}")

# 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("/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/backupJob/restorePoints/{restorePointId}");

print_r($result);
?>
```

## Restore a VM restore point

`POST /1.0/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/backupJob/restorePoints/{restorePointId}/restore`

Link: https://developers.eu.ovhcloud.com/reference/private-cloud/managed-vmware/managed-vmware-vsphere/backup-replication/veeam-managed-backup/#post-dedicatedcloud-servicename-datacenter-datacenterid-vm-vmid-backupjob-restorepoints-restorepointid-restore

**Status:** Deprecated, will be removed  
**Deprecated** since 2017-10-03, removed on 2018-01-01; use `/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}` instead.  
**IAM actions:** `pccVMware:apiovh:datacenter/vm/backupJob/restorePoints/restore`

Restore a VM restore point. Restores the virtual machine from this restore point to the given datastore. Deprecated: use the backup routes of the virtual machine instead.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `datacenterId` | path | integer | yes | Id of the Datacenter |
| `restorePointId` | path | integer | yes | Id of the restore point. |
| `serviceName` | path | string | yes | Domain of the service |
| `vmId` | path | integer | yes | Id of the virtual machine. |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `filerId` | integer | yes | Id of the filer where we should restore this Backup. |

```json
{
  "filerId": 0
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicatedCloud.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdBy` | string | read-only | Creator of the task |
| `createdFrom` | string | read-only | Origin of the task |
| `datacenterId` | integer | read-only | datacenterId of the associated dedicatedCloud.Datacenter object |
| `description` | string | read-only | Current progress description |
| `endDate` | string (date-time) | read-only | Task end date |
| `executionDate` | string (date-time) | read-only | Task execution date |
| `filerId` | integer | read-only | filerId of the associated dedicatedCloud.Filer object |
| `hostId` | integer | read-only | hostId of the associated dedicatedCloud.Host object |
| `lastModificationDate` | string (date-time) | read-only | Task last modification date |
| `maintenanceDateFrom` | string (date-time) | read-only | Maintenance task min allowed execution date |
| `maintenanceDateTo` | string (date-time) | read-only | Maintenance task max allowed execution date |
| `name` | string | read-only | Task name |
| `network` | string | read-only | network of the associated dedicatedCloud.Ip object |
| `networkAccessId` | integer | read-only | networkAccessId of the associated dedicatedCloud.AllowedNetwork object |
| `orderId` | integer | read-only | orderId of the associated billing.Order object |
| `parentTaskId` | integer | read-only | taskId of the parent dedicatedCloud.Task object |
| `progress` | integer | read-only | Current progress |
| `state` | dedicatedCloud.TaskStateEnum | read-only | Current Task state — one of `canceled`, `doing`, `done`, `error`, `fixing`, `toCancel`, `toCreate`, `todo`, `unknown`, `waitingForChilds`, `waitingTodo` |
| `taskId` | integer | read-only | Task id |
| `type` | string | read-only | Task type |
| `userId` | integer | read-only | userId of the associated dedicatedCloud.User object |
| `vlanId` | integer | read-only | vlanId of the parent dedicatedCloud.Vlan object |

```json
{
  "createdBy": "string",
  "createdFrom": "string",
  "datacenterId": 0,
  "description": "string",
  "endDate": "2024-01-01T12:00:00Z",
  "executionDate": "2024-01-01T12:00:00Z",
  "filerId": 0,
  "hostId": 0,
  "lastModificationDate": "2024-01-01T12:00:00Z",
  "maintenanceDateFrom": "2024-01-01T12:00:00Z",
  "maintenanceDateTo": "2024-01-01T12:00:00Z",
  "name": "string",
  "network": "string",
  "networkAccessId": 0,
  "orderId": 0,
  "parentTaskId": 0,
  "progress": 0,
  "state": "canceled",
  "taskId": 0,
  "type": "string",
  "userId": 0,
  "vlanId": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/backupJob/restorePoints/{restorePointId}/restore" \
  -H "accept: application/json" \
  -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: long
result = client.post("/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/backupJob/restorePoints/{restorePointId}/restore",
	filerId = None, # Id of the filer where we should restore this Backup. (type: long)
)

# 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: long
$result = $ovh->post("/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/backupJob/restorePoints/{restorePointId}/restore", array(
	filerId => null, // Id of the filer where we should restore this Backup. (type: long)
));

print_r($result);
?>
```

## Disable VM backup

`POST /1.0/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/disableBackup`

Link: https://developers.eu.ovhcloud.com/reference/private-cloud/managed-vmware/managed-vmware-vsphere/backup-replication/veeam-managed-backup/#post-dedicatedcloud-servicename-datacenter-datacenterid-vm-vmid-disablebackup

**Status:** Stable production version  
**IAM actions:** `pccVMware:apiovh:datacenter/vm/disableBackup`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `datacenterId` | path | integer | yes | Id of the Datacenter |
| `serviceName` | path | string | yes | Domain of the service |
| `vmId` | path | integer | yes | Id of the virtual machine. |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicatedCloud.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdBy` | string | read-only | Creator of the task |
| `createdFrom` | string | read-only | Origin of the task |
| `datacenterId` | integer | read-only | datacenterId of the associated dedicatedCloud.Datacenter object |
| `description` | string | read-only | Current progress description |
| `endDate` | string (date-time) | read-only | Task end date |
| `executionDate` | string (date-time) | read-only | Task execution date |
| `filerId` | integer | read-only | filerId of the associated dedicatedCloud.Filer object |
| `hostId` | integer | read-only | hostId of the associated dedicatedCloud.Host object |
| `lastModificationDate` | string (date-time) | read-only | Task last modification date |
| `maintenanceDateFrom` | string (date-time) | read-only | Maintenance task min allowed execution date |
| `maintenanceDateTo` | string (date-time) | read-only | Maintenance task max allowed execution date |
| `name` | string | read-only | Task name |
| `network` | string | read-only | network of the associated dedicatedCloud.Ip object |
| `networkAccessId` | integer | read-only | networkAccessId of the associated dedicatedCloud.AllowedNetwork object |
| `orderId` | integer | read-only | orderId of the associated billing.Order object |
| `parentTaskId` | integer | read-only | taskId of the parent dedicatedCloud.Task object |
| `progress` | integer | read-only | Current progress |
| `state` | dedicatedCloud.TaskStateEnum | read-only | Current Task state — one of `canceled`, `doing`, `done`, `error`, `fixing`, `toCancel`, `toCreate`, `todo`, `unknown`, `waitingForChilds`, `waitingTodo` |
| `taskId` | integer | read-only | Task id |
| `type` | string | read-only | Task type |
| `userId` | integer | read-only | userId of the associated dedicatedCloud.User object |
| `vlanId` | integer | read-only | vlanId of the parent dedicatedCloud.Vlan object |

```json
{
  "createdBy": "string",
  "createdFrom": "string",
  "datacenterId": 0,
  "description": "string",
  "endDate": "2024-01-01T12:00:00Z",
  "executionDate": "2024-01-01T12:00:00Z",
  "filerId": 0,
  "hostId": 0,
  "lastModificationDate": "2024-01-01T12:00:00Z",
  "maintenanceDateFrom": "2024-01-01T12:00:00Z",
  "maintenanceDateTo": "2024-01-01T12:00:00Z",
  "name": "string",
  "network": "string",
  "networkAccessId": 0,
  "orderId": 0,
  "parentTaskId": 0,
  "progress": 0,
  "state": "canceled",
  "taskId": 0,
  "type": "string",
  "userId": 0,
  "vlanId": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/disableBackup" \
  -H "accept: application/json" \
  -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.post("/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/disableBackup")

# 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->post("/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/disableBackup");

print_r($result);
?>
```

## Update VM backup days

`POST /1.0/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/editBackup`

Link: https://developers.eu.ovhcloud.com/reference/private-cloud/managed-vmware/managed-vmware-vsphere/backup-replication/veeam-managed-backup/#post-dedicatedcloud-servicename-datacenter-datacenterid-vm-vmid-editbackup

**Status:** Stable production version  
**IAM actions:** `pccVMware:apiovh:datacenter/vm/editBackup`

Update VM backup days. Changes the days on which the virtual machine is backed up. Returns a task to track progress.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `datacenterId` | path | integer | yes | Id of the Datacenter |
| `serviceName` | path | string | yes | Domain of the service |
| `vmId` | path | integer | yes | Id of the virtual machine. |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `backupDays` | dedicatedCloud.backup.BackupDaysEnum[] | yes | List of days your Virtual Machine will be backuped |

```json
{
  "backupDays": [
    "Friday"
  ]
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicatedCloud.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdBy` | string | read-only | Creator of the task |
| `createdFrom` | string | read-only | Origin of the task |
| `datacenterId` | integer | read-only | datacenterId of the associated dedicatedCloud.Datacenter object |
| `description` | string | read-only | Current progress description |
| `endDate` | string (date-time) | read-only | Task end date |
| `executionDate` | string (date-time) | read-only | Task execution date |
| `filerId` | integer | read-only | filerId of the associated dedicatedCloud.Filer object |
| `hostId` | integer | read-only | hostId of the associated dedicatedCloud.Host object |
| `lastModificationDate` | string (date-time) | read-only | Task last modification date |
| `maintenanceDateFrom` | string (date-time) | read-only | Maintenance task min allowed execution date |
| `maintenanceDateTo` | string (date-time) | read-only | Maintenance task max allowed execution date |
| `name` | string | read-only | Task name |
| `network` | string | read-only | network of the associated dedicatedCloud.Ip object |
| `networkAccessId` | integer | read-only | networkAccessId of the associated dedicatedCloud.AllowedNetwork object |
| `orderId` | integer | read-only | orderId of the associated billing.Order object |
| `parentTaskId` | integer | read-only | taskId of the parent dedicatedCloud.Task object |
| `progress` | integer | read-only | Current progress |
| `state` | dedicatedCloud.TaskStateEnum | read-only | Current Task state — one of `canceled`, `doing`, `done`, `error`, `fixing`, `toCancel`, `toCreate`, `todo`, `unknown`, `waitingForChilds`, `waitingTodo` |
| `taskId` | integer | read-only | Task id |
| `type` | string | read-only | Task type |
| `userId` | integer | read-only | userId of the associated dedicatedCloud.User object |
| `vlanId` | integer | read-only | vlanId of the parent dedicatedCloud.Vlan object |

```json
{
  "createdBy": "string",
  "createdFrom": "string",
  "datacenterId": 0,
  "description": "string",
  "endDate": "2024-01-01T12:00:00Z",
  "executionDate": "2024-01-01T12:00:00Z",
  "filerId": 0,
  "hostId": 0,
  "lastModificationDate": "2024-01-01T12:00:00Z",
  "maintenanceDateFrom": "2024-01-01T12:00:00Z",
  "maintenanceDateTo": "2024-01-01T12:00:00Z",
  "name": "string",
  "network": "string",
  "networkAccessId": 0,
  "orderId": 0,
  "parentTaskId": 0,
  "progress": 0,
  "state": "canceled",
  "taskId": 0,
  "type": "string",
  "userId": 0,
  "vlanId": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/editBackup" \
  -H "accept: application/json" \
  -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: dedicatedCloud.backup.BackupDaysEnum[]
result = client.post("/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/editBackup",
	backupDays = None, # List of days your Virtual Machine will be backuped (type: dedicatedCloud.backup.BackupDaysEnum[])
)

# 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: dedicatedCloud.backup.BackupDaysEnum[]
$result = $ovh->post("/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/editBackup", array(
	backupDays => null, // List of days your Virtual Machine will be backuped (type: dedicatedCloud.backup.BackupDaysEnum[])
));

print_r($result);
?>
```

## Enable VM backup

`POST /1.0/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/enableBackup`

Link: https://developers.eu.ovhcloud.com/reference/private-cloud/managed-vmware/managed-vmware-vsphere/backup-replication/veeam-managed-backup/#post-dedicatedcloud-servicename-datacenter-datacenterid-vm-vmid-enablebackup

**Status:** Stable production version  
**IAM actions:** `pccVMware:apiovh:datacenter/vm/enableBackup`

Enable VM backup. Starts backing up the virtual machine on the given days. Returns a task to track progress.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `datacenterId` | path | integer | yes | Id of the Datacenter |
| `serviceName` | path | string | yes | Domain of the service |
| `vmId` | path | integer | yes | Id of the virtual machine. |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `backupDays` | dedicatedCloud.backup.BackupDaysEnum[] | yes | List of days your Virtual Machine will be backuped |

```json
{
  "backupDays": [
    "Friday"
  ]
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicatedCloud.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdBy` | string | read-only | Creator of the task |
| `createdFrom` | string | read-only | Origin of the task |
| `datacenterId` | integer | read-only | datacenterId of the associated dedicatedCloud.Datacenter object |
| `description` | string | read-only | Current progress description |
| `endDate` | string (date-time) | read-only | Task end date |
| `executionDate` | string (date-time) | read-only | Task execution date |
| `filerId` | integer | read-only | filerId of the associated dedicatedCloud.Filer object |
| `hostId` | integer | read-only | hostId of the associated dedicatedCloud.Host object |
| `lastModificationDate` | string (date-time) | read-only | Task last modification date |
| `maintenanceDateFrom` | string (date-time) | read-only | Maintenance task min allowed execution date |
| `maintenanceDateTo` | string (date-time) | read-only | Maintenance task max allowed execution date |
| `name` | string | read-only | Task name |
| `network` | string | read-only | network of the associated dedicatedCloud.Ip object |
| `networkAccessId` | integer | read-only | networkAccessId of the associated dedicatedCloud.AllowedNetwork object |
| `orderId` | integer | read-only | orderId of the associated billing.Order object |
| `parentTaskId` | integer | read-only | taskId of the parent dedicatedCloud.Task object |
| `progress` | integer | read-only | Current progress |
| `state` | dedicatedCloud.TaskStateEnum | read-only | Current Task state — one of `canceled`, `doing`, `done`, `error`, `fixing`, `toCancel`, `toCreate`, `todo`, `unknown`, `waitingForChilds`, `waitingTodo` |
| `taskId` | integer | read-only | Task id |
| `type` | string | read-only | Task type |
| `userId` | integer | read-only | userId of the associated dedicatedCloud.User object |
| `vlanId` | integer | read-only | vlanId of the parent dedicatedCloud.Vlan object |

```json
{
  "createdBy": "string",
  "createdFrom": "string",
  "datacenterId": 0,
  "description": "string",
  "endDate": "2024-01-01T12:00:00Z",
  "executionDate": "2024-01-01T12:00:00Z",
  "filerId": 0,
  "hostId": 0,
  "lastModificationDate": "2024-01-01T12:00:00Z",
  "maintenanceDateFrom": "2024-01-01T12:00:00Z",
  "maintenanceDateTo": "2024-01-01T12:00:00Z",
  "name": "string",
  "network": "string",
  "networkAccessId": 0,
  "orderId": 0,
  "parentTaskId": 0,
  "progress": 0,
  "state": "canceled",
  "taskId": 0,
  "type": "string",
  "userId": 0,
  "vlanId": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/enableBackup" \
  -H "accept: application/json" \
  -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: dedicatedCloud.backup.BackupDaysEnum[]
result = client.post("/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/enableBackup",
	backupDays = None, # List of days your Virtual Machine will be backuped (type: dedicatedCloud.backup.BackupDaysEnum[])
)

# 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: dedicatedCloud.backup.BackupDaysEnum[]
$result = $ovh->post("/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/enableBackup", array(
	backupDays => null, // List of days your Virtual Machine will be backuped (type: dedicatedCloud.backup.BackupDaysEnum[])
));

print_r($result);
?>
```

## Restore a VM backup

`POST /1.0/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/restoreBackup`

Link: https://developers.eu.ovhcloud.com/reference/private-cloud/managed-vmware/managed-vmware-vsphere/backup-replication/veeam-managed-backup/#post-dedicatedcloud-servicename-datacenter-datacenterid-vm-vmid-restorebackup

**Status:** Stable production version  
**IAM actions:** `pccVMware:apiovh:datacenter/vm/restoreBackup`

Restore a VM backup. Restores the virtual machine from a restore point to the given datastore, NAS by default or vSAN. Returns a task to track progress.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `datacenterId` | path | integer | yes | Id of the Datacenter |
| `serviceName` | path | string | yes | Domain of the service |
| `vmId` | path | integer | yes | Id of the virtual machine. |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `filerId` | integer | yes | Id of the filer where we should restore this Backup |
| `filerType` | dedicatedCloud.filer.FilerTypeEnum |  | Type of filer where vm will be restored(Default value : nas) — one of `nas`, `vsan` |
| `restorePointId` | integer | yes | Id of the restorePoint you want to restore |

```json
{
  "filerId": 0,
  "filerType": "nas",
  "restorePointId": 0
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | dedicatedCloud.Task | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdBy` | string | read-only | Creator of the task |
| `createdFrom` | string | read-only | Origin of the task |
| `datacenterId` | integer | read-only | datacenterId of the associated dedicatedCloud.Datacenter object |
| `description` | string | read-only | Current progress description |
| `endDate` | string (date-time) | read-only | Task end date |
| `executionDate` | string (date-time) | read-only | Task execution date |
| `filerId` | integer | read-only | filerId of the associated dedicatedCloud.Filer object |
| `hostId` | integer | read-only | hostId of the associated dedicatedCloud.Host object |
| `lastModificationDate` | string (date-time) | read-only | Task last modification date |
| `maintenanceDateFrom` | string (date-time) | read-only | Maintenance task min allowed execution date |
| `maintenanceDateTo` | string (date-time) | read-only | Maintenance task max allowed execution date |
| `name` | string | read-only | Task name |
| `network` | string | read-only | network of the associated dedicatedCloud.Ip object |
| `networkAccessId` | integer | read-only | networkAccessId of the associated dedicatedCloud.AllowedNetwork object |
| `orderId` | integer | read-only | orderId of the associated billing.Order object |
| `parentTaskId` | integer | read-only | taskId of the parent dedicatedCloud.Task object |
| `progress` | integer | read-only | Current progress |
| `state` | dedicatedCloud.TaskStateEnum | read-only | Current Task state — one of `canceled`, `doing`, `done`, `error`, `fixing`, `toCancel`, `toCreate`, `todo`, `unknown`, `waitingForChilds`, `waitingTodo` |
| `taskId` | integer | read-only | Task id |
| `type` | string | read-only | Task type |
| `userId` | integer | read-only | userId of the associated dedicatedCloud.User object |
| `vlanId` | integer | read-only | vlanId of the parent dedicatedCloud.Vlan object |

```json
{
  "createdBy": "string",
  "createdFrom": "string",
  "datacenterId": 0,
  "description": "string",
  "endDate": "2024-01-01T12:00:00Z",
  "executionDate": "2024-01-01T12:00:00Z",
  "filerId": 0,
  "hostId": 0,
  "lastModificationDate": "2024-01-01T12:00:00Z",
  "maintenanceDateFrom": "2024-01-01T12:00:00Z",
  "maintenanceDateTo": "2024-01-01T12:00:00Z",
  "name": "string",
  "network": "string",
  "networkAccessId": 0,
  "orderId": 0,
  "parentTaskId": 0,
  "progress": 0,
  "state": "canceled",
  "taskId": 0,
  "type": "string",
  "userId": 0,
  "vlanId": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/restoreBackup" \
  -H "accept: application/json" \
  -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: long
result = client.post("/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/restoreBackup",
	filerId = None, # Id of the filer where we should restore this Backup (type: long)
	filerType = None, # Type of filer where vm will be restored(Default value : nas) (type: dedicatedCloud.filer.FilerTypeEnum, nullable)
	restorePointId = None, # Id of the restorePoint you want to restore (type: long)
)

# 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: long
$result = $ovh->post("/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/restoreBackup", array(
	filerId => null, // Id of the filer where we should restore this Backup (type: long)
	filerType => null, // Type of filer where vm will be restored(Default value : nas) (type: dedicatedCloud.filer.FilerTypeEnum, nullable)
	restorePointId => null, // Id of the restorePoint you want to restore (type: long)
));

print_r($result);
?>
```
