rsync(1) User Commands rsync(1)
NAME
rsync - a fast, versatile, remote (and local) file‐copying tool
SYNOPSIS
Local:
rsync [OPTION...] SRC... [DEST]
Access via remote shell:
Pull:
rsync [OPTION...] [USER@]HOST:SRC... [DEST]
Push:
rsync [OPTION...] SRC... [USER@]HOST:DEST
Access via rsync daemon:
Pull:
rsync [OPTION...] [USER@]HOST::SRC... [DEST]
rsync [OPTION...] rsync://[USER@]HOST[:PORT]/SRC... [DEST]
Push:
rsync [OPTION...] SRC... [USER@]HOST::DEST
rsync [OPTION...] SRC... rsync://[USER@]HOST[:PORT]/DEST)
Usages with just one SRC arg and no DEST arg will list the source files
instead of copying.
The online version of this manpage (that includes cross‐linking of top‐
ics) is available at https://download.samba.org/pub/rsync/rsync.1.
DESCRIPTION
Rsync is a fast and extraordinarily versatile file copying tool. It can
copy locally, to/from another host over any remote shell, or to/from a
remote rsync daemon. It offers a large number of options that control
every aspect of its behavior and permit very flexible specification of
the set of files to be copied. It is famous for its delta‐transfer al‐
gorithm, which reduces the amount of data sent over the network by send‐
ing only the differences between the source files and the existing files
in the destination. Rsync is widely used for backups and mirroring and
as an improved copy command for everyday use.
Rsync finds files that need to be transferred using a "quick check" al‐
gorithm (by default) that looks for files that have changed in size or
in last‐modified time. Any changes in the other preserved attributes
(as requested by options) are made on the destination file directly when
the quick check indicates that the file’s data does not need to be up‐
dated.
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 ig‐
nore
o can use any transparent remote shell, including ssh or rsh
o does not require super‐user privileges
o pipelining of file transfers to minimize latency costs
o support for anonymous or authenticated rsync daemons (ideal for
mirroring)
GENERAL
Rsync copies files either to or from a remote host, or locally on the
current host (it does not support copying files between two remote
hosts).
There are two different ways for rsync to contact a remote system: using
a remote‐shell program as the transport (such as ssh or rsh) or contact‐
ing an rsync daemon directly via TCP. The remote‐shell transport is
used whenever the source or destination path contains a single colon (:)
separator after a host specification. Contacting an rsync daemon di‐
rectly happens when the source or destination path contains a double
colon (::) separator after a host specification, OR when an rsync:// URL
is specified (see also the USING RSYNC‐DAEMON FEATURES VIA A REMOTE‐
SHELL CONNECTION section for an exception to this latter rule).
As a special case, if a single source arg is specified without a desti‐
nation, the files are listed in an output format similar to "ls -l".
As expected, if neither the source or destination path specify a remote
host, the copy occurs locally (see also the --list‐only option).
Rsync refers to the local side as the