Previous page

Next page

Locate page in Contents

Print this page

copy

Summary:

Copies files and directories.

Request specification:

Name

Min/Max

Type

Description

copy

 

navigateType

The parent navigate_wildType type contains parameters allowing to specify source file information.

{

 

 

 

dst_path

1..1

base64Binary

Destination path including the directory name and the file name.

recursively

0..1

 

A flag indicating to process directories recursively.

force

0..1

 

A flag indicating to overwrite the file if it exists in the target directory.

{

0..1

 

Remote copying.

The sequence is not a child of the force element but a separate sequence.

dst

1..1

connection_infoType

The destination Container connection information. The Container must be located on the same host.

mode

0..1

mode_type

New access mode (in decimal form) to assign to copied files on the target machine.

}

 

 

 

}

 

 

 

Returns:

OK/Error

Description:

You can copy files between directories on the same server. You can also copy files between Virtuozzo Containers on the same host. To copy a file from one Container to another, include the dst element specifying the destination Server ID and, if necessary, the mode element specifying the new file access mode.

Example:

Copies a file mylog.log from the /root directory to the /root/mylogs directory using root/root credentials.

<packet>

<target>filer</target>

<data>

<filer>

<copy>

<path>cm9vdC9teWxvZy5sb2c=</path>

<cwd>Lw==</cwd>

<cred>

<user>root</user>

<group>root</group>

</cred>

<dst_path>L3Jvb3QvbXlsb2dzL215bG9nLmxvZw==</dst_path>

</copy>

</filer>

</data>

</packet>

Please send us your feedback on this help page