Skip to main content

dumps

Creates, updates, deletes, gets or lists a dumps resource.

Overview​

Namedumps
TypeResource
Idovh.hosting_private_database.dumps

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
dump_idintegerDump id (wire: dumpId)
database_namestringDump of this database name (wire: databaseName)
creation_datestring (date-time)Creation date of the dump (wire: creationDate)
deletion_datestring (date-time)Automatic deletion date of the dump (wire: deletionDate)
orphanbooleanDump orphan flag (true if database does not exists)
urlstringDump URL access

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectdump_id, service_nameReturns the database name, creation date, automatic deletion date and download URL of the dump, and whether it is orphan.
listselectservice_namedatabase_name, orphan, x_pagination_modeReturns the IDs of the dumps of all databases of the service, including orphan dumps whose database no longer exists.
deletedeletedump_id, service_nameDeletes the dump before its automatic deletion date. Returns a task to follow the deletion.
restoreexecdumpId, serviceNameRestores 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.

NameDatatypeDescription
api_hoststringThe 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"}})
dumpIdintegerDump ID
dump_idintegerDump ID (wire: dumpId)
serviceNamestringService name
service_namestringService name (wire: serviceName)
database_namestringFilter the value of databaseName property (like) (wire: databaseName)
orphanbooleanFilter the value of orphan property (=)
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

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
;

DELETE examples​

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.

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 }}
}'
;