Remote Snapshots¶
Remote snapshots are point-in-time versions of a drive. They can be cloned to a full drive, which makes it possible to restore an older version of a VM image.
Remote snapshots are billed based on their occupied size. Since only the differences from the current drive image are stored, a single remote snapshot’s size will be equal to the size of the data which has changed since the remote snapshot has taken. If no data has changed, the remote snapshot’s size will be zero.
Note that remote snapshots are billed as storage
, so storage subscriptions
should be bought in order not to burst on remote snapshots usage.
Allowed HTTP methods¶
Method | Description |
---|---|
GET | get / list object/s |
POST | create new object/s |
PUT | update / modify object/s |
DELETE | delete object/s |
Note
See RFC 2616#section-9 for more details on HTTP methods semantics.
Listing¶
Detailed listing¶
List single remote snapshot¶
Creating¶
-
POST
/remotesnapshots/
¶ Creates a new snapshot or multiple snapshots.
Status Codes: - 201 Created – object created
Example request:
Create a snapshot
Example response
Editing¶
Metadata¶
It is possible to add arbitrary key-value data to a remote snapshot definition. See Objects’ metadata field for more information.
Deleting¶
Single snapshot¶
-
DELETE
/remotesnapshots/{uuid}/
¶ Deletes a single remote snapshot.
Status Codes: - 204 No Content – No content, object deletion started.
Example request:
Example response:
Multiple snapshots¶
-
DELETE
/remotesnapshots/
¶ Deletes multiple mounted or unmounted remote snapshots specified by their UUID’s.
statuscode 204: No content, object deletion started. Example request:
Request body
{"objects": [ { "uuid":"b137e217-42b6-4ecf-8575-d72efc2d3dbd", }, { "uuid":"e035a488-8587-4a15-ab25-9b7343236bc9", }, { "uuid":"feded33c-106f-49fa-a1c4-be5c718ad1b5", } ] }
Example response:
HTTP/1.0 204 NO CONTENT
Cloning¶
-
POST
/remotesnapshots/{uuid}/action/?do=clone
¶ Clones a remote snapshot to a drive. Request body is optional and any or all of the key/value pairs can be omitted.
Status Codes: - 202 Accepted – Action accepted, execution is proceeding.
Example request:
Example response: The response is actually a drive definition.
Note
The name of the cloned drive will be changed using the clone naming strategy set in the profile. See Clone naming for more information.
Listing a drive’s remote snapshots¶
There are 2 ways of getting all the remote snapshots of a drive.
By filtering remote snapshots¶
You can apply a drive filter to remote snapshots.
-
GET
/remotesnapshots/{uuid}/?drive={drive_uuid}
¶ Example request:
Example response:
In drive definition¶
In the detailed drive definition there is a “remote_snapshots” field.
-
GET
/drives/{drive_uuid}/
¶ Example request:
Example response:
Request schema¶
{ "description":"Clone remote snapshot", "properties":{ "name":{ "description": "Name of the cloned remote snapshot", } "media":{ "description": "Media of the cloned remote snapshot", } "affinities":{ "description": "Affinities of the cloned remote snapshot", } } }