Previous page

Next page

Locate page in Contents

Print this page

selective_restore_env

Summary:

Selectively restore files from a backup.

Request specification:

Name

Min/Max

Type

Description

selective_restore_env

 

 

 

{

 

 

 

eid

1..1

eid_type

The ID of the server to restore the selected files to.

backup_id

1..1

backupid_type

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 list call. To search for backups for a particular server, use the search call.

path

1..[]

base64Binary

A list of files and directories to restore. Wildcards are permitted.

selective_restore_options

0..1

selective_restore_optionsType

Restore options.

backup_server

1..1

connection_infoType

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 get_configuration call.

}

 

 

 

Returns:

OK/Error

Description:

Use the selective_restore_env call to restore only the files and directories that you need or to restore from a backup that does not contain all the files and directories that are required for the server to operate properly. There are some important differences between the regular restore_env call and this call.

First of all, since you can only restore the files into an existing server, you must specify its Server ID. If the server doesn't exist, or cannot be found, the call will fail. Please note that the call will try to locate the specified server on the current host. Even if you execute the call on the Master Node in a Virtuozzo group, it will still look for the specified target server on the Master Node only. If your server is hosted by another node in a group, you will have to connect to it directly or provide its ID via the dst element in the message header.

You always have to specify the files and directories that you would like to restore. In addition, you may restore the files and directories into any available server of the same type as the original server.

As with other backup and restore operations, you may set the progress="on" and the id arguments in the packet element of the message header if you would like to receive progress reports during the restore operations.

Note: You can use the selective restore operation only with the backups that are capable of it. Use the list call to get the backup information and look for the capabilities/browsable flag in the result set. If the element is present, the selective restore operation can be performed on the backup.

Example:

Restoring the /var/tmp directory from the specified backup into the specified Virtuozzo Container.

Input

<packet progress="on" log="on" id="2" version="4.0.0">

<target>backupm</target>

<data>

<backupm>

<selective_restore_env>

<eid>57c2cd6c-c02b-4645-bdb5-e883ea005896</eid>

<backup_id>57c2cd6c-c02b-4645-bdb5-e883ea005896/20070219150134</backup_id>

<path>L3Zhci90bXA=</path>

</selective_restore_env>

</backupm>

</data>

</packet>

Progress messages:

The following is an example of one of the progress reports (this was the last progress message received, actually). When decoded, the message reads as follows:

Operation selective_restore_env finished successfully.

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="cc45dc6bdbt5af1r488" time="2007-02-20T09:00:16+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.selective_restore_env</ns1:op>

<ns1:message>

<ns1:message>T3BlcmF0aW9uICVvcF9uYW1lJSBpcyAlc3RhdHVzJSBzdWNjZXNzZnVsbHku</ns1:message>

<ns1:name></ns1:name>

<ns1:translate/>

<ns1:parameter>

<ns1:message>c2VsZWN0aXZlX3Jlc3RvcmVfZW52</ns1:message>

<ns1:name>op_name</ns1:name>

</ns1:parameter>

<ns1:parameter>

<ns1:message>ZmluaXNoZWQ=</ns1:message>

<ns1:name>status</ns1:name>

<ns1:translate/>

</ns1:parameter>

</ns1:message>

<ns1:percent>100</ns1:percent>

<ns1:status>3</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 final "OK" response on operation completion.

<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="cc45dc6bdbt5af1r488" time="2007-02-20T09:00:16+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>

Please send us your feedback on this help page