Execute backup via API

  • Thread starter Thread starter kusman
  • Start date Start date
K

kusman

Guest
I am trying to use the API to execute backups. For openVZ it is all clear as vzdump is available via the API, but is there a similar option for KVM? It seems that from the web interface I can do the backup, but the API section doesn't seem to have that option (I am looking here: http://pve.proxmox.com/pve2-api-doc/).

If there is such an option, could you please point me to the API description for it.
 
Hey,

is the existing vzdump endpoint also compatible with the new PBS system for creating new QEMU backups?

It would be also a "nice to have" feature to set an API alias endpoint for backups which behaves similar to the snapshot endpoint.

For Example:

List Backups:
GET /api2/json/nodes/{node}/qemu/{vmid}/backup
as an alias for /api2/json/nodes/{node}/storage/{storage}/content [vmid = {vmid}, storage filter, all by default for example]

Create Backup:
POST /api2/json/nodes/{node}/qemu/{vmid}/backup
as an alias for /api2/json/nodes/{node}/vzdump [vmid = {vmid}]

Restore Backup:
POST /api2/json/nodes/{node}/qemu/{vmid}/backup/rollback
as an alias for /api2/json/nodes/{node}/qemu [vmid = {vmid}, archive, .. ]

kind regards
Linus