a fast, versatile, remote (and local) file-copying tool
|
-a, --archive
This is equivalent to -rlptgoD. It is a quick way of saying you want recursion and want to
preserve almost everything (with -H being a notable omission). The only exception to the above
equivalence is when --files-from is specified, in which case -r is not implied.
Note that -a does not preserve hardlinks, because finding multiply-linked files is expensive. You
must separately specify -H.
|
-x, --one-file-system
This tells rsync to avoid crossing a filesystem boundary when recursing. This does not limit the
user’s ability to specify items to copy from multiple filesystems, just rsync’s recursion through
the hierarchy of each directory that the user specified, and also the analogous recursion on the
receiving side during deletion. Also keep in mind that rsync treats a "bind" mount to the same
device as being on the same filesystem.
If this option is repeated, rsync omits all mount-point directories from the copy. Otherwise, it
includes an empty directory at each mount-point it encounters (using the attributes of the mounted
directory because those of the underlying mount-point directory are inaccessible).
If rsync has been told to collapse symlinks (via --copy-links or --copy-unsafe-links), a symlink
to a directory on another device is treated like a mount-point. Symlinks to non-directories are
unaffected by this option.
|
-v, --verbose
This option increases the amount of information you are given during the transfer. By default,
rsync works silently. A single -v will give you information about what files are being transferred
and a brief summary at the end. Two -v options will give you information on what files are being
skipped and slightly more information at the end. More than two -v options should only be used if
you are debugging rsync.
Note that the names of the transferred files that are output are done using a default --out-format
of "%n%L", which tells you just the name of the file and, if the item is a link, where it points.
At the single -v level of verbosity, this does not mention when a file gets its attributes
changed. If you ask for an itemized list of changed attributes (either --itemize-changes or
adding "%i" to the --out-format setting), the output (on the client) increases to mention all
items that are changed in any way. See the --out-format option for more details.
|
-H, --hard-links
This tells rsync to look for hard-linked files in the source and link together the corresponding
files on the destination. Without this option, hard-linked files in the source are treated as
though they were separate files.
This option does NOT necessarily ensure that the pattern of hard links on the destination exactly
matches that on the source. Cases in which the destination may end up with extra hard links
include the following:
o If the destination contains extraneous hard-links (more linking than what is present in the
source file list), the copying algorithm will not break them explicitly. However, if one
or more of the paths have content differences, the normal file-update process will break
those extra links (unless you are using the --inplace option).
o If you specify a --link-dest directory that contains hard links, the linking of the
destination files against the --link-dest files can cause some paths in the destination to
become linked together due to the --link-dest associations.
Note that rsync can only detect hard links between files that are inside the transfer set. If
rsync updates a file that has extra hard-link connections to files outside the transfer, that
linkage will be broken. If you are tempted to use the --inplace option to avoid this breakage, be
very careful that you know how your files are being updated so that you are certain that no
unintended changes happen due to lingering hard links (and see the --inplace option for more
caveats).
If incremental recursion is active (see --recursive), rsync may transfer a missing hard-linked
file before it finds that another link for that contents exists elsewhere in the hierarchy. This
does not affect the accuracy of the transfer (i.e. which files are hard-linked together), just its
efficiency (i.e. copying the data for a new, early copy of a hard-linked file that could have been
found later in the transfer in another member of the hard-linked set of files). One way to avoid
this inefficiency is to disable incremental recursion using the --no-inc-recursive option.
|
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
|