Get Virtualizor

List Backup Server

Use the List Backup Server API to list information about the backup servers. These are remote servers on which backup of the VPS image takes place. The list contains details of the available backup servers listed according to their IDs. To filter or limit the size of the list, you can specify one or more query parameters.

See also: Backup Plans guide.

HTTP Request

https://hostname:4085/index.php?act=backupservers

Parameters

Sample Code

<?php

    require_once('/usr/local/virtualizor/sdk/admin.php');

    $key =  'your_api_key';
    $pass = 'your_api_pass';
    $ip = 'your_server_ip';

    $admin = new Virtualizor_Admin_API($ip, $key, $pass);

    $page = 1;
    $reslen = 10;
    $post = array();
    $post['name'] = '';
    $post['hostname'] = '';
    $post['type'] = '';

    $output = $admin->backupservers($page, $reslen, $post);

    print_r(json_encode($output));
?>

Output

{
    "title": "Backup Servers",
    "backupservers": {
        "1": {
            "bid": "1",
            "type": "SSH",
            "name": "slate_doc_server",
            "hostname": "192.168.1.123",
            "username": "root",
            "port": "22",
            "dir": "/tmp/backup"
        }
    },
    "timenow": 1535553888,
    "time_taken": "0.219"
}
    Was this page helpful?
    Newsletter Subscription
    Subscribing you to the mailing list