api.vm.backup

/vm/define/backup

api.vm.backup.views.vm_define_backup_list_all(*args, **kwargs)

List (GET) all backup definitions for all VMs.

GET /vm/define/backup
DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • data.full (boolean) – Return list of objects with all backup definition details (default: false)
  • data.extended (boolean) – Include total number of backups for each backup definition (default: false)
  • data.order_by (string) – Available fields for sorting: name, disk_id, hostname, created (default: hostname,-created)
Status Codes:

/vm/(hostname_or_uuid)/define/backup

api.vm.backup.views.vm_define_backup_list(*args, **kwargs)

List (GET) all VM backup definitions.

GET /vm/(hostname_or_uuid)/define/backup
DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • hostname_or_uuid (string) – required - Server hostname or uuid
  • data.full (boolean) – Return list of objects with all backup definition details (default: false)
  • data.disk_id (integer) – Filter by disk number/ID
  • data.extended (boolean) – Include total number of backups for each backup definition (default: false)
  • data.order_by (string) – Available fields for sorting: name, disk_id, created (default: -created)
Status Codes:

es example:

es get /vm/example.cust.erigones.com/define/backup
{
    "url": "https://my.erigones.com/api/vm/demo01.cust.erigones.com/define/backup/",
    "status": 200,
    "method": "GET",
    "text": {
        "status": "SUCCESS",
        "result": [
            {
                "node": "node99.erigones.com",
                "name": "daily",
                "schedule": "0 4 * * *",
                "hostname": "example.cust.erigones.com",
                "disk_id": 1,
                "active": true,
                "zpool": "zones",
                "retention": 30,
                "bwlimit": null,
                "desc": ""
            }
        ],
        "task_id": "1e1-6f75849b-11b8-4bf1-8f66"
    }
}

/vm/(hostname_or_uuid)/define/backup/(bkpdef)

api.vm.backup.views.vm_define_backup(*args, **kwargs)

Show (GET), create (POST), remove (DELETE) or update (PUT) a VM backup definition and schedule.

GET /vm/(hostname_or_uuid)/define/backup/(bkpdef)
DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • hostname_or_uuid (string) – required - Server hostname or uuid
  • bkpdef (string) – required - Backup definition name
  • data.disk_id (integer) – required - Disk number/ID (default: 1)
  • data.extended (boolean) – Include total number of backups (default: false)
Status Codes:
POST /vm/(hostname_or_uuid)/define/backup/(bkpdef)
DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • hostname_or_uuid (string) – required - Server hostname or uuid
  • bkpdef (string) – required - Backup definition name (predefined: hourly, daily, weekly, monthly)
  • data.disk_id (integer) – required - Disk number/ID (default: 1)
  • data.typerequired - Backup type (1 - dataset, 2 - file) (default: 1)
  • data.node (string) – required - Name of the backup node
  • data.zpool (string) – required - The zpool used on the backup node (default: zones)
  • data.schedule (string) – required - Schedule in UTC CRON format (e.g. 30 4 * * 6)
  • data.retention (integer) – required - Maximum number of backups to keep
  • data.active (boolean) – Enable or disable backup schedule (default: true)
  • data.compression (integer) – Backup file compression algorithm (0 - none, 1 - gzip, 2 - bzip2, 3 - xz) (default: 0)
  • data.bwlimit (integer) – Transfer rate limit in bytes (default: null => no limit)
  • data.desc (string) – Backup definition description
  • data.fsfreeze (boolean) – Whether to send filesystem freeze command to QEMU agent socket before creating backup snapshot (requires QEMU Guest Agent) (default: false)
Type:

data.type: integer

Status Codes:
PUT /vm/(hostname_or_uuid)/define/backup/(bkpdef)
DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • hostname_or_uuid (string) – required - Server hostname or uuid
  • bkpdef (string) – required - Backup definition name
  • data.disk_id (integer) – required - Disk number/ID (default: 1)
  • data.schedule (string) – Schedule in UTC CRON format (e.g. 30 4 * * 6)
  • data.retention (integer) – Maximum number of backups to keep
  • data.active (boolean) – Enable or disable backup schedule
  • data.compression (integer) – Backup file compression algorithm (0 - none, 1 - gzip, 2 - bzip2, 3 - xz)
  • data.bwlimit (integer) – Transfer rate limit in bytes
  • data.desc (string) – Backup definition description
Status Codes:
DELETE /vm/(hostname_or_uuid)/define/backup/(bkpdef)
DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • hostname_or_uuid (string) – required - Server hostname or uuid
  • bkpdef (string) – required - Backup definition name
  • data.disk_id (integer) – required - Disk number/ID (default: 1)
Status Codes:

es example:

