rsync_out


Description:

[ Version ( since = "1.19.29" ) ]
public bool rsync_out (string src, string remote, RsyncOut? optargs) throws Error

synchronize filesystem with host or remote filesystem

This call may be used to copy or synchronize the filesystem within libguestfs with a filesystem on the host or on a remote computer. This uses the rsync(1) program which uses a fast algorithm that avoids copying files unnecessarily.

This call only works if the network is enabled. See set_network or the *--network* option to various tools like guestfish(1).

Files are copied from the source directory src to the remote server and directory specified by remote.

The format of the remote server string is defined by rsync(1). Note that there is no way to supply a password or passphrase so the target must be set up not to require one.

The optional arguments are the same as those of rsync.

Globbing does not happen on the src parameter. In programs which use the API directly you have to expand wildcards yourself (see glob_expand). In guestfish you can use the glob command (see "glob" in guestfish(1)), for example:

<![CDATA[><fs> glob rsync-out /* rsync://remote/]]>

This function depends on the feature "rsync". See also feature_available.

Parameters:

this

A GuestfsSession object

optargs

a GuestfsRsyncOut containing optional arguments

Returns:

true on success, false on error