DESCRIPTION
rsync is a program that behaves in much the same way that rcp does, but
has many more options and uses the rsync remote-update protocol to
greatly speed up file transfers when the destination file already
exists.
The rsync remote-update protocol allows rsync to transfer just the dif-
ferences between two sets of files across the network link, using an
efficient checksum-search algorithm described in the technical report
that accompanies this package.
Some of the additional features of rsync are:
o support for copying links, devices, owners, groups and permis-
sions
o exclude and exclude-from options similar to GNU tar
o a CVS exclude mode for ignoring the same files that CVS would
ignore
o can use any transparent remote shell, including rsh or ssh
o does not require root privileges
o pipelining of file transfers to minimize latency costs
o support for anonymous or authenticated rsync servers (ideal for
mirroring)
[...]
USAGE
You use rsync in the same way you use rcp. You must specify a source
and a destination, one of which may be remote.
Perhaps the best way to explain the syntax is some examples:
rsync *.c foo:src/
this would transfer all files matching the pattern *.c from the current
directory to the directory src on the machine foo. If any of the files
already exist on the remote system then the rsync remote-update proto-
col is used to update the file by sending only the differences. See the
tech report for details.
rsync -avz foo:src/bar /data/tmp
this would recursively transfer all files from the directory src/bar on
the machine foo into the /data/tmp/bar directory on the local machine.
The files are transferred in "archive" mode, which ensures that sym-
bolic links, devices, attributes, permissions, ownerships etc are pre-
served in the transfer. Additionally, compression will be used to
reduce the size of data portions of the transfer.
rsync -avz foo:src/bar/ /data/tmp
a trailing slash on the source changes this behavior to transfer all
files from the directory src/bar on the machine foo into the
/data/tmp/. A trailing / on a source name means "copy the contents of
this directory". Without a trailing slash it means "copy the direc-
tory". This difference becomes particularly important when using the
--delete option.
You can also use rsync in local-only mode, where both the source and
destination don't have a ':' in the name. In this case it behaves like
an improved copy command.
rsync somehost.mydomain.com::
this would list all the anonymous rsync modules available on the host
somehost.mydomain.com. (See the following section for more details.)