partial-dir not being used?!

Wayne Davison wayned at samba.org
Sat Aug 22 10:15:11 MDT 2009


On Fri, Jul 17, 2009 at 02:13:00AM -0300, Carlos Carvalho wrote:
> There can be several partials in the partial dir for the same file,
> resulting from more than one interruption.

No, there is only one partial file.  Don't confuse a partial file with a
temp file, which are different things in rsync's nomenclature.  A temp
file is where rsync constructs the new destination file, and if it gets
interrupted (and --partial is set) it either saves the temp file over
the destination file, or (with --partial-dir), save the temporary file
into the partial dir with the same name as the destination file.  It is
this moving of the temp file that turns it into a partial file that
rsync can use in the next transfer.  The use of --delete will clean up
any left-over temp files if an rsync got forcibly killed (so it couldn't
clean up the temp file).

> What happens if we set temp-dir the same as partial-dir?

Rsync does not currently support a relative temp-dir if it does not
exist in each directory.  It would be possible to change this so that
rsync goes around creating a relative temp dir for every dir that needs
a transfer (and removing it afterwards), but the current code doesn't do
that.  (It only creates a missing dir if the transfer gets interrupted
and it needs to save a partial file into the --partial-dir.)

..wayne..


More information about the rsync mailing list