inplace and partial transfers

Wayne Davison wayned at samba.org
Sun May 2 17:41:39 MDT 2010


On Sat, Apr 24, 2010 at 1:31 PM, keropen <keropen at tnde.org> wrote:

> I am thinking of doing the sync in two steps:
>
> 1) sync with --partial-dir and --backup-dir to send updated files to a
> different directory at the destination
> 2) sync from the backup dir to the actual destination with --inplace
> and --no-whole-file


The backup option isn't what you want, but something similar is:  Change the
first step to be a copy to a new destination directory using a
--compare-dest option pointing at the real destination directory.  That will
create just changed files into the alt destination.  You could then copy
files from the alt destination to the real destination locally with
--inplace (and perhaps --remove-source-files).  If you need to be able to do
deletions, you should be able to use --link-dest instead of --compare-dest,
and then copy the whole result with --del into the real destination (since
rsync will skip all the files that got hard-linked together).

In looking at this, I noticed that rsync lets users specify --temp-dir with
--inplace, but that combination of options doesn't appear to do anything
useful (and may well be harmful -- I didn't look at the code enough to be
certain).  It might be interesting to have rsync interpret that combination
as "always do an in-place copy out of the temp dir".  Backward compatibility
checking would be difficult, though, since that combination of options are
accepted in current versions.

..wayne..
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/rsync/attachments/20100502/9473f2ce/attachment.html>


More information about the rsync mailing list