Abiquo Documentation Cookies Policy

Our Documentation website uses cookies to improve your experience. Please visit our Cookie Policy page for more information about cookies and how we use them.


Abiquo 4.4

Skip to end of metadata
Go to start of metadata

Contents:

Manage backup configuration related to virtual machines

The Virtual Machine Backup Resource enables users to manage backup configuration for VMs.

Main URI of the Resource

This class operates mainly over the Resource URI: /cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}/backup/

Exposed Methods

Request a manual backup

Request a manual backup of the given virtual machine.

Synopsis: POST http://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}/backup/action/request
Roles Required: VAPP_MANAGE_BACKUP
Request Headers: Accept:  application/vnd.abiquo.acceptedrequest+json; version=4.4; application/vnd.abiquo.acceptedrequest+xml; version=4.4;  Content-type: application/vnd.abiquo.ondemandbackup+json; version=4.4; application/vnd.abiquo.ondemandbackup+xml; version=4.4; ;

Request Example:

 Click here to show or hide the request example

 

cURL:

curl -X GET http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/backup/action/request \ 
	 -H 'Content-Type:application/vnd.abiquo.ondemandbackup+json; version=4.0' \ 
	 -H 'Accept:application/vnd.abiquo.acceptedrequest+json; version=4.0' \ 
	 -u user:password 

Success status code: 204

Request payload:

{
  "replication": "true"
}

Response payload :

{
  "links": [
    {
      "rel": "status",
      "href": "https://example.com/api/cloud/virtualdatacenters/*/virtualappliances/*/virtualmachines/*/tasks/*"
    }
  ],
  "entity": "You can keep track of the progress in the link"
}

 

Request example:

POST_cld_vdcs_X_vapps_X_vms_X_bkp_act_rq_CT_ondemandbkp_j_AC_acrq_j.0001.txt

cURL:

curl -X POST http://localhost:9000/api/cloud/virtualdatacenters/795/virtualappliances/466/virtualmachines/447/backup/action/request \ 
	 -H 'Accept:application/vnd.abiquo.acceptedrequest+json; version=4.2' \ 
	 -H 'Content-Type:application/vnd.abiquo.ondemandbackup+json; version=4.2' \ 
	 -d @requestpayload.json \ 
	 -u user:password --verbose 

Success status code: 202

Request payload:

{
  "replication": false, 
  "links": []
}

Response payload:

{
  "message": "You can keep track of the progress in the link", 
  "links": [
    {
      "href": "http://localhost:9009/api/cloud/virtualdatacenters/795/virtualappliances/466/virtualmachines/447/tasks/b2d97c97-cf32-44ef-b7ab-734ff454205e", 
      "rel": "status"
    }
  ]
}

 

Request a restore

Request a restore of a virtual machine backup when given the provider ID.

Synopsis: POST http://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}/backup/action/restore
Roles Required: VAPP_MANAGE_BACKUP
Request Headers: Accept:  application/vnd.abiquo.acceptedrequest+json; version=4.4; application/vnd.abiquo.acceptedrequest+xml; version=4.4;  Content-type:  application/vnd.abiquo.restore+json; version=4.4; application/vnd.abiquo.restore+xml; version=4.4;

Request Example:

 Click here to show or hide the request example

cURL :

 

curl -X GET http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/backup/action/restore \ 
	 -H 'Content-Type:application/vnd.abiquo.restore+json; version=4.0' \ 
	 -H 'Accept:application/vnd.abiquo.acceptedrequest+json; version=4.0' \ 
	 -u user:password 

Success status code: 202

Request payload:

{
  "providerId" : "provider-id-from-backup-result"
}

Response payload :

{
  "links": [
    {
      "rel": "status",
      "href": "https://example.com/api/cloud/virtualdatacenters/*/virtualappliances/*/virtualmachines/*/tasks/*"
    }
  ],
  "entity": "You can keep track of the progress in the link"
}

 

Request example:

POST_cld_vdcs_X_vapps_X_vms_X_bkp_act_restore_CT_restore_j_AC_acrq_j.0001.txt

cURL:

curl -X POST http://localhost:9000/api/cloud/virtualdatacenters/798/virtualappliances/469/virtualmachines/451/backup/action/restore \ 
	 -H 'Accept:application/vnd.abiquo.acceptedrequest+json; version=4.2' \ 
	 -H 'Content-Type:application/vnd.abiquo.restore+json; version=4.2' \ 
	 -d @requestpayload.json \ 
	 -u user:password --verbose 

Success status code: 202

Request payload:

{
  "providerId": "382", 
  "links": []
}

Response payload:

{
  "message": "You can keep track of the progress in the link", 
  "links": [
    {
      "href": "http://localhost:9009/api/cloud/virtualdatacenters/798/virtualappliances/469/virtualmachines/451/tasks/557ea2b1-c41a-4466-a009-4f7447c0b4cc", 
      "rel": "status"
    }
  ]
}

 

List backup and restore results

Retrieve the backup and restore results of a virtual machine.

Synopsis: GET  http://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/virtualappliances/{virtualappliance}/virtualmachines/{virtualmachine}/backup/results
Roles Required: VAPP_MANAGE_BACKUP
Request Headers: Accept:  application/vnd.abiquo.backupresults+json; version=4.4; application/vnd.abiquo.backupresults+xml; version=4.4; ;

Request Example:

 Click here to show or hide the request example

 

cURL:

curl -X GET http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/backup/results \ 
	 -H 'Accept:application/vnd.abiquo.backupresults+json; version=4.0' \ 
	 -u user:password 

Success status code: 200

Request payload:

-- none --

Response payload:

{
  "links": [
    {
      "rel": "first",
      "href": "https://example.com/api/cloud/virtualdatacenters/*/virtualappliances/*/virtualmachines/*/backup/results?limit=25&by=date&asc=false"
    },
    {
      "rel": "last",
      "href": "https://example.com/api/cloud/virtualdatacenters/*/virtualappliances/*/virtualmachines/*/backup/results?startwith=0&limit=25&by=date&asc=false"
    }
  ],
  "collection": [
    {
      "links": [],
      "providerId": "6302ed32-099a-40aa-8120-77894ac8b4e7",
      "name": "Daily [6302ed32-099a-40aa-8120-77894ac8b4e7]",
      "sizeInMb": 8516,
      "creationDate": "2017/02/08 16:00:38 +0100",
      "status": "DONE",
      "type": "complete",
      "restoreResults": [
        {
          "links": [],
          "providerId": "2eee71fb-082c-4f9a-a72c-bcde44623f65",
          "name": "Daily [6302ed32-099a-40aa-8120-77894ac8b4e7]",
          "sizeInMb": 8516,
          "date": "2017/02/08 16:35:57 +0100",
          "status": "DONE",
          "type": "complete"
        }
      ]
    }
  ],
  "totalSize": 1
}

Request example:

GET_cld_vdcs_X_vapps_X_vms_X_bkp_results_AC_bkpresults_j.0001.txt

cURL:

curl -X GET http://localhost:9000/api/cloud/virtualdatacenters/793/virtualappliances/464/virtualmachines/445/backup/results \ 
	 -H 'Accept:application/vnd.abiquo.backupresults+json; version=4.2' \ 
	 -u user:password --verbose 

Success status code: 200

Request payload:

--none--

Response payload:

{
  "totalSize": 1, 
  "links": [
    {
      "href": "http://localhost:9009/api/cloud/virtualdatacenters/793/virtualappliances/464/virtualmachines/445/backup/results?limit=25&by=creationdate&asc=false", 
      "rel": "first"
    }, 
    {
      "href": "http://localhost:9009/api/cloud/virtualdatacenters/793/virtualappliances/464/virtualmachines/445/backup/results?startwith=0&limit=25&by=creationdate&asc=false", 
      "rel": "last"
    }
  ], 
  "collection": [
    {
      "status": "IN_PROGRESS", 
      "name": "br1", 
      "links": [], 
      "providerId": "57", 
      "replica": false, 
      "restoreResults": [
        {
          "status": "IN_PROGRESS", 
          "providerId": "61", 
          "name": "62", 
          "links": [], 
          "sizeInMb": 63, 
          "date": "2017/12/05 16:24:44 +0100", 
          "type": "64"
        }
      ], 
      "sizeInMb": 60, 
      "creationDate": "2017/12/05 16:24:44 +0100", 
      "type": "59"
    }
  ]
}

  • No labels