vserver_restore ()
Restores a VPS from a backup.
The target VPS content will be overwriten by the backup. Any data changed since the backup will be lost!
We recommend that you perform the action when the VPS is shutted down.
HTTP Method: | GET | |
---|---|---|
Parameters: | sid | session id* |
vserver_id | unique id of VPS* | |
backup_id | backup identifier* | |
Returns: | HTTP code | 200 (OK) |
Function call successful. Reply portion reply is empty. |
Return errors
Error code | HTTP response code | Description |
---|---|---|
1 | 400 (Bad request) | Function was not performed, because all required parameters were not entered. Reply portion reply is empty. |
3 | 403 (Forbidden) | Function call failed, invalid sid parameter. Create new sid using /api/login function. Reply portion reply is empty. |
4 | 400 (Bad request) | The requested backup does not exist. |
5 | 403 (Forbidden) | Function has not been performed, because it is probably an attempt to manipulate VPS that is not in your administration. Reply portion reply is empty. |
CURL
curl "https://admin.hosting90.eu/api/vserver_restore?sid=%sid%&vserver_id=%vserver_id%&backup_id=%backup_id%"
PHP Library
$api->vserver_restore(array(
'vserver_id' => %vserver_id%,
'backup_id' => %backup_id%,
));
Example of data output
<?xml version="1.0" encoding="UTF-8"?>
<reply>
<status>
<code>0</code>
<text>Restore queued</text>
</status>
<request_id>8e264500a67a6f7ef6d931125e8e3a756f5a32b9</request_id>
</reply>