Skip to main content

dumps

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

Overview​

Namedumps
TypeResource
Idovh.hosting_web.dumps

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idintegerDump id
task_idintegerThe task ID working on this dump (wire: taskId)
database_namestringSource 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)
orphanbooleanIf source database was deleted
statusstringThe dump status (created, creating, deleting)
typestringDump type (daily.1, now, weekly.1)
urlstringDump url access

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectid, service_nameGet a dump. Returns the source database, status, type, download URL and automatic deletion date of the dump.
listselectservice_namecreation_date.from, creation_date.to, database_name, deletion_date.from, deletion_date.to, orphan, x_pagination_modeList dumps. Returns the IDs of the database dumps of the hosting, including those of deleted databases. Filter them by database, date or orphan.
deletedeleteid, service_nameDelete 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.

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"}})
idintegerDump id
service_namestringThe internal name of your hosting (wire: serviceName)
creation_date.fromstring (date-time)Filter the value of creationDate property (>=) (wire: creationDate.from)
creation_date.tostring (date-time)Filter the value of creationDate property (<=) (wire: creationDate.to)
database_namestringFilter the value of databaseName property (=) (wire: databaseName)
deletion_date.fromstring (date-time)Filter the value of deletionDate property (>=) (wire: deletionDate.from)
deletion_date.tostring (date-time)Filter the value of deletionDate property (<=) (wire: deletionDate.to)
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​

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
;

DELETE examples​

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
;