es create /vm/example.cust.erigones.com/define/backup/daily -disk_id 1 -schedule "0 4 * * *" -retention 30 -node node99.erigones.com
{
    "url": "https://my.erigones.com/api/vm/demo01.cust.erigones.com/define/backup/daily/",
    "status": 201,
    "method": "POST",
    "text": {
        "status": "SUCCESS",
        "result": {
            "node": "node99.erigones.com",
            "name": "daily",
            "schedule": "0 4 * * *",
            "hostname": "example.cust.erigones.com",
            "disk_id": 1,
            "active": true,
            "zpool": "zones",
            "retention": 30,
            "bwlimit": null,
            "desc": ""
        },
        "task_id": "1e1-6f75849b-3e19-400b-9108"
    }
}

/vm/(hostname_or_uuid)/backup

api.vm.backup.views.vm_backup_list(*args, **kwargs)

List (GET) all VM backups. Delete (DELETE) VM backups specified by the list (data.bkpnames).

GET /vm/(hostname_or_uuid)/backup
DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • hostname_or_uuid (string) – required - Original server hostname or uuid
  • data.full (boolean) – Return list of objects with all backup details (default: false)
  • data.disk_id (integer) – Filter by original disk number/ID
  • data.define (string) – Filter by backup definition
  • data.order_by (string) – Available fields for sorting: name, disk_id, size, time, created (default: -created)
Status Codes:
DELETE /vm/(hostname_or_uuid)/backup
DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • hostname_or_uuid (string) – required - Original server hostname or uuid
  • data.bkpnames (array) – required - List of backups to be deleted
Status Codes:

es example:

es get /vm/example.cust.erigones.com/backup
{
    "url": "https://my.erigones.com/api/vm/example.cust.erigones.com/backup/",
    "status": 200,
    "method": "GET",
    "text": {
        "status": "SUCCESS",
        "result": [
            {
                "status": 1,
                "name": "daily-20131014_133701",
                "created": "2013-10-14T13:37:01.123Z",
                "hostname": "example.cust.erigones.com",
                "disk_id": 1,
                "note": "",
                "node": "node99.erigones.com",
                "size": 41843149,
                "time": 1337,
                "define": "daily"
            }
        ],
        "task_id": "0-6a75b49b-e63b-4a45-4ffa"
    }
}

/vm/(hostname_or_uuid)/backup/(bkpname)

api.vm.backup.views.vm_backup(*args, **kwargs)

Show (GET), create (POST), delete (DELETE) or restore (PUT) a backup of VM’s disk.

GET /vm/(hostname_or_uuid)/backup/(bkpname)
DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • hostname_or_uuid (string) – required - Original server hostname or uuid
  • bkpname (string) – required - Backup name
  • data.disk_id (integer) – required - Original disk number/ID (default: 1)
Status Codes:
POST /vm/(hostname_or_uuid)/backup/(bkpdef)
DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • hostname_or_uuid (string) – required - Server hostname or uuid
  • bkpname.bkpdef (string) – required - Backup definition name
  • data.disk_id (integer) – required - Disk number/ID (default: 1)
  • data.note (string) – Backup comment
Status Codes:
PUT /vm/(hostname_or_uuid)/backup/(bkpname)

Warning

A backup restore will restore disk data from the backup into target disk; All data created after the backup (including all existing snapshots) on target server will be lost!

DC-bound?:
Permissions:
Asynchronous?:
  • - Restore backup
Parameters:
  • hostname_or_uuid (string) – required - Original server hostname or uuid
  • bkpname (string) – required - Backup name
  • data.disk_id (integer) – Original disk number/ID (default: 1)
  • data.target_hostname_or_uuid (string) – required - Target server hostname or uuid
  • data.target_disk_id (integer) – required - Target disk number/ID
  • data.force (boolean) – Force restore and delete existing snapshots and backups (default: true)
Status Codes:
PUT /vm/(hostname_or_uuid)/backup/(bkpname)
DC-bound?:
Permissions:
Asynchronous?:
  • - Update backup note
Parameters:
  • hostname_or_uuid (string) – required - Original server hostname or uuid
  • bkpname (string) – required - Backup name
  • data.note (string) – required - Backup comment (change note instead of restore if specified)
Status Codes:
DELETE /vm/(hostname_or_uuid)/backup/(bkpname)
DC-bound?:
Permissions:
Asynchronous?:
Parameters:
  • hostname_or_uuid (string) – required - Original server hostname or uuid
  • bkpname (string) – required - Backup name
  • data.disk_id (integer) – required - Original disk number/ID (default: 1)
Status Codes:

es example:

es create /vm/example.cust.erigones.com/backup/daily -disk 1
{
    "url": "https://my.erigones.com/api/vm/example.cust.erigones.com/backup/daily/",
    "status": 200,
    "method": "POST",
    "text": {
        "status": "SUCCESS",
        "result": {
            "message": "Backup successfully created",
            "returncode": 0,
            "detail": "name=daily-20131014_133701, disk_id=1"
        },
        "task_id": "0-8b37f604-4930-41d6-1dbb"
    }
}