# Bare Metal Cloud › VPS › Backups API

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

> 13 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/bare-metal-cloud/vps/backups/

OpenAPI v1: https://api.eu.ovhcloud.com/1.0/__schemas/developer-hub-navigation/bare-metal-cloud/vps/backups.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/bare-metal-cloud/vps/backups.json?format=openapi3

## Operations

- `GET /vps/{serviceName}/automatedBackup/restorePoints` — List available restore points for the automated backup
- `GET /vps/{serviceName}/automatedBackup/attachedBackup` — List backups currently attached to this VPS
- `GET /vps/{serviceName}/snapshot` — Retrieve information about the current VPS snapshot
- `GET /vps/{serviceName}/snapshot/download` — Generate a download URL for the VPS snapshot
- `GET /vps/{serviceName}/automatedBackup` — Retrieve automated backup settings for this VPS
- `POST /vps/{serviceName}/createSnapshot` — Create a snapshot of this VPS (requires the snapshot option and no existing snapshot); returns an asynchronous task
- `POST /vps/{serviceName}/abortSnapshot` — Abort an ongoing snapshot or automated backup operation for this VPS
- `POST /vps/{serviceName}/snapshot/revert` — Revert this VPS to the specified snapshot and return an asynchronous task
- `POST /vps/{serviceName}/automatedBackup/reschedule` — Change the scheduled time of the daily automated backup and return an asynchronous task
- `POST /vps/{serviceName}/automatedBackup/restore` — Restore this VPS from a given restore point and return an asynchronous task
- `POST /vps/{serviceName}/automatedBackup/detachBackup` — Unmount a restored backup from this VPS and return an asynchronous task
- `DELETE /vps/{serviceName}/snapshot` — Delete the VPS snapshot and return an asynchronous task
- `PUT /vps/{serviceName}/snapshot` — Update the VPS snapshot properties

## List available restore points for the automated backup

`GET /1.0/vps/{serviceName}/automatedBackup/restorePoints`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/vps/backups/#getVpsAutomatedBackupRestorePoints

**Status:** Stable production version  
**IAM actions:** `vps:apiovh:automatedBackup/restorePoints/get`

Returns the restore points available for the automated backup of the VPS.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |
| `state` | query | vps.RestoreStateEnum | yes | The state of the restore point — one of `available`, `restored`, `restoring` |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | string (date-time)[] | successful operation |

```json
[
  "2024-01-01T12:00:00Z"
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/vps/{serviceName}/automatedBackup/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("/vps/{serviceName}/automatedBackup/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("/vps/{serviceName}/automatedBackup/restorePoints");

print_r($result);
?>
```

## List backups currently attached to this VPS

`GET /1.0/vps/{serviceName}/automatedBackup/attachedBackup`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/vps/backups/#getVpsAutomatedBackupAttached

**Status:** Stable production version  
**IAM actions:** `vps:apiovh:automatedBackup/attachedBackup/get`

