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

GET /remotesnapshots/

Gets the list of remote snapshots to which the authenticated user has access.

Parameters:
  • fields – A set of field names specifying the returned fields.
Status Codes:

Example request - default list:

Example response - default list:

Detailed listing

GET /remotesnapshots/detail/

Gets the detailed list of remote snapshots with additional information to which the authenticated user has access.

Parameters:
  • fields – No parameters.
Status Codes:

Example request:

Example response:

List single remote snapshot

GET /remotesnapshots/{uuid}/

Gets detailed information on a remote snapshot identified by snapshot_uuid.

Status Codes:

Example request:

Example response:

Creating

POST /remotesnapshots/

Creates a new snapshot or multiple snapshots.

Status Codes:

Example request:

Create a snapshot

Example response

Editing

PUT /remotesnapshots/{uuid}/

Edits a remote snapshot.

Status Codes:

Example request:

Example response:

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:

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",
          }
   }
}

Schema