--delete-during acts like --delete-before
Craig Bell
Craig.Bell at standard.com
Thu Sep 9 12:17:37 MDT 2010
Michal Soltys wrote:
> If you used --delete-during - rsync would combine 1st and 2nd pass of
> --delete-before into single pass, where deletion and transfer would be
> done on directory per directory basis, recursively.
Thanks for writing, Michal. In my example, I used --delete-during, however all deletes happen first.
Then rsync recurses into each subdirectory, and brings over the new files.
> --delete-delay is probably what you're after
As stated, I would prefer this, however I do not have enough space to keep two editions of the files.
I must delete as I go along, however I don't want to delete everything up front, and risk exposure.
My workaround was to run rsync once for each subdir, which worked but is far from optimal.
> Also check options:
> --ignore-existing, --ignore-non-existing, --partial, --delay-updates
Since my transfer always deletes all old / existing files, I don't think these options will help much.
But thanks for the ideas!
My understanding of --delete-during comes from the manpage: http://www.samba.org/ftp/rsync/rsync.html
" --delete-during Request that the file-deletions on the 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 --delete-before, including doing the deletions prior to any per-directory filter files being updated."
That sounds to me like it should be working within each directory, but perhaps I'm wrong.
I also saw discussions to this effect in the list archives, back when the feature was added.
Of course, that discussion might not represent the final behavior, but the manpage seems to agree.
Thanks again... -cheers, CSB
More information about the rsync
mailing list