Man page: Move the description of --info=progress2 to a better place.
[rsync/rsync.git] / rsync.yo
index 0ad14f3..fcb8b43 100644 (file)
--- a/rsync.yo
+++ b/rsync.yo
@@ -360,6 +360,7 @@ to the detailed description below for a complete description.  verb(
      --super                 receiver attempts super-user activities
      --fake-super            store/recover privileged attrs using xattrs
  -S, --sparse                handle sparse files efficiently
+     --preallocate           allocate dest files before writing
  -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
@@ -781,7 +782,9 @@ quote(itemization(
   it() The file's data will be in an inconsistent state during the transfer
   and will be left that way if the transfer is interrupted or if an update
   fails.
-  it() A file that does not have write permissions cannot be updated.
+  it() A file that rsync cannot write to cannot be updated. While a super user
+  can update any file, a normal user needs to be granted write permission for
+  the open of the file for writing to be successful.
   it() 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.  This does not apply if you use bf(--backup),
@@ -794,7 +797,8 @@ accessed by others, so be careful when choosing to use this for a copy.
 
 This option is useful for transferring large files with block-based changes
 or appended data, and also on systems that are disk bound, not network
-bound.
+bound.  It can also help keep a copy-on-write filesystem snapshot from
+diverging the entire contents of a file that only has minor changes.
 
 The option implies bf(--partial) (since an interrupted transfer does not delete
 the file), but conflicts with bf(--partial-dir) and bf(--delay-updates).
@@ -940,13 +944,15 @@ destination exactly matches that on the source.  Cases in which the
 destination may end up with extra hard links include the following:
 
 quote(itemization(
-  it() If the destination already contains hard links, rsync will not break
-  them explicitly.  However, if one or more of the paths have content
-  differences, the normal file-update process will break those links, unless
-  you are using the bf(--inplace) option.
+  it() 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 bf(--inplace) option).
   it() If you specify a bf(--link-dest) directory that contains hard links,
-  rsync may use the same bf(--link-dest) file multiple times via several of
-  its paths.
+  the linking of the destination files against the bf(--link-dest) files can
+  cause some paths in the destination to become linked together due to the
+  bf(--link-dest) associations.
 ))
 
 Note that rsync can only detect hard links between files that are inside
@@ -960,7 +966,10 @@ 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 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
+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 bf(--no-inc-recursive) option.
 
 dit(bf(-p, --perms)) This option causes the receiving rsync to set the
@@ -1170,9 +1179,16 @@ dit(bf(-S, --sparse)) Try to handle sparse files efficiently so they take
 up less space on the destination.  Conflicts with bf(--inplace) because it's
 not possible to overwrite data in a sparse fashion.
 
-NOTE: Don't use this option when the destination is a Solaris "tmpfs"
-filesystem. It seems to have problems seeking over null regions,
-and ends up corrupting the files.
+dit(bf(--preallocate)) This tells the receiver to allocate each destination
+file to its eventual size before writing data to the file.  Rsync will only use
+the real filesystem-level preallocation support provided by Linux's
+bf(fallocate)(2) system call or Cygwin's bf(posix_fallocate)(3), not the slow
+glibc implementation that writes a zero byte into each block.
+
+Without this option, larger files may not be entirely contiguous on the
+filesystem, but with this option rsync will probably copy more slowly.  If the
+destination is not an extent-supporting filesystem (such as ext4, xfs, NTFS,
+etc.), this option may have no positive effect at all.
 
 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
@@ -1245,6 +1261,19 @@ dit(bf(--remove-source-files)) This tells rsync to remove from the sending
 side the files (meaning non-directories) that are a part of the transfer
 and have been successfully duplicated on the receiving side.
 
+Note that you should only use this option on source files that are quiescent.
+If you are using this to move files that show up in a particular directory over
+to another host, make sure that the finished files get renamed into the source
+directory, not directly written into it, so that rsync can't possibly transfer
+a file that is not yet fully written.  If you can't first write the files into
+a different directory, you should use a naming idiom that lets rsync avoid
+transferring files that are not yet finished (e.g. name the file "foo.new" when
+it is written, rename it to "foo" when it is done, and then use the option
+bf(--exclude='*.new') for the rsync transfer).
+
+Starting with 3.1.0, rsync will skip the sender-side removal (and output an
+error) if the file's size or modify time has not stayed unchanged.
+
 dit(bf(--delete)) This tells rsync to delete extraneous files from the
 receiving side (ones that aren't on the sending side), but only for the
 directories that are being synchronized.  You must have asked rsync to
@@ -1483,7 +1512,7 @@ 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/ .git/ .bzr/)))
+*.a *.olb *.o *.obj *.so *.exe *.Z *.elc *.ln core .svn/ .git/ .hg/ .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
@@ -1613,6 +1642,12 @@ bf(--files-from) filenames are being sent from one host to another, the
 filenames will be translated from the sending host's charset to the
 receiving host's charset.
 
+NOTE: sorting the list of files in the --files-from input helps rsync to be
+more efficient, as it will avoid re-visiting the path elements that are shared
+between adjacent entries.  If the input is not sorted, some path elements
+(implied directories) may end up being scanned multiple times, and rsync will
+eventually unduplicate them after they get turned into file-list elements.
+
 dit(bf(-0, --from0)) This tells rsync that the rules/filenames it reads from a
 file are terminated by a null ('\0') character, not a NL, CR, or CR+LF.
 This affects bf(--exclude-from), bf(--include-from), bf(--files-from), and any
@@ -2310,10 +2345,6 @@ in the file list is still going to increase (and each time it does, the count
 of files left to check  will increase by the number of the files added to the
 list).
 
-dit(bf(-P)) The bf(-P) option is equivalent to bf(--partial) bf(--progress).  Its
-purpose is to make it much easier to specify these two options for a long
-transfer that may be interrupted.
-
 There is also a bf(--info=progress2) option that outputs statistics based
 on the whole transfer, rather than individual files.  Use this flag without
 outputting a filename (e.g. avoid bf(-v) or specify bf(--info=name0) if you
@@ -2321,6 +2352,10 @@ want to see how the transfer is doing without scrolling the screen with a
 lot of names.  (You don't need to specify the bf(--progress) option in
 order to use bf(--info=progress2).)
 
+dit(bf(-P)) The bf(-P) option is equivalent to bf(--partial) bf(--progress).  Its
+purpose is to make it much easier to specify these two options for a long
+transfer that may be interrupted.
+
 dit(bf(--password-file)) This option allows you to provide a password in a
 file for accessing an rsync daemon.  The file must not be world readable.
 It should contain just the password as the first line of the file (all