Returns the backups currently attached to the VPS, with their restore point and access settings.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | vps.automatedBackup.Attached[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `access` | vps.automatedBackup.attached.Infos | read-only | A structure describing a backup's access informations |
| `access.additionalDisk` | string | read-only | Additional Disk details |
| `access.nfs` | string | read-only | NFS URL of the backup |
| `access.smb` | string | read-only | SMB URL of the backup |
| `restorePoint` | string (date-time) | read-only |  |

```json
[
  {
    "access": {
      "additionalDisk": "string",
      "nfs": "string",
      "smb": "string"
    },
    "restorePoint": "2024-01-01T12:00:00Z"
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/vps/{serviceName}/automatedBackup/attachedBackup" \
  -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("/vps/{serviceName}/automatedBackup/attachedBackup")

# 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("/vps/{serviceName}/automatedBackup/attachedBackup");

print_r($result);
?>
```

## Retrieve information about the current VPS snapshot

`GET /1.0/vps/{serviceName}/snapshot`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/vps/backups/#getVpsSnapshot

**Status:** Stable production version  
**IAM actions:** `vps:apiovh:snapshot/get`

Returns the ID, creation date, description and region of the snapshot of the VPS.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | vps.Snapshot | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creationDate` | string (date-time) | read-only |  |
| `description` | string |  |  |
| `id` | string | read-only |  |
| `region` | string | read-only |  |

```json
{
  "creationDate": "2024-01-01T12:00:00Z",
  "description": "string",
  "id": "string",
  "region": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/vps/{serviceName}/snapshot" \
  -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("/vps/{serviceName}/snapshot")

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

print_r($result);
?>
```

## Generate a download URL for the VPS snapshot

`GET /1.0/vps/{serviceName}/snapshot/download`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/vps/backups/#downloadVpsSnapshot

**Status:** Stable production version  
**IAM actions:** `vps:apiovh:snapshot/download/get`

Returns the URL and the size of the snapshot to download.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | vps.DownloadSnapshotURL | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `size` | integer | read-only | Snapshot size (bytes) |
| `url` | string | read-only | URL to download the snapshot |

```json
{
  "size": 0,
  "url": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/vps/{serviceName}/snapshot/download" \
  -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("/vps/{serviceName}/snapshot/download")

# 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("/vps/{serviceName}/snapshot/download");

print_r($result);
?>
```

## Retrieve automated backup settings for this VPS

`GET /1.0/vps/{serviceName}/automatedBackup`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/vps/backups/#getVpsAutomatedBackup

**Status:** Stable production version  
**IAM actions:** `vps:apiovh:automatedBackup/get`

Returns whether the automated backup is enabled, its rotation and the time of the daily backup.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | vps.AutomatedBackup | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `rotation` | integer | read-only | Number of rotation of your daily backup |
| `schedule` | time | read-only | Scheduled time of your daily backup |
| `serviceResourceName` | string | read-only | Resource name of the service of your automated backup |
| `state` | vps.BackupStateEnum | read-only | Backup state — one of `disabled`, `enabled` |

```json
{
  "rotation": 0,
  "schedule": "15:04:05",
  "serviceResourceName": "string",
  "state": "disabled"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/vps/{serviceName}/automatedBackup" \
  -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("/vps/{serviceName}/automatedBackup")

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

print_r($result);
?>
```

## Create a snapshot of this VPS (requires the snapshot option and no existing snapshot); returns an asynchronous task

`POST /1.0/vps/{serviceName}/createSnapshot`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/vps/backups/#createVpsSnapshot

**Status:** Stable production version  
**IAM actions:** `vps:apiovh:snapshot/create`

Creates a snapshot of the VPS and returns the task that performs it. The snapshot option must be active and no snapshot can exist.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |

### Request body (required)

Type: `vps.createSnapshot.post`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `description` | string |  | A textual description for your snapshot |

```json
{
  "description": "string"
}
```

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `date` | string (date-time) | read-only |  |
| `id` | integer | read-only |  |
| `progress` | integer | read-only |  |
| `state` | vps.TaskStateEnum | read-only | All states a VPS task can be in — one of `blocked`, `cancelled`, `doing`, `done`, `error`, `paused`, `todo`, `waitingAck` |
| `type` | vps.TaskTypeEnum | read-only | All type a VPS task can be — one of `addVeeamBackupJob`, `changeRootPassword`, `createSnapshot`, `deleteSnapshot`, `deliverVm`, `getConsoleUrl`, `internalTask`, `migrate`, `openConsoleAccess`, `provisioningAdditionalIp`, `reOpenVm`, `rebootVm`, … |

```json
{
  "date": "2024-01-01T12:00:00Z",
  "id": 0,
  "progress": 0,
  "state": "blocked",
  "type": "addVeeamBackupJob"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/vps/{serviceName}/createSnapshot" \
  -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: vps.createSnapshot.post
result = client.post("/vps/{serviceName}/createSnapshot",
	description = None, # A textual description for your snapshot (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

// Request body type: vps.createSnapshot.post
$result = $ovh->post("/vps/{serviceName}/createSnapshot", array(
	description => null, // A textual description for your snapshot (type: string)
));

print_r($result);
?>
```

## Abort an ongoing snapshot or automated backup operation for this VPS

`POST /1.0/vps/{serviceName}/abortSnapshot`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/vps/backups/#abortVpsSnapshot

**Status:** Stable production version  
**IAM actions:** `vps:apiovh:abortSnapshot`

Stops the snapshot or automated backup operation in progress on the VPS.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/vps/{serviceName}/abortSnapshot" \
  -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("/vps/{serviceName}/abortSnapshot")

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

print_r($result);
?>
```

## Revert this VPS to the specified snapshot and return an asynchronous task

`POST /1.0/vps/{serviceName}/snapshot/revert`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/vps/backups/#revertVpsSnapshot

**Status:** Stable production version  
**IAM actions:** `vps:apiovh:snapshot/revert`

Reverts the VPS to its snapshot and returns the task that performs it.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `date` | string (date-time) | read-only |  |
| `id` | integer | read-only |  |
| `progress` | integer | read-only |  |
| `state` | vps.TaskStateEnum | read-only | All states a VPS task can be in — one of `blocked`, `cancelled`, `doing`, `done`, `error`, `paused`, `todo`, `waitingAck` |
| `type` | vps.TaskTypeEnum | read-only | All type a VPS task can be — one of `addVeeamBackupJob`, `changeRootPassword`, `createSnapshot`, `deleteSnapshot`, `deliverVm`, `getConsoleUrl`, `internalTask`, `migrate`, `openConsoleAccess`, `provisioningAdditionalIp`, `reOpenVm`, `rebootVm`, … |

```json
{
  "date": "2024-01-01T12:00:00Z",
  "id": 0,
  "progress": 0,
  "state": "blocked",
  "type": "addVeeamBackupJob"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/vps/{serviceName}/snapshot/revert" \
  -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("/vps/{serviceName}/snapshot/revert")

# 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("/vps/{serviceName}/snapshot/revert");

print_r($result);
?>
```

## Change the scheduled time of the daily automated backup and return an asynchronous task

`POST /1.0/vps/{serviceName}/automatedBackup/reschedule`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/vps/backups/#rescheduleVpsAutomatedBackup

**Status:** Stable production version  
**IAM actions:** `vps:apiovh:automatedBackup/reschedule`

Changes the time of the daily automated backup and returns the task that performs it.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |

### Request body (required)

Type: `vps.automatedBackup.reschedule.post`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `schedule` | time | yes | Time (e.g., 15:04:05) |

```json
{
  "schedule": "15:04:05"
}
```

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `date` | string (date-time) | read-only |  |
| `id` | integer | read-only |  |
| `progress` | integer | read-only |  |
| `state` | vps.TaskStateEnum | read-only | All states a VPS task can be in — one of `blocked`, `cancelled`, `doing`, `done`, `error`, `paused`, `todo`, `waitingAck` |
| `type` | vps.TaskTypeEnum | read-only | All type a VPS task can be — one of `addVeeamBackupJob`, `changeRootPassword`, `createSnapshot`, `deleteSnapshot`, `deliverVm`, `getConsoleUrl`, `internalTask`, `migrate`, `openConsoleAccess`, `provisioningAdditionalIp`, `reOpenVm`, `rebootVm`, … |

```json
{
  "date": "2024-01-01T12:00:00Z",
  "id": 0,
  "progress": 0,
  "state": "blocked",
  "type": "addVeeamBackupJob"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/vps/{serviceName}/automatedBackup/reschedule" \
  -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: vps.automatedBackup.reschedule.post
result = client.post("/vps/{serviceName}/automatedBackup/reschedule",
	schedule = None, # Time (e.g., 15:04:05) (type: time)
)

# 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: vps.automatedBackup.reschedule.post
$result = $ovh->post("/vps/{serviceName}/automatedBackup/reschedule", array(
	schedule => null, // Time (e.g., 15:04:05) (type: time)
));

print_r($result);
?>
```

## Restore this VPS from a given restore point and return an asynchronous task

`POST /1.0/vps/{serviceName}/automatedBackup/restore`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/vps/backups/#restoreVpsAutomatedBackup

**Status:** Stable production version  
**IAM actions:** `vps:apiovh:automatedBackup/restore`

Restores the VPS from the given restore point and returns the task that performs it.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |

### Request body (required)

Type: `vps.automatedBackup.restore.post`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `changePassword` | boolean |  | Only with restore full on VPS Cloud 2014 |
| `restorePoint` | string (date-time) | yes | Restore Point fetched in /automatedBackup/restorePoints |
| `type` | vps.RestoreTypeEnum | yes | Available restore types — one of `file`, `full` |

```json
{
  "changePassword": true,
  "restorePoint": "2024-01-01T12:00:00Z",
  "type": "file"
}
```

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `date` | string (date-time) | read-only |  |
| `id` | integer | read-only |  |
| `progress` | integer | read-only |  |
| `state` | vps.TaskStateEnum | read-only | All states a VPS task can be in — one of `blocked`, `cancelled`, `doing`, `done`, `error`, `paused`, `todo`, `waitingAck` |
| `type` | vps.TaskTypeEnum | read-only | All type a VPS task can be — one of `addVeeamBackupJob`, `changeRootPassword`, `createSnapshot`, `deleteSnapshot`, `deliverVm`, `getConsoleUrl`, `internalTask`, `migrate`, `openConsoleAccess`, `provisioningAdditionalIp`, `reOpenVm`, `rebootVm`, … |

```json
{
  "date": "2024-01-01T12:00:00Z",
  "id": 0,
  "progress": 0,
  "state": "blocked",
  "type": "addVeeamBackupJob"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/vps/{serviceName}/automatedBackup/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: vps.automatedBackup.restore.post
result = client.post("/vps/{serviceName}/automatedBackup/restore",
	changePassword = None, # Only with restore full on VPS Cloud 2014 (type: boolean)
	restorePoint = None, # Restore Point fetched in /automatedBackup/restorePoints (type: string)
	type = None, # Available restore types (type: vps.RestoreTypeEnum)
)

# 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: vps.automatedBackup.restore.post
$result = $ovh->post("/vps/{serviceName}/automatedBackup/restore", array(
	changePassword => null, // Only with restore full on VPS Cloud 2014 (type: boolean)
	restorePoint => null, // Restore Point fetched in /automatedBackup/restorePoints (type: string)
	type => null, // Available restore types (type: vps.RestoreTypeEnum)
));

print_r($result);
?>
```

## Unmount a restored backup from this VPS and return an asynchronous task

`POST /1.0/vps/{serviceName}/automatedBackup/detachBackup`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/vps/backups/#detachVpsAutomatedBackup

**Status:** Stable production version  
**IAM actions:** `vps:apiovh:automatedBackup/detachBackup`

Unmounts the restored backup from the VPS and returns the task that performs it.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |

### Request body (required)

Type: `vps.automatedBackup.detachBackup.post`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `restorePoint` | string (date-time) | yes | restorePoint fetched in /vps/{serviceName}/automatedBackup/attachedBackup |

```json
{
  "restorePoint": "2024-01-01T12:00:00Z"
}
```

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `date` | string (date-time) | read-only |  |
| `id` | integer | read-only |  |
| `progress` | integer | read-only |  |
| `state` | vps.TaskStateEnum | read-only | All states a VPS task can be in — one of `blocked`, `cancelled`, `doing`, `done`, `error`, `paused`, `todo`, `waitingAck` |
| `type` | vps.TaskTypeEnum | read-only | All type a VPS task can be — one of `addVeeamBackupJob`, `changeRootPassword`, `createSnapshot`, `deleteSnapshot`, `deliverVm`, `getConsoleUrl`, `internalTask`, `migrate`, `openConsoleAccess`, `provisioningAdditionalIp`, `reOpenVm`, `rebootVm`, … |

```json
{
  "date": "2024-01-01T12:00:00Z",
  "id": 0,
  "progress": 0,
  "state": "blocked",
  "type": "addVeeamBackupJob"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/vps/{serviceName}/automatedBackup/detachBackup" \
  -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: vps.automatedBackup.detachBackup.post
result = client.post("/vps/{serviceName}/automatedBackup/detachBackup",
	restorePoint = None, # restorePoint fetched in /vps/{serviceName}/automatedBackup/attachedBackup (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

// Request body type: vps.automatedBackup.detachBackup.post
$result = $ovh->post("/vps/{serviceName}/automatedBackup/detachBackup", array(
	restorePoint => null, // restorePoint fetched in /vps/{serviceName}/automatedBackup/attachedBackup (type: string)
));

print_r($result);
?>
```

## Delete the VPS snapshot and return an asynchronous task

`DELETE /1.0/vps/{serviceName}/snapshot`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/vps/backups/#deleteVpsSnapshot

**Status:** Stable production version  
**IAM actions:** `vps:apiovh:snapshot/delete`

Deletes the snapshot of the VPS and returns the task that performs it.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `date` | string (date-time) | read-only |  |
| `id` | integer | read-only |  |
| `progress` | integer | read-only |  |
| `state` | vps.TaskStateEnum | read-only | All states a VPS task can be in — one of `blocked`, `cancelled`, `doing`, `done`, `error`, `paused`, `todo`, `waitingAck` |
| `type` | vps.TaskTypeEnum | read-only | All type a VPS task can be — one of `addVeeamBackupJob`, `changeRootPassword`, `createSnapshot`, `deleteSnapshot`, `deliverVm`, `getConsoleUrl`, `internalTask`, `migrate`, `openConsoleAccess`, `provisioningAdditionalIp`, `reOpenVm`, `rebootVm`, … |

```json
{
  "date": "2024-01-01T12:00:00Z",
  "id": 0,
  "progress": 0,
  "state": "blocked",
  "type": "addVeeamBackupJob"
}
```

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/vps/{serviceName}/snapshot" \
  -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.delete("/vps/{serviceName}/snapshot")

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

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

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

$result = $ovh->delete("/vps/{serviceName}/snapshot");

print_r($result);
?>
```

## Update the VPS snapshot properties

`PUT /1.0/vps/{serviceName}/snapshot`

Link: https://developers.eu.ovhcloud.com/reference/bare-metal-cloud/vps/backups/#editVpsSnapshot

**Status:** Stable production version  
**IAM actions:** `vps:apiovh:snapshot/edit`

Updates the description of the snapshot of the VPS.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | Service name |

### Request body (required)

Type: `vps.Snapshot`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `creationDate` | string (date-time) | read-only |  |
| `description` | string |  |  |
| `id` | string | read-only |  |
| `region` | string | read-only |  |

```json
{
  "description": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/vps/{serviceName}/snapshot" \
  -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: vps.Snapshot
result = client.put("/vps/{serviceName}/snapshot",
	description = None, #  (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

// Request body type: vps.Snapshot
$result = $ovh->put("/vps/{serviceName}/snapshot", array(
	description => null, //  (type: string)
));

print_r($result);
?>
```
