mailto(rsync-bugs@samba.org)
-manpage(rsync)(1)(11 Oct 2007)()()
+manpage(rsync)(1)(8 May 2009)()()
manpagename(rsync)(a fast, versatile, remote (and local) file-copying tool)
manpagesynopsis()
As expected, if neither the source or destination path specify a remote
host, the copy occurs locally (see also the bf(--list-only) option).
+Rsync refers to the local side as the "client" and the remote side as the
+"server". Don't confuse "server" with an rsync daemon -- a daemon is always a
+server, but a server can be either a daemon or a remote-shell spawned process.
+
manpagesection(SETUP)
See the file README for installation instructions.
rsync -av targethost1::module/src/ /dest/
rsync -av rsync:://targethost2/module/src/ /dest/ )
-The command specifed above uses ssh to run nc (netcat) on a proxyhost,
+The command specified above uses ssh to run nc (netcat) on a proxyhost,
which forwards all data to port 873 (the rsync daemon) on the targethost
(%H).
-u, --update skip files that are newer on the receiver
--inplace update destination files in-place
--append append data onto shorter files
- --append-verify --append w/old data in file cheksum
+ --append-verify --append w/old data in file checksum
-d, --dirs transfer directories without recursing
-l, --links copy symlinks as symlinks
-L, --copy-links transform symlink into referent file/dir
--super receiver attempts super-user activities
--fake-super store/recover privileged attrs using xattrs
-S, --sparse handle sparse files efficiently
- -n, --dry-run show what would have been transferred
- -W, --whole-file copy files whole (without rsync algorithm)
+ -n, --dry-run perform a trial run with no changes made
+ -W, --whole-file copy files whole (w/o delta-xfer algorithm)
-x, --one-file-system don't cross filesystem boundaries
-B, --block-size=SIZE force a fixed checksum block-size
-e, --rsh=COMMAND specify the remote shell to use
--delete-delay find deletions during, delete after
--delete-after receiver deletes after transfer, not before
--delete-excluded also delete excluded files from dest dirs
+ --ignore-missing-args ignore missing source args without error
+ --delete-missing-args delete missing source args from destination
--ignore-errors delete even if there are I/O errors
--force force deletion of dirs even if not empty
--max-delete=NUM don't delete more than NUM files
--delay-updates put all updated files into place at end
-m, --prune-empty-dirs prune empty directory chains from file-list
--numeric-ids don't map uid/gid values by user/group name
- --timeout=TIME set I/O timeout in seconds
+ --timeout=SECONDS set I/O timeout in seconds
+ --contimeout=SECONDS set daemon connection timeout in seconds
-I, --ignore-times don't skip files that match size and time
--size-only skip files that match in size
--modify-window=NUM compare mod-times with reduced accuracy
--only-write-batch=FILE like --write-batch but w/o updating dest
--read-batch=FILE read a batched update from FILE
--protocol=NUM force an older protocol version to be used
- --iconv=CONVERT_SPEC request charset conversion of filesnames
+ --iconv=CONVERT_SPEC request charset conversion of filenames
--checksum-seed=NUM set block/file checksum seed (advanced)
-4, --ipv4 prefer IPv4
-6, --ipv6 prefer IPv6
dit(bf(-v, --verbose)) This option increases the amount of information you
are given during the transfer. By default, rsync works silently. A
single bf(-v) will give you information about what files are being
-transferred and a brief summary at the end. Two bf(-v) flags will give you
+transferred and a brief summary at the end. Two bf(-v) options will give you
information on what files are being skipped and slightly more
-information at the end. More than two bf(-v) flags should only be used if
+information at the end. More than two bf(-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
dit(bf(-q, --quiet)) This option decreases the amount of information you
are given during the transfer, notably suppressing information messages
-from the remote server. This flag is useful when invoking rsync from
+from the remote server. This option is useful when invoking rsync from
cron.
dit(bf(--no-motd)) This option affects the information that is output
been changed and are in need of a transfer. Without this option, rsync
uses a "quick check" that (by default) checks if each file's size and time
of last modification match between the sender and receiver. This option
-changes this to compare a 128-bit MD4 checksum for each file that has a
+changes this to compare a 128-bit checksum for each file that has a
matching size. Generating the checksums means that both sides will expend
a lot of disk I/O reading all the data in the files in the transfer (and
this is prior to any reading that will be done to transfer changed files),
Note that rsync always verifies that each em(transferred) file was
correctly reconstructed on the receiving side by checking a whole-file
-checksum that is generated when as the file is transferred, but that
+checksum that is generated as the file is transferred, but that
automatic after-the-transfer verification has nothing to do with this
option's before-the-transfer "Does this file need to be updated?" check.
+For protocol 30 and beyond (first supported in 3.0.0), the checksum used is
+MD5. For older protocols, the checksum used is MD4.
+
dit(bf(-a, --archive)) This is equivalent to bf(-rlptgoD). It is a quick
way of saying you want recursion and want to preserve almost
everything (with -H being a notable omission).
bf(--omit-dir-times) option will be implied, and (2) if bf(--delete) is
also in effect (without bf(--delete-excluded)), rsync will add a "protect"
filter-rule for the backup suffix to the end of all your existing excludes
-(e.g. bf(-f "Pp *~")). This will prevent previously backed-up files from being
+(e.g. bf(-f "P *~")). This will prevent previously backed-up files from being
deleted. Note that if you are supplying your own filter rules, you may
need to manually insert your own exclude/protect rule somewhere higher up
in the list so that it has a high enough priority to be effective (e.g., if
where the destination has a file, the transfer would occur regardless of
the timestamps.
-dit(bf(--inplace)) This causes rsync not to create a new copy of the file
-and then move it into place. Instead rsync will overwrite the existing
-file, meaning that the rsync algorithm can't accomplish the full amount of
-network reduction it might be able to otherwise (since it does not yet try
-to sort data matches). One exception to this is if you combine the option
-with bf(--backup), since rsync is smart enough to use the backup file as the
-basis file for the transfer.
+This option is a transfer rule, not an exclude, so it doesn't affect the
+data that goes into the file-lists, and thus it doesn't affect deletions.
+It just limits the files that the receiver requests to be transferred.
+
+dit(bf(--inplace)) This option changes how rsync transfers a file when the
+file's data needs to be updated: instead of the default method of creating
+a new copy of the file and moving it into place when it is complete, rsync
+instead writes the updated data directly to the destination file.
+
+This has several effects: (1) in-use binaries cannot be updated (either the
+OS will prevent this from happening, or binaries that attempt to swap-in
+their data will misbehave or crash), (2) the file's data will be in an
+inconsistent state during the transfer, (3) a file's data may be left in an
+inconsistent state after the transfer if the transfer is interrupted or if
+an update fails, (4) a file that does not have write permissions can not be
+updated, and (5) the efficiency of rsync's delta-transfer algorithm may be
+reduced if some data in the destination file is overwritten before it can
+be copied to a position later in the file (one exception to this is if you
+combine this option with bf(--backup), since rsync is smart enough to use
+the backup file as the basis file for the transfer).
+
+WARNING: you should not use this option to update files that are being
+accessed by others, so be careful when choosing to use this for a copy.
This option is useful for transfer of large files with block-based changes
or appended data, and also on systems that are disk bound, not network
Prior to rsync 2.6.4 bf(--inplace) was also incompatible with bf(--compare-dest)
and bf(--link-dest).
-WARNING: The file's data will be in an inconsistent state during the
-transfer (and possibly afterward if the transfer gets interrupted), so you
-should not use this option to update files that are in use. Also note that
-rsync will be unable to update a file in-place that is not writable by the
-receiving user.
-
dit(bf(--append)) This causes rsync to update a file by appending data onto
the end of the file, which presumes that the data that already exists on
the receiving side is identical with the start of the file on the sending
-side. Any files that are the same size or shorter on the receiving size
-are skipped. Files that do not yet exist on the receiving side are also
-sent, since they are considered to have 0 length. Implies bf(--inplace),
+side. If a file needs to be transferred and its size on the receiver is
+the same or longer than the size on the sender, the file is skipped. This
+does not interfere with the updating of a file's non-content attributes
+(e.g. permissions, ownership, etc.) when the file does not need to be
+transferred, nor does it affect the updating of any non-regular files.
+Implies bf(--inplace),
but does not conflict with bf(--sparse) (since it is always extending a
file's length).
output a message to that effect for each one). If you specify both
bf(--dirs) and bf(--recursive), bf(--recursive) takes precedence.
-This option is implied by the bf(--list-only) option (including an implied
+The bf(--dirs) option is implied by the bf(--files-from) option
+or the bf(--list-only) option (including an implied
bf(--list-only) usage) if bf(--recursive) wasn't specified (so that
directories are seen in the listing). Specify bf(--no-dirs) (or bf(--no-d))
-if you want to override this. This option is also implied by
-bf(--files-from).
+if you want to turn this off.
+
+There is also a backward-compatibility helper option, bf(--old-dirs) (or
+bf(--old-d)) that tells rsync to use a hack of "-r --exclude='/*/*'" to get
+an older rsync to list a single directory without recursing.
dit(bf(-l, --links)) When symlinks are encountered, recreate the
symlink on the destination.
bf(--keep-dirlinks), the receiver keeps the symlink and "file" ends up in
"bar".
+One note of caution: if you use bf(--keep-dirlinks), you must trust all
+the symlinks in the copy! If it is possible for an untrusted user to
+create their own symlink to any directory, the user could then (on a
+subsequent copy) replace the symlink with a real directory and affect the
+content of whatever directory the symlink references. For backup copies,
+you are better off using something like a bind mount instead of a symlink
+to modify your receiving hierarchy.
+
See also bf(--copy-dirlinks) for an analogous option for the sending side.
dit(bf(-H, --hard-links)) This tells rsync to look for hard-linked files in
side. Without this option, hard-linked files in the transfer are treated
as though they were separate files.
-Note that rsync can only detect hard links if both parts of the link
-are in the list of files being sent.
+When you are updating a non-empty destination, this option only ensures
+that files that are hard-linked together on the source are hard-linked
+together on the destination. It does NOT currently endeavor to break
+already existing hard links on the destination that do not exist between
+the source files. Note, however, that if one or more extra-linked files
+have content changes, they will become unlinked when updated (assuming you
+are not using the bf(--inplace) option).
+
+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 bf(--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 bf(--inplace) option for more caveats).
If incremental recursion is active (see bf(--recursive)), rsync may transfer
-a missing hard-linked file before it finds that another link for the file
+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, just its efficiency. One way to avoid this is to disable
incremental recursion using the bf(--no-inc-recursive) option.
bf(--perms) option is off and use bf(--chmod=ugo=rwX) (which ensures that
all non-masked bits get enabled). If you'd care to make this latter
behavior easier to type, you could define a popt alias for it, such as
-putting this line in the file ~/.popt (this defines the bf(-s) option,
+putting this line in the file ~/.popt (the following defines the bf(-Z) option,
and includes --no-g to use the default group of the destination dir):
-quote(tt( rsync alias -s --no-p --no-g --chmod=ugo=rwX))
+quote(tt( rsync alias -Z --no-p --no-g --chmod=ugo=rwX))
You could then use this new option in a command such as this one:
-quote(tt( rsync -asv src/ dest/))
+quote(tt( rsync -avZ src/ dest/))
-(Caveat: make sure that bf(-a) does not follow bf(-s), or it will re-enable
-the "--no-*" options.)
+(Caveat: make sure that bf(-a) does not follow bf(-Z), or it will re-enable
+the two "--no-*" options mentioned above.)
The preservation of the destination's setgid bit on newly-created
directories when bf(--perms) is off was added in rsync 2.6.7. Older rsync
option is not used, the optimization that excludes files that have not been
modified cannot be effective; in other words, a missing bf(-t) or bf(-a) will
cause the next transfer to behave as if it used bf(-I), causing all files to be
-updated (though the rsync algorithm will make the update fairly efficient
+updated (though rsync's delta-transfer algorithm will make the update fairly efficient
if the files haven't actually changed, you're much better off using bf(-t)).
dit(bf(-O, --omit-dir-times)) This tells rsync to omit directories when
option, and copying devices via the bf(--devices) option. This is useful
for systems that allow such activities without being the super-user, and
also for ensuring that you will get errors if the receiving side isn't
-being running as the super-user. To turn off super-user activities, the
+being run as the super-user. To turn off super-user activities, the
super-user can use bf(--no-super).
dit(bf(--fake-super)) When this option is enabled, rsync simulates
This option also handles ACLs (if bf(--acls) was specified) and non-user
extended attributes (if bf(--xattrs) was specified).
-This is a good way to backup data withou using a super-user, and to store
+This is a good way to backup data without using a super-user, and to store
ACLs from incompatible systems.
The bf(--fake-super) option only affects the side where the option is used.
quote(tt( rsync -av --rsync-path="rsync --fake-super" /src/ host:/dest/))
Since there is only one "side" in a local copy, this option affects both
-the sending and recieving of files. You'll need to specify a copy using
+the sending and receiving of files. You'll need to specify a copy using
"localhost" if you need to avoid this, possibly using the "lsh" shell
script (from the support directory) as a substitute for an actual remote
shell (see bf(--rsh)).
filesystem. It doesn't seem to handle seeks over null regions
correctly and ends up corrupting the files.
-dit(bf(-n, --dry-run)) This tells rsync to not do any file transfers,
-instead it will just report the actions it would have taken.
-
-dit(bf(-W, --whole-file)) With this option the delta transfer algorithm
+dit(bf(-n, --dry-run)) This makes rsync perform a trial run that doesn't
+make any changes (and produces mostly the same output as a real run). It
+is most commonly used in combination with the bf(-v, --verbose) and/or
+bf(-i, --itemize-changes) options to see what an rsync command is going
+to do before one actually runs it.
+
+The output of bf(--itemize-changes) is supposed to be exactly the same on a
+dry run and a subsequent real run (barring intentional trickery and system
+call failures); if it isn't, that's a bug. Other output is the same to the
+extent practical, but may differ in some areas. Notably, a dry run does not
+send the actual data for file transfers, so bf(--progress) has no effect,
+the "bytes sent", "bytes received", "literal data", and "matched data"
+statistics are too small, and the "speedup" value is equivalent to a run
+where no file transfers are needed.
+
+dit(bf(-W, --whole-file)) With this option rsync's delta-transfer algorithm
is not used and the whole file is sent as-is instead. The transfer may be
faster if this option is used when the bandwidth between the source and
destination machines is higher than the bandwidth to disk (especially when the
combined with the bf(--ignore-existing) option, no files will be updated
(which can be useful if all you want to do is delete extraneous files).
+This option is a transfer rule, not an exclude, so it doesn't affect the
+data that goes into the file-lists, and thus it doesn't affect deletions.
+It just limits the files that the receiver requests to be transferred.
+
dit(bf(--ignore-existing)) This tells rsync to skip updating files that
already exist on the destination (this does em(not) ignore existing
directories, or nothing would get done). See also bf(--existing).
+This option is a transfer rule, not an exclude, so it doesn't affect the
+data that goes into the file-lists, and thus it doesn't affect deletions.
+It just limits the files that the receiver requests to be transferred.
+
This option can be useful for those doing backups using the bf(--link-dest)
option when they need to continue a backup run that got interrupted. Since
a bf(--link-dest) run is copied into a new directory hierarchy (when it is
send the whole directory (e.g. "dir" or "dir/") without using a wildcard
for the directory's contents (e.g. "dir/*") since the wildcard is expanded
by the shell and rsync thus gets a request to transfer individual files, not
-the files' parent directory. Files that are excluded from transfer are
+the files' parent directory. Files that are excluded from the transfer are
also excluded from being deleted unless you use the bf(--delete-excluded)
option or mark the rules as only matching on the sending side (see the
include/exclude modifiers in the FILTER RULES section).
The bf(--delete) option may be combined with one of the --delete-WHEN options
without conflict, as well as bf(--delete-excluded). However, if none of the
--delete-WHEN options are specified, rsync will choose the
-bf(--delete-during) algorithm when talking to an rsync 3.0.0 or newer, and
+bf(--delete-during) algorithm when talking to rsync 3.0.0 or newer, and
the bf(--delete-before) algorithm when talking to an older rsync. See also
bf(--delete-delay) and bf(--delete-after).
memory at once (see bf(--recursive)).
dit(bf(--delete-during, --del)) Request that the file-deletions on the
-receiving side be done incrementally as the transfer happens. This is
-a faster method than choosing the before- or after-transfer algorithm,
-but it is only supported beginning with rsync version 2.6.4.
+receiving side be done incrementally as the transfer happens. The
+per-directory delete scan is done right before each directory is checked
+for updates, so it behaves like a more efficient bf(--delete-before),
+including doing the deletions prior to any per-directory filter files
+being updated. This option was first added in rsync version 2.6.4.
See bf(--delete) (which is implied) for more details on file-deletion.
dit(bf(--delete-delay)) Request that the file-deletions on the receiving
-side be computed during the transfer, and then removed after the transfer
-completes. If the number of removed files overflows an internal buffer, a
+side be computed during the transfer (like bf(--delete-during)), and then
+removed after the transfer completes. This is useful when combined with
+bf(--delay-updates) and/or bf(--fuzzy), and is more efficient than using
+bf(--delete-after) (but can behave differently, since bf(--delete-after)
+computes the deletions in a separate pass after all updates are done).
+If the number of removed files overflows an internal buffer, a
temporary file will be created on the receiving side to hold the names (it
is removed while open, so you shouldn't see it during the transfer). If
the creation of the temporary file fails, rsync will try to fall back to
using bf(--delete-after) (which it cannot do if bf(--recursive) is doing an
incremental scan).
+See bf(--delete) (which is implied) for more details on file-deletion.
dit(bf(--delete-after)) Request that the file-deletions on the receiving
side be done after the transfer has completed. This is useful if you
bf(--delete-excluded).
See bf(--delete) (which is implied) for more details on file-deletion.
+dit(bf(--ignore-missing-args)) When rsync is first processing the explicitly
+requested source files (e.g. command-line arguments or bf(--files-from)
+entries), it is normally an error if the file cannot be found. This option
+suppresses that error, and does not try to transfer the file. This does not
+affect subsequent vanished-file errors if a file was initially found to be
+present and later is no longer there.
+
+dit(bf(--delete-missing-args)) This option takes the behavior of (the implied)
+bf(--ignore-missing-args) option a step farther: each missing arg will become
+a deletion request of the corresponding destination file on the receiving side
+(should it exist). If the destination file is a non-empty directory, it will
+only be successfully deleted if --force or --delete are in effect. Other than
+that, this option is independent of any other type of delete processing.
+
+The missing source files are represented by special file-list entries which
+display as a "*missing" entry in the bf(--list-only) output.
+
dit(bf(--ignore-errors)) Tells bf(--delete) to go ahead and delete files
even when there are I/O errors.
suffixed with a string to indicate a size multiplier, and
may be a fractional value (e.g. "bf(--max-size=1.5m)").
+This option is a transfer rule, not an exclude, so it doesn't affect the
+data that goes into the file-lists, and thus it doesn't affect deletions.
+It just limits the files that the receiver requests to be transferred.
+
The suffixes are as follows: "K" (or "KiB") is a kibibyte (1024),
"M" (or "MiB") is a mebibyte (1024*1024), and "G" (or "GiB") is a
gibibyte (1024*1024*1024).
dit(bf(--min-size=SIZE)) This tells rsync to avoid transferring any
file that is smaller than the specified SIZE, which can help in not
transferring small, junk files.
-See the bf(--max-size) option for a description of SIZE.
+See the bf(--max-size) option for a description of SIZE and other information.
dit(bf(-B, --block-size=BLOCKSIZE)) This forces the block size used in
-the rsync algorithm to a fixed value. It is normally selected based on
+rsync's delta-transfer algorithm to a fixed value. It is normally selected based on
the size of each file being updated. See the technical report for details.
dit(bf(-e, --rsh=COMMAND)) This option allows you to choose an alternative
initial items are marked as perishable -- see the FILTER RULES section):
quote(quote(tt(RCS SCCS CVS CVS.adm RCSLOG cvslog.* tags TAGS .make.state
-.nse_depinfo *~ #* .#* ,* _$* *$ *.old *.bak *.BAK *.orig *.rej
-.del-* *.a *.olb *.o *.obj *.so *.exe *.Z *.elc *.ln core .svn/ .bzr/)))
+.nse_depinfo *~ #* .#* ,* _$* *$ *.old *.bak *.BAK *.orig *.rej .del-*
+*.a *.olb *.o *.obj *.so *.exe *.Z *.elc *.ln core .svn/ .git/ .bzr/)))
then, files listed in a $HOME/.cvsignore are added to the list and any
files listed in the CVSIGNORE environment variable (all cvsignore names
most useful in combination with a recursive transfer.
You may use as many bf(--filter) options on the command line as you like
-to build up the list of files to exclude.
+to build up the list of files to exclude. If the filter contains whitespace,
+be sure to quote it so that the shell gives the rule to rsync as a single
+argument. The text below also mentions that you can use an underscore to
+replace the space that separates a rule from its arg.
See the FILTER RULES section for detailed information on this option.
expanded on the remote host by rsync (instead of the shell doing it).
If you use this option with bf(--iconv), the args will also be translated
-from the local to the remote character set. The translation happens before
+from the local to the remote character-set. The translation happens before
wild-cards are expanded. See also the bf(--files-from) option.
dit(bf(-T, --temp-dir=DIR)) This option instructs rsync to use DIR as a
This option is most often used when the receiving disk partition does not
have enough free space to hold a copy of the largest file in the transfer.
-In this case (i.e. when the scratch directory in on a different disk
+In this case (i.e. when the scratch directory is on a different disk
partition), rsync will not be able to rename each received temporary file
over the top of the associated destination file, but instead must copy it
into place. Rsync does this by copying the file over the top of the
quote(tt( rsync -av --link-dest=$PWD/prior_dir host:src_dir/ new_dir/))
+If file's aren't linking, double-check their attributes. Also check if some
+attributes are getting forced outside of rsync's control, such a mount option
+that squishes root to a single user, or mounts a removable drive with generic
+ownership (such as OS X's "Ignore ownership on this volume" option).
+
Beginning in version 2.6.4, multiple bf(--link-dest) directories may be
provided, which will cause rsync to search the list in the order specified
for an exact match.
timeout in seconds. If no data is transferred for the specified time
then rsync will exit. The default is 0, which means no timeout.
+dit(bf(--contimeout)) This option allows you to set the amount of time
+that rsync will wait for its connection to an rsync daemon to succeed.
+If the timeout is reached, rsync exits with an error.
+
dit(bf(--address)) By default rsync will bind to the wildcard address when
connecting to an rsync daemon. The bf(--address) option allows you to
specify a specific IP address (or hostname) to bind to. See also this
bf(--hard-links)).
it() A bf(.) means that the item is not being updated (though it might
have attributes that are being modified).
+ it() A bf(*) means that the rest of the itemized-output area contains
+ a message (e.g. "deleting").
))
The file-types that replace the bf(X) are: bf(f) for a file, a bf(d) for a
The attribute that is associated with each letter is as follows:
quote(itemization(
- it() A bf(c) means the checksum of the file is different and will be
- updated by the file transfer (requires bf(--checksum)).
- it() A bf(s) means the size of the file is different and will be updated
+ it() A bf(c) means either that a regular file has a different checksum
+ (requires bf(--checksum)) or that a symlink, device, or special file has
+ a changed value.
+ Note that if you are sending files to an rsync prior to 3.0.1, this
+ change flag will be present only for checksum-differing regular files.
+ it() A bf(s) means the size of a regular file is different and will be updated
by the file transfer.
it() A bf(t) means the modification time is different and is being updated
to the sender's value (requires bf(--times)). An alternate value of bf(T)
means that the modification time will be set to the transfer time, which happens
- anytime a symlink is transferred, or when a regular file or device is
- transferred without bf(--times).
+ when a file/symlink/device is updated without bf(--times) and when a
+ symlink is changed and the receiver can't set its time.
+ (Note: when using an rsync 3.0.0 client, you might see the bf(s) flag combined
+ with bf(t) instead of the proper bf(T) flag for this time-setting failure.)
it() A bf(p) means the permissions are different and are being updated to
the sender's value (requires bf(--perms)).
it() An bf(o) means the owner is different and is being updated to the
sender's value (requires bf(--owner) and super-user privileges).
it() A bf(g) means the group is different and is being updated to the
sender's value (requires bf(--group) and the authority to set the group).
- it() The bf(u) slot is reserved for reporting update (access) time changes
- (a feature that is not yet released).
+ it() The bf(u) slot is reserved for future use.
it() The bf(a) means that the ACL information changed.
- it() The bf(x) slot is reserved for reporting extended attribute changes
- (a feature that is not yet released).
+ it() The bf(x) means that the extended attribute information changed.
))
One other output is possible: when deleting files, the "%i" will output
outputting them as a verbose message).
dit(bf(--out-format=FORMAT)) This allows you to specify exactly what the
-rsync client outputs to the user on a per-update basis. The format is a text
-string containing embedded single-character escape sequences prefixed with
-a percent (%) character. For a list of the possible escape characters, see
-the "log format" setting in the rsyncd.conf manpage.
-
-Specifying this option will mention each file, dir, etc. that gets updated
-in a significant way (a transferred file, a recreated symlink/device, or a
-touched directory). In addition, if the itemize-changes escape (%i) is
-included in the string, the logging of names increases to mention any
-item that is changed in any way (as long as the receiving side is at least
-2.6.4). See the bf(--itemize-changes) option for a description of the
-output of "%i".
-
-The bf(--verbose) option implies a format of "%n%L", but you can use
-bf(--out-format) without bf(--verbose) if you like, or you can override
-the format of its per-file output using this option.
+rsync client outputs to the user on a per-update basis. The format is a
+text string containing embedded single-character escape sequences prefixed
+with a percent (%) character. A default format of "%n%L" is assumed if
+bf(-v) is specified (which reports the name
+of the file and, if the item is a link, where it points). For a full list
+of the possible escape characters, see the "log format" setting in the
+rsyncd.conf manpage.
+
+Specifying the bf(--out-format) option
+will mention each file, dir, etc. that gets updated in a significant
+way (a transferred file, a recreated symlink/device, or a touched
+directory). In addition, if the itemize-changes escape (%i) is included in
+the string (e.g. if the bf(--itemize-changes) option was used), the logging
+of names increases to mention any item that is changed in any way (as long
+as the receiving side is at least 2.6.4). See the bf(--itemize-changes)
+option for a description of the output of "%i".
Rsync will output the out-format string prior to a file's transfer unless
one of the transfer-statistic escapes is requested, in which case the
For a list of the possible escape characters, see the "log format" setting
in the rsyncd.conf manpage.
+The default FORMAT used if bf(--log-file) is specified and this option is not
+is '%i %n%L'.
+
dit(bf(--stats)) This tells rsync to print a verbose set of statistics
-on the file transfer, allowing you to tell how effective the rsync
+on the file transfer, allowing you to tell how effective rsync's delta-transfer
algorithm is for your data.
The current statistics are as follows: quote(itemization(
it() bf(Number of files) is the count of all "files" (in the generic
sense), which includes directories, symlinks, etc.
it() bf(Number of files transferred) is the count of normal files that
- were updated via the rsync algorithm, which does not include created
+ were updated via rsync's delta-transfer algorithm, which does not include created
dirs, symlinks, etc.
it() bf(Total file size) is the total sum of all file sizes in the transfer.
This does not count any size for directories or special files, but does
Note that if bf(--whole-file) is specified (or implied), any partial-dir
file that is found for a file that is being updated will simply be removed
(since
-rsync is sending files without using the delta transfer algorithm).
+rsync is sending files without using rsync's delta-transfer algorithm).
Rsync will create the em(DIR) if it is missing (just the last dir -- not
the whole path). This makes it easy to use a relative path (such as
recursively scanning a hierarchy of files using include/exclude/filter
rules.
+Note that the use of transfer rules, such as the bf(--min-size) option, does
+not affect what goes into the file list, and thus does not leave directories
+empty, even if none of the files in a directory match the transfer rule.
+
Because the file-list is actually being pruned, this option also affects
what directories get deleted when a delete is active. However, keep in
mind that excluded files and directories can prevent existing items from
-being deleted (because an exclude hides source files and protects
-destination files).
+being deleted due to an exclude both hiding source files and protecting
+destination files. See the perishable filter-rule option for how to avoid
+this.
You can prevent the pruning of certain empty directories from the file-list
by using a global "protect" filter. For instance, this option would ensure
per second, and the transfer will finish in 4 seconds if the current rate
is maintained until the end.
-These statistics can be misleading if the delta transfer algorithm is
+These statistics can be misleading if rsync's delta-transfer algorithm is
in use. For example, if the sender's file consists of the basis file
followed by additional data, the reported rate will probably drop
dramatically when the receiver gets to the literal data, and the transfer
file for accessing an rsync daemon. The file must not be world readable.
It should contain just the password as a single line.
+This option does not supply a password to a remote shell transport such as
+ssh; to learn how to do that, consult the remote shell's documentation.
When accessing an rsync daemon using a remote shell as the transport, this
option only comes into effect after the remote shell finishes its
authentication (i.e. if you have also specified a password in the daemon's
sets using this option. Using a CONVERT_SPEC of "." tells rsync to look up
the default character-set via the locale setting. Alternately, you can
fully specify what conversion to do by giving a local and a remote charset
-separated by a comma (local first), e.g. bf(--iconv=utf8,iso88591).
-Finally, you can specify a CONVERT_SPEC of "-" to turn off any conversion.
+separated by a comma in the order bf(--iconv=LOCAL,REMOTE), e.g.
+bf(--iconv=utf8,iso88591). This order ensures that the option
+will stay the same whether you're pushing or pulling files.
+Finally, you can specify either bf(--no-iconv) or a CONVERT_SPEC of "-"
+to turn off any conversion.
The default setting of this option is site-specific, and can also be
affected via the RSYNC_ICONV environment variable.
+For a list of what charset names your local iconv library supports, you can
+run "iconv --list".
+
If you specify the bf(--protect-args) option (bf(-s)), rsync will translate
the filenames you specify on the command-line that are being sent to the
remote host. See also the bf(--files-from) option.
For instance, you can specify extra include/exclude rules if there are
filename differences on the two sides that need to be accounted for.
+When you pass an bf(--iconv) option to an rsync daemon that allows it, the
+daemon uses the charset specified in its "charset" configuration parameter
+regardless of the remote charset you actually pass. Thus, you may feel free to
+specify just the local charset for a daemon transfer (e.g. bf(--iconv=utf8)).
+
dit(bf(-4, --ipv4) or bf(-6, --ipv6)) Tells rsync to prefer IPv4/IPv6
when creating sockets. This only affects sockets that rsync has direct
control over, such as the outgoing socket when directly contacting an
will have no effect. The bf(--version) output will tell you if this
is the case.
-dit(bf(--checksum-seed=NUM)) Set the MD4 checksum seed to the integer
+dit(bf(--checksum-seed=NUM)) Set the checksum seed to the integer
NUM. This 4 byte checksum seed is included in each block and file
-MD4 checksum calculation. By default the checksum seed is generated
+checksum calculation. By default the checksum seed is generated
by the server and defaults to the current code(time()). This option
is used to set a specific checksum seed, which is useful for
applications that want repeatable block and file checksums, or
in the case where the user wants a more random checksum seed.
-Note that setting NUM to 0 causes rsync to use the default of code(time())
+Setting NUM to 0 causes rsync to use the default of code(time())
for checksum seed.
enddit()
it() rsync chooses between doing a simple string match and wildcard
matching by checking if the pattern contains one of these three wildcard
characters: '*', '?', and '[' .
- it() a '*' matches any non-empty path component (it stops at slashes).
+ it() a '*' matches any path component, but it stops at slashes.
it() use '**' to match anything, including slashes.
it() a '?' matches any character except a slash (/).
it() a '[' introduces a character class, such as [a-z] or [[:alpha:]].
explicitly included or it would be excluded by the "*")
)
+The following modifiers are accepted after a "+" or "-":
+
+itemization(
+ it() A bf(/) specifies that the include/exclude rule should be matched
+ against the absolute pathname of the current item. For example,
+ "-/ /etc/passwd" would exclude the passwd file any time the transfer
+ was sending files from the "/etc" directory, and "-/ subdir/foo"
+ would always exclude "foo" when it is in a dir named "subdir", even
+ if "foo" is at the root of the current transfer.
+ it() A bf(!) specifies that the include/exclude should take effect if
+ the pattern fails to match. For instance, "-! */" would exclude all
+ non-directories.
+ it() A bf(C) is used to indicate that all the global CVS-exclude rules
+ should be inserted as excludes in place of the "-C". No arg should
+ follow.
+ it() An bf(s) is used to indicate that the rule applies to the sending
+ side. When a rule affects the sending side, it prevents files from
+ being transferred. The default is for a rule to affect both sides
+ unless bf(--delete-excluded) was specified, in which case default rules
+ become sender-side only. See also the hide (H) and show (S) rules,
+ which are an alternate way to specify sending-side includes/excludes.
+ it() An bf(r) is used to indicate that the rule applies to the receiving
+ side. When a rule affects the receiving side, it prevents files from
+ being deleted. See the bf(s) modifier for more info. See also the
+ protect (P) and risk (R) rules, which are an alternate way to
+ specify receiver-side includes/excludes.
+ it() A bf(p) indicates that a rule is perishable, meaning that it is
+ ignored in directories that are being deleted. For instance, the bf(-C)
+ option's default rules that exclude things like "CVS" and "*.o" are
+ marked as perishable, and will not prevent a directory that was removed
+ on the source from being deleted on the destination.
+)
+
manpagesection(MERGE-FILE FILTER RULES)
You can merge whole files into your filter rules by specifying either a
"- foo + bar" is parsed as two rules (assuming that prefix-parsing wasn't
also disabled).
it() You may also specify any of the modifiers for the "+" or "-" rules
- (below) in order to have the rules that are read in from the file
+ (above) in order to have the rules that are read in from the file
default to having that modifier set. For instance, "merge,-/ .excl" would
treat the contents of .excl as absolute-path excludes,
while "dir-merge,s .filt" and ":sC" would each make all their
per-directory rules apply only on the sending side.
)
-The following modifiers are accepted after a "+" or "-":
-
-itemization(
- it() A bf(/) specifies that the include/exclude rule should be matched
- against the absolute pathname of the current item. For example,
- "-/ /etc/passwd" would exclude the passwd file any time the transfer
- was sending files from the "/etc" directory, and "-/ subdir/foo"
- would always exclude "foo" when it is in a dir named "subdir", even
- if "foo" is at the root of the current transfer.
- it() A bf(!) specifies that the include/exclude should take effect if
- the pattern fails to match. For instance, "-! */" would exclude all
- non-directories.
- it() A bf(C) is used to indicate that all the global CVS-exclude rules
- should be inserted as excludes in place of the "-C". No arg should
- follow.
- it() An bf(s) is used to indicate that the rule applies to the sending
- side. When a rule affects the sending side, it prevents files from
- being transferred. The default is for a rule to affect both sides
- unless bf(--delete-excluded) was specified, in which case default rules
- become sender-side only. See also the hide (H) and show (S) rules,
- which are an alternate way to specify sending-side includes/excludes.
- it() An bf(r) is used to indicate that the rule applies to the receiving
- side. When a rule affects the receiving side, it prevents files from
- being deleted. See the bf(s) modifier for more info. See also the
- protect (P) and risk (R) rules, which are an alternate way to
- specify receiver-side includes/excludes.
- it() A bf(p) indicates that a rule is perishable, meaning that it is
- ignored in directories that are being deleted. For instance, the bf(-C)
- option's default rules that exclude things like "CVS" and "*.o" are
- marked as perishable, and will not prevent a directory that was removed
- on the source from being deleted on the destination.
-)
-
Per-directory rules are inherited in all subdirectories of the directory
where the merge-file was found unless the 'n' modifier was used. Each
subdirectory's rules are prefixed to the inherited per-directory rules
client to store in a "batch file" all the information needed to repeat
this operation against other, identical destination trees.
-To apply the recorded changes to another destination tree, run rsync
-with the read-batch option, specifying the name of the same batch
-file, and the destination tree. Rsync updates the destination tree
-using the information stored in the batch file.
-
-For convenience, one additional file is creating when the write-batch
-option is used. This file's name is created by appending
-".sh" to the batch filename. The .sh file contains
-a command-line suitable for updating a destination tree using that
-batch file. It can be executed using a Bourne (or Bourne-like) shell,
-optionally
-passing in an alternate destination tree pathname which is then used
-instead of the original path. This is useful when the destination tree
-path differs from the original destination tree path.
-
Generating the batch file once saves having to perform the file
status, checksum, and data block generation more than once when
updating multiple destination trees. Multicast transport protocols can
be used to transfer the batch update files in parallel to many hosts
at once, instead of sending the same data to every host individually.
+To apply the recorded changes to another destination tree, run rsync
+with the read-batch option, specifying the name of the same batch
+file, and the destination tree. Rsync updates the destination tree
+using the information stored in the batch file.
+
+For your convenience, a script file is also created when the write-batch
+option is used: it will be named the same as the batch file with ".sh"
+appended. This script file contains a command-line suitable for updating a
+destination tree using the associated batch file. It can be executed using
+a Bourne (or Bourne-like) shell, optionally passing in an alternate
+destination tree pathname which is then used instead of the original
+destination path. This is useful when the destination tree path on the
+current host differs from the one used to create the batch file.
+
Examples:
quote(
dit(bf(24)) Partial transfer due to vanished source files
dit(bf(25)) The --max-delete limit stopped deletions
dit(bf(30)) Timeout in data send/receive
+dit(bf(35)) Timeout waiting for daemon connection
enddit()
manpagesection(ENVIRONMENT VARIABLES)
dit(bf(RSYNC_PASSWORD)) Setting RSYNC_PASSWORD to the required
password allows you to run authenticated rsync connections to an rsync
daemon without user intervention. Note that this does not supply a
-password to a shell transport such as ssh.
+password to a remote shell transport such as ssh; to learn how to do that,
+consult the remote shell's documentation.
dit(bf(USER) or bf(LOGNAME)) The USER or LOGNAME environment variables
are used to determine the default username sent to an rsync daemon.
If neither is set, the username defaults to "nobody".
manpagesection(VERSION)
-This man page is current for version 3.0.0pre2 of rsync.
+This man page is current for version 3.0.6 of rsync.
manpagesection(INTERNAL OPTIONS)
url(ftp://rsync.samba.org/pub/rsync)(ftp://rsync.samba.org/pub/rsync).
We would be delighted to hear from you if you like this program.
+Please contact the mailing-list at rsync@lists.samba.org.
This program uses the excellent zlib compression library written by
Jean-loup Gailly and Mark Adler.
manpagesection(THANKS)
-Thanks to Richard Brent, Brendan Mackay, Bill Waite, Stephen Rothwell
-and David Bell for helpful suggestions, patches and testing of rsync.
-I've probably missed some people, my apologies if I have.
+Especial thanks go out to: John Van Essen, Matt McCutchen, Wesley W. Terpstra,
+David Dykstra, Jos Backus, Sebastian Krahmer, Martin Pool, and our
+gone-but-not-forgotten compadre, J.W. Schultz.
-Especial thanks also to: David Dykstra, Jos Backus, Sebastian Krahmer,
-Martin Pool, Wayne Davison, J.W. Schultz.
+Thanks also to Richard Brent, Brendan Mackay, Bill Waite, Stephen Rothwell
+and David Bell. I've probably missed some people, my apologies if I have.
manpageauthor()
rsync was originally written by Andrew Tridgell and Paul Mackerras.
-Many people have later contributed to it.
+Many people have later contributed to it. It is currently maintained
+by Wayne Davison.
Mailing lists for support and development are available at
url(http://lists.samba.org)(lists.samba.org)