Mention that --partial-dir now sets an exclude that helps to avoid
authorWayne Davison <wayned@samba.org>
Wed, 22 Sep 2004 04:14:43 +0000 (04:14 +0000)
committerWayne Davison <wayned@samba.org>
Wed, 22 Sep 2004 04:14:43 +0000 (04:14 +0000)
losing the partial data when deleting, and avoid copying any partial
data from the sender.

rsync.yo

index b757489..a6aa2d8 100644 (file)
--- a/rsync.yo
+++ b/rsync.yo
@@ -923,11 +923,16 @@ in the destination file's directory (rsync will also try to remove the DIR
 if a partial file was found to exist at the start of the transfer and the
 DIR was specified as a relative path).
 
-If you are deleting files on the destination and your partial-dir is
-inside the destination hierarchy, make sure you specify an exclude to
-prevent the partial file from being deleted (it could get deleted at the
-end of the transfer when using --delete-after, or at the beginning of the
-transfer when using --delete).  E.g. "--exclude=.rsync-partial/".
+If the partial-dir value is not an absolute path, rsync will also add an
+--exclude of this value at the end of all your existing excludes.  This
+will prevent partial-dir files from being transferred and also prevent the
+untimely deletion of partial-dir items on the receiving side.  An example:
+the above --partial-dir option would add an "--exclude=.rsync-partial/"
+rule at the end of any other include/exclude rules.  Note that if you are
+supplying your own include/exclude rules, you may need to manually insert a
+rule for this directory exclusion somewhere higher up in the list so that
+it has a high enough priority to be effective (e.g., if your rules specify
+a trailing --exclude=* rule, the auto-added rule will be ineffective).
 
 IMPORTANT: the --partial-dir should not be writable by other users or it
 is a security risk.  E.g. AVOID "/tmp".