automated_backups
Creates, updates, deletes, gets or lists an automated_backups resource.
Overview​
| Name | automated_backups |
| Type | Resource |
| Id | ovh.vps.automated_backups |
Fields​
The following fields are returned by SELECT queries:
- get
successful operation
| Name | Datatype | Description |
|---|---|---|
service_resource_name | string | Resource name of the service of your automated backup (wire: serviceResourceName) |
rotation | integer | Number of rotation of your daily backup |
schedule | string (time) | Scheduled time of your daily backup (example: 15:04:05) |
state | string | Backup state (disabled, enabled) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | service_name | Returns whether the automated backup is enabled, its rotation and the time of the daily backup. | |
detach_backup | exec | serviceName, restorePoint | Unmounts the restored backup from the VPS and returns the task that performs it. | |
reschedule | exec | serviceName, schedule | Changes the time of the daily automated backup and returns the task that performs it. | |
restore | exec | serviceName, restorePoint, type | Restores the VPS from the given restore point and returns the task that performs it. |
Parameters​
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
api_host | string | The OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}}) |
serviceName | string | Service name |
service_name | string | Service name (wire: serviceName) |
SELECT examples​
- get
Returns whether the automated backup is enabled, its rotation and the time of the daily backup.
SELECT
service_resource_name,
rotation,
schedule,
state
FROM ovh.vps.automated_backups
WHERE service_name = '{{ service_name }}' -- required
;
Lifecycle Methods​
EXEC variables use wire (API) names.
- detach_backup
- reschedule
- restore
Unmounts the restored backup from the VPS and returns the task that performs it.
EXEC ovh.vps.automated_backups.detach_backup
@serviceName='{{ serviceName }}' --required
@@json=
'{
"restorePoint": "{{ restorePoint }}"
}'
;
Changes the time of the daily automated backup and returns the task that performs it.
EXEC ovh.vps.automated_backups.reschedule
@serviceName='{{ serviceName }}' --required
@@json=
'{
"schedule": "{{ schedule }}"
}'
;
Restores the VPS from the given restore point and returns the task that performs it.
EXEC ovh.vps.automated_backups.restore
@serviceName='{{ serviceName }}' --required
@@json=
'{
"changePassword": {{ changePassword }},
"restorePoint": "{{ restorePoint }}",
"type": "{{ type }}"
}'
;