mailto(rsync-bugs@samba.org)
-manpage(rsync)(1)(10 Feb 2008)()()
+manpage(rsync)(1)(29 Jun 2008)()()
manpagename(rsync)(a fast, versatile, remote (and local) file-copying tool)
manpagesynopsis()
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.
+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.
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
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 the delta-transfer algorithm
+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
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
See the bf(--max-size) option for a description of SIZE.
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
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
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
in the rsyncd.conf manpage.
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
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
manpagesection(VERSION)
-This man page is current for version 3.0.0pre9 of rsync.
+This man page is current for version 3.0.3 of rsync.
manpagesection(INTERNAL OPTIONS)