dumps
Creates, updates, deletes, gets or lists a dumps resource.
Overview​
| Name | dumps |
| Type | Resource |
| Id | ovh.hosting_private_database.dumps |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
dump_id | integer | Dump id (wire: dumpId) |
database_name | string | Dump of this 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 | Dump orphan flag (true if database does not exists) |
url | string | Dump URL access |
Dumps
| Name | Datatype | Description |
|---|---|---|
dump_id | integer | Dump id (wire: dumpId) |
database_name | string | Dump of this 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 | Dump orphan flag (true if database does not exists) |
url | string | Dump URL access |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | dump_id, service_name | Returns the database name, creation date, automatic deletion date and download URL of the dump, and whether it is orphan. | |
list | select | service_name | database_name, orphan, x_pagination_mode | Returns the IDs of the dumps of all databases of the service, including orphan dumps whose database no longer exists. |
delete | delete | dump_id, service_name | Deletes the dump before its automatic deletion date. Returns a task to follow the deletion. | |
restore | exec | dumpId, serviceName | Restores the dump into the given database, which can differ from the database it was taken from. By default, the database is flushed before the restore. |
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"}}) |
dumpId | integer | Dump ID |
dump_id | integer | Dump ID (wire: dumpId) |
serviceName | string | Service name |
service_name | string | Service name (wire: serviceName) |
database_name | string | Filter the value of databaseName property (like) (wire: databaseName) |
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
Returns the database name, creation date, automatic deletion date and download URL of the dump, and whether it is orphan.
SELECT
dump_id,
database_name,
creation_date,
deletion_date,
orphan,
url
FROM ovh.hosting_private_database.dumps
WHERE dump_id = '{{ dump_id }}' -- required
AND service_name = '{{ service_name }}' -- required
;
Returns the IDs of the dumps of all databases of the service, including orphan dumps whose database no longer exists.
SELECT
dump_id,
database_name,
creation_date,
deletion_date,
orphan,
url
FROM ovh.hosting_private_database.dumps
WHERE service_name = '{{ service_name }}' -- required
AND database_name = '{{ database_name }}'
AND orphan = '{{ orphan }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
DELETE examples​
- delete
Deletes the dump before its automatic deletion date. Returns a task to follow the deletion.
DELETE FROM ovh.hosting_private_database.dumps
WHERE dump_id = '{{ dump_id }}' --required
AND service_name = '{{ service_name }}' --required
;
Lifecycle Methods​
EXEC variables use wire (API) names.
- restore
Restores the dump into the given database, which can differ from the database it was taken from. By default, the database is flushed before the restore.
EXEC ovh.hosting_private_database.dumps.restore
@dumpId='{{ dumpId }}' --required,
@serviceName='{{ serviceName }}' --required
@@json=
'{
"databaseName": "{{ databaseName }}",
"flushDatabase": {{ flushDatabase }}
}'
;