Skip to main content

partition_snapshots

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

Overview​

Namepartition_snapshots
TypeResource
Idovh.dedicated_nasha.partition_snapshots

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
snapshot_typestringthe interval of snapshot (day-1, day-2, day-3, day-7, hour-1, hour-6) (wire: snapshotType)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectpartition_name, service_name, snapshot_typeGet this object properties
listselectpartition_name, service_namex_pagination_modeGet scheduled snapshot types for this partition
createinsertpartition_name, service_name, snapshot_typeSchedule a new snapshot type
deletedeletepartition_name, service_name, snapshot_typeDelete a given snapshot

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"}})
partition_namestringthe given name of partition (wire: partitionName)
service_namestringThe internal name of your storage (wire: serviceName)
snapshot_typestringthe interval of snapshot (wire: snapshotType)
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 this object properties

SELECT
snapshot_type
FROM ovh.dedicated_nasha.partition_snapshots
WHERE partition_name = '{{ partition_name }}' -- required
AND service_name = '{{ service_name }}' -- required
AND snapshot_type = '{{ snapshot_type }}' -- required
;

INSERT examples​

Schedule a new snapshot type

INSERT INTO ovh.dedicated_nasha.partition_snapshots (
snapshot_type,
partition_name,
service_name
)
SELECT
'{{ snapshot_type }}' /* required */,
'{{ partition_name }}',
'{{ service_name }}'
RETURNING
task_id,
partition_name,
storage_name,
details,
done_date,
last_update,
operation,
status,
todo_date
;

DELETE examples​

Delete a given snapshot

DELETE FROM ovh.dedicated_nasha.partition_snapshots
WHERE partition_name = '{{ partition_name }}' --required
AND service_name = '{{ service_name }}' --required
AND snapshot_type = '{{ snapshot_type }}' --required
;