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.
|
-A, --acls
This option causes rsync to update the destination ACLs to be the same as the source ACLs. The
option also implies --perms.
The source and destination systems must have compatible ACL entries for this option to work
properly. See the --fake-super option for a way to backup and restore ACLs that are not
compatible.
|
-X, --xattrs
This option causes rsync to update the destination extended attributes to be the same as the
source ones.
For systems that support extended-attribute namespaces, a copy being done by a super-user copies
all namespaces except system.*. A normal user only copies the user.* namespace. To be able to
backup and restore non-user namespaces as a normal user, see the --fake-super option.
Note that this option does not copy rsyncs special xattr values (e.g. those used by --fake-super)
unless you repeat the option (e.g. -XX). This "copy all xattrs" mode cannot be used with
--fake-super.
|
-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.
|