Last updated September 24, 2009 20:51, by Craig McClanahan
Feedicon  

Cloud API Specification - Requests to Backup Resources

The requests documented in this section are directed to Backup resources, which represent backup snapshots of virtual machines.


Get Backup

Retrieve information about a specific Backup of a specific VM.

Synopsis: GET {URI of Backup}

Request Headers: Accept, Authorization, X-Cloud-Client-Specification-Version.

Request Message Body: N/A.

Response Headers: Content-Length, Content-Type.

Response Message Body: VM.

Response Status: 200, 400, 401, 403, 404.

Example Request: Retrieve information about a VM instance "web01".

 GET /vms/33333/backups/456
 Host: example.com
 Authorization: Basic xxxxxxxxxxxxxxxxxxx
 Accept: application/vnd.com.sun.cloud.Backup+json
 X-Cloud-Client-Specification-Version: 0.1

Example Response:

 HTTP/1.1 200 OK
 Content-Type: application/vnd.com.sun.cloud.Backup+json
 Content-Length: nnn
 
 {
   "name" : "web01_YYYYMMDD",
   "uri" : "http://example.com/vms/33333/backups/456",
   "restore" : "http://example.com/vms/33333/backups/456/restore",
   ...
 }

Update Backup Properties

Update an existing backup definition.

Synopsis: PUT { URI of Backup }

Request Headers: Accept, Authorization, Content-Length, Content-Type, X-Cloud-Client-Specification-Version.

Request Parameters: N/A.

Request Message Body: Backup.

Response Headers: Content-Length, Content-Type.

Response Message Body: Status for use in tracking update progress.

Response Status: 202, 400, 401, 403, 404.

Status "op" Value: "update-Backup".

Status "target_uri" identifies: The Backup receiving the PUT.

Example Request: Update an existing Backup by modifying the associated tags.

 PUT /vms/33333/backups/456
 Host: example.com
 Authorization: Basic xxxxxxxxxxxxxxxxxxx
 Accept: application/vnd.com.sun.cloud.Backup+json
 Content-Length: nnn
 Content-Type: application/vnd.com.sun.Backup.VM+json
 X-Cloud-Client-Specification-Version: 0.1
 
 {
  "tags" : [ "foo", "bar" ]
 }

Example Response:

 HTTP/1.1 202 Accepted
 Content-Type: application/vnd.com.sun.cloud.Status+json
 Content-Length: nnn
 
 {
   "op": "update-Backup",
   "progress": 100,
   "target_uri": "/vms/33333/backups/456",
   "status_uri": "/statuses?op=update-backup&seq=912874502",
   "status" : 200
 }

Delete Backup

Delete an existing virtual machine snapshot backup.

Synopsis: DELETE { URI of Backup }

Request Headers: Authorization, X-Compute-Client-Specification-Version.

Request Parameters: N/A.

Request Message Body: N/A.

Response Headers: Content-Length, Content-Type.

Response Message Body: Status for use in tracking deletion progress.

Response Status: 202, 400, 401, 403, 404.

Status "op" Value: "delete-Backup".

Status "target_uri" identifies: The Backup being deleted.

Example Request: Delete an existing Backup resource.

 DELETE /vms/333333/backups/456
 Host: example.com
 Authorization: Basic xxxxxxxxxxxxxxxxxxx
 X-Compute-Client-Specification-Version: 0.1

Example Response:

 HTTP/1.1 202 Accepted
 Content-Type: application/vnd.com.sun.cloud.Status+json
 Content-Length: nnn
 
 {
   "op": "delete-Backup",
   "progress": 0,
   "target_uri": "/vms/333333/backups/456",
   "status_uri": "/statuses?op=delete-Backup&backup=456"
 }

Restore VM From Backup

Restore the state of the associated VM from the saved state in this Backup.

By convention, the name/value pairs included in the request may contain a field named note whose value is a text string intended for recording in a log on the server, to help identify this request during log file analysis.

Synopsis: POST {Restore URI provided in Backup representation}

Request Headers: Accept, Authorization, Content-Length, Content-Type, X-Cloud-Client-Specification-Version.

Request Parameters: N/A.

Request Message Body: Name/value pairs, with media type "application/json".

Response Headers: Content-Length, Content-Type.

Response Message Body: Status for use in tracking request progress.

Response Status: 202, 400, 401, 403, 404.

Status "op" Value: "restore-Backup"

Status "target_uri" identifies: The Backup being restored.

Example Request: Restore associated VM from this Backup.

 POST /vms/33333/backups/456/restore
 Host: example.com
 Authorization: Basic xxxxxxxxxxxxxxxxxxx
 Content-Length: nnn
 Content-Type: application/json
 X-Compute-Client-Specification-Version: 0.1
 
 {
   "note" : "Restore to known state"
 }

Example Response:

 HTTP/1.1 202 Accepted
 Content-Type: application/vnd.com.sun.cloud.Status+json
 Content-Length: nnn
 
 {
   "op": "restore-Backup",
   "progress": 0,
   "target_uri": "/vms/33333/backups/456",
   "status_uri": "/statuses?op=restore-Backup&vm=33333&b=456"
 }

Copyright © Sun Microsystems, 2009. This work is licensed under Creative Commons Attribution 3.0 Unported License

  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2010, Oracle Corporation and/or its affiliates
(revision 20120127.ac94057)
 
 
Close
loading
Please Confirm
Close