Summary:
Restores a server from a backup.
Request specification:
Name |
Min/Max |
Type |
Description |
|
|
|
|
|
|
|
|
|
|
Backup ID. The ID is generated and returned to the client program at the end of the backup operation. To get the list of the existing backups, use the |
|
|
|
Restore options. |
|
|
|
Backup server connectivity information for remote backups. If this element is omitted, the default backup server configuration will be used. To retrieve the default configuration, use the |
|
|
|
This parameter is used only when restoring a Container within a Virtuozzo group. Normally, in a Virtuozzo group, a Container is restored to the original Hardware Node. If the original Hardware Node is not found, the restore operation will fail. In such a situation, you can use this parameter to specify the alternate Hardware Node to which to restore the Container. The following conditions apply: 1. The call must be executed on the Master Node in the group. 2. If the original Hardware Node exists, this parameter will be ignored. |
|
|
|
|
|
Returns:
OK/Error
Description:
Use the restore_env
call to restore a server from a backup. The backup that you are restoring from must be one of the following:
By default, a server will be restored to the host that you are currently connected to. In a Virtuozzo group, a server will be restored to the original Node. If the original Node is no longer registered with the group, use the parent_eid
parameter to specify an alternate Node.
You may set the progress="on"
and the id
arguments in the packet element of the message header if you would like to receive the progress reports during the restore operations.
Example:
Restoring a server from the specified backup located on the default backup server. The server will be restored to the host that we are currently connected to.
Input
<packet progress="on" log="on" id="2" version="4.0.0">
<target>backupm</target>
<data>
<backupm>
<restore_env>
<backup_id>57c2cd6c-c02b-4645-bdb5-e883ea005896/20070219150134</backup_id>
<restore_options>
<force/>
</restore_options>
</restore_env>
</backupm>
</data>
</packet>
Progress messages
The following is an example of one of the progress reports. When decoded, the message reads:
Operation restore_env started.
See backup_env
and progress
packet for more info on progress messages.
<ns1:packet xmlns:ns1="http://www.swsoft.com/webservices/vzl/4.0.0/protocol" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="bc45dc4ddbt6df1r488" time="2007-02-20T07:24:34+0000" type="1" priority="4000" version="4.0.0">
<ns1:origin>backupm</ns1:origin>
<ns1:target>vzclient3</ns1:target>
<ns1:dst>
<ns1:director>gend</ns1:director>
</ns1:dst>
<ns1:data>
<ns1:progress>
<ns1:op>backupm.restore_env</ns1:op>
<ns1:message>
<ns1:message>T3BlcmF0aW9uICVvcF9uYW1lJSBpcyAlc3RhdHVzJQ==</ns1:message>
<ns1:name></ns1:name>
<ns1:translate/>
<ns1:parameter>
<ns1:message>cmVzdG9yZV9lbnY=</ns1:message>
<ns1:name>op_name</ns1:name>
</ns1:parameter>
<ns1:parameter>
<ns1:message>c3RhcnRlZA==</ns1:message>
<ns1:name>status</ns1:name>
<ns1:translate/>
</ns1:parameter>
</ns1:message>
<ns1:status>1</ns1:status>
</ns1:progress>
</ns1:data>
<ns1:target>log_subscription</ns1:target>
<ns1:src>
<ns1:director>gend</ns1:director>
</ns1:src>
</ns1:packet>
Output
The following "OK" message is received on successful restoration.
<ns1:packet xmlns:ns1="http://www.swsoft.com/webservices/vzl/4.0.0/protocol" xmlns:ns2="http://www.swsoft.com/webservices/vzl/4.0.0/backupm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="bc45dc4ddbt6df1r488" time="2007-02-20T07:25:10+0000" priority="4000" version="4.0.0">
<ns1:origin>backupm</ns1:origin>
<ns1:target>vzclient3</ns1:target>
<ns1:dst>
<ns1:director>gend</ns1:director>
</ns1:dst>
<ns1:data>
<ns2:backupm>
<ns1:ok/>
</ns2:backupm>
</ns1:data>
<ns1:src>
<ns1:director>gend</ns1:director>
</ns1:src>
</ns1:packet>