dumps
Creates, updates, deletes, gets or lists a dumps resource.
Overview​
| Name | dumps |
| Type | Resource |
| Id | ovh.hosting_web.dumps |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | integer | Dump id |
task_id | integer | The task ID working on this dump (wire: taskId) |
database_name | string | Source database name (wire: databaseName) |
creation_date | string (date-time) | Creation date of the dump (wire: creationDate) |
deletion_date | string (date-time) | Automatic deletion date of the dump (wire: deletionDate) |
orphan | boolean | If source database was deleted |
status | string | The dump status (created, creating, deleting) |
type | string | Dump type (daily.1, now, weekly.1) |
url | string | Dump url access |
Dump
| Name | Datatype | Description |
|---|---|---|
id | integer | Dump id |
task_id | integer | The task ID working on this dump (wire: taskId) |
database_name | string | Source database name (wire: databaseName) |
creation_date | string (date-time) | Creation date of the dump (wire: creationDate) |
deletion_date | string (date-time) | Automatic deletion date of the dump (wire: deletionDate) |
orphan | boolean | If source database was deleted |
status | string | The dump status (created, creating, deleting) |
type | string | Dump type (daily.1, now, weekly.1) |
url | string | Dump url access |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | id, service_name | Get a dump. Returns the source database, status, type, download URL and automatic deletion date of the dump. | |
list | select | service_name | creation_date.from, creation_date.to, database_name, deletion_date.from, deletion_date.to, orphan, x_pagination_mode | List dumps. Returns the IDs of the database dumps of the hosting, including those of deleted databases. Filter them by database, date or orphan. |
delete | delete | id, service_name | Delete a dump. Deletes the dump before its automatic deletion date and returns the task. This also applies to dumps of deleted databases. |
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"}}) |
id | integer | Dump id |
service_name | string | The internal name of your hosting (wire: serviceName) |
creation_date.from | string (date-time) | Filter the value of creationDate property (>=) (wire: creationDate.from) |
creation_date.to | string (date-time) | Filter the value of creationDate property (<=) (wire: creationDate.to) |
database_name | string | Filter the value of databaseName property (=) (wire: databaseName) |
deletion_date.from | string (date-time) | Filter the value of deletionDate property (>=) (wire: deletionDate.from) |
deletion_date.to | string (date-time) | Filter the value of deletionDate property (<=) (wire: deletionDate.to) |
orphan | boolean | Filter the value of orphan property (=) |
x_pagination_mode | string | Sent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode) |
SELECT examples​
- get
- list
Get a dump. Returns the source database, status, type, download URL and automatic deletion date of the dump.
SELECT
id,
task_id,
database_name,
creation_date,
deletion_date,
orphan,
status,
type,
url
FROM ovh.hosting_web.dumps
WHERE id = '{{ id }}' -- required
AND service_name = '{{ service_name }}' -- required
;
List dumps. Returns the IDs of the database dumps of the hosting, including those of deleted databases. Filter them by database, date or orphan.
SELECT
id,
task_id,
database_name,
creation_date,
deletion_date,
orphan,
status,
type,
url
FROM ovh.hosting_web.dumps
WHERE service_name = '{{ service_name }}' -- required
AND creation_date.from = '{{ creation_date.from }}'
AND creation_date.to = '{{ creation_date.to }}'
AND database_name = '{{ database_name }}'
AND deletion_date.from = '{{ deletion_date.from }}'
AND deletion_date.to = '{{ deletion_date.to }}'
AND orphan = '{{ orphan }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
DELETE examples​
- delete
Delete a dump. Deletes the dump before its automatic deletion date and returns the task. This also applies to dumps of deleted databases.
DELETE FROM ovh.hosting_web.dumps
WHERE id = '{{ id }}' --required
AND service_name = '{{ service_name }}' --required
;