Documentation
In Abiquo 3.1,1, some backup results fields have been changed to free text.
The backup front-end feature is implemented as a free text field called “metadata” in the virtual machine, with a key-value format for backup configuration.
The field is stored as JSON in the database and sent as XML or JSON in response to API requests for metadata.
A backup is configured under the backupSchedule tag. The backup results are stored under the backupResults tag.
The backup data will be validated and only keywords will be processed. For example, if you added ‘ "<foo> </foo>” instead of “<disk> </disk>” to the example in the “disks” section, it would be ignored.
In Abiquo 3.2, the new Backup Restore feature will require:
You can connect to the Abiquo Outbound API and detect the following Backup events.
Event Identifier | Event Description |
---|---|
DATACENTER_BACKUP_CREATE_INFO | Backup Configuration 'template.name' has been created for datacenter 'datacenter.name'. |
DATACENTER_BACKUP_MODIFY_INFO | Backup Configuration for datacenter 'DC_NAME' has been modified. |
DATACENTER_BACKUP_DELETE_INFO | Deleted Backup Configuration 'BU_NAME' for datacenter 'DC_NAME'. |
VIRTUAL_MACHINE_METADATA_MODIFIED_INFO | Backup Configuration for virtual machine 'entity.name' has been modified. |
After a Backup Connector receives notification of a backup event (i.e. a modification of the user metadata) from the outbound API, you can retrieve the backup information using the Abiquo API.
Alternatively, through the API you can also retrieve virtual machines with metadata and filter on the metadata keys. So for example, you could retrieve all of the virtual machines requiring complete backups for your datacenter.
The virtualmachine media type contains the link to the metadata element with the backup information.
The following virtual machine backup configurations are valid:
The following table contains suggested values for some of the backup results elements:
Backup element | Field type | Suggested values | Notes |
---|---|---|---|
Status | free text |
|
|
Type | free text |
|
|
Name | free text |
| The UI will display the status stored in the field |
Size | Integer | (value in MB) | The UI will display the size stored in the field |
The following section shows basic examples of API requests that could be used in backup integration.
Retrieve the metadata of a virtual machine. Note that the field validation has changed but the backup metadata data type has not changed in Abiquo 3.1.1
curl -X GET -H "Accept:application/vnd.abiquo.metadata+xml; version=3.1" 'https://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/12/metadata' | xmlindent -nbe -f
Example API Response
To add the results of a backup to the virtual machine metadata, copy the retrieved data, add the new data and perform a put request to virtual machine metadata.
curl -X PUT -u "user:password" 'https://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/12/metadata' -H 'Content-type:application/vnd.abiquo.metadata+xml; version=3.1' -H 'Accept:application/vnd.abiquo.metadata+xml; version=3.1' -d@/home/user/xmls/metadatafull.json | xmlindent -f -nbe
In JSON format, the equivalent backupResults would be as follows.
Note that the JSON does not contain a "virtualmachinemetadata" element or individual elements within lists (e.g. "result" elements).
curl -X PUT -u "user:password" 'https://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/12/metadata' -H 'Content-type:application/vnd.abiquo.metadata+json;version=3.1' -H 'Accept:application/vnd.abiquo.metadata+json; version=3.1' -d@/home/user/xmls/metadatafull.json | xmlindent -f -nbe
The following example shows the metadata returned, but only the "link" element has been added by the platform. The metadata sent would be the same as the metadata returned, but without the link element.
The put request will return the metadata as confirmation of the successful request.
In the Abiquo GUI on the Latest Backups tab:
Just like all the other labels in the Abiquo UI, backup descriptions and texts for the datacenter and virtual machine can be easily customized. The datacenter backup descriptions are in the lang_en_US_labels.json file and can be customized in the lang_xx_XX_custom.json file. See Abiquo UI Localization
Customers must create their own connectors to read the backup requests from Abiquo and send them to their own backup system. The option for users to create an instant backup is not offered. However, if users have access to a defined hour backup, then they can set one to be performed as soon as possible.