--delete-during acts like --delete-before

Michal Soltys soltys at ziu.info
Thu Sep 9 01:30:09 MDT 2010


On 09.09.2010 02:05, Michal Soltys wrote:
> On 10-09-09 01:07, Craig Bell wrote:
>
> 1) 1st delete pass, honoring global (on B or sent from A, if rsync was
> executed on A) and per directory (on B) rules of what to protect/delete
> (see --filter's options R & P)
> 2) 2nd transfer pass
>

To be a bit more specific - initially what to delete is of course based 
on what would be transferred / updated. Only elements that are not part 
of the file list are candidates to remove. Rsync won't do a thing such 
as "delete everything before transfer, then retransfer deleted files 
that wouldn't be touched otherwise".

Basically - "0th" stage is generate file list, which is sent to the 
receiver before any further action takes place. If you increase 
verbosity, it will be visible at the begining in the output.

>
>>
>> It looks like "--delete-during" should operate in-fix, i.e. step into
>> a directory, delete the old file, pull the new file, and then move on
>> to the next directory. For my transfers, all deletes seem to take
>> place up front.

Hmmm, rsync wouldn't do that. As mentioned above, files being part of 
the transfer (whenever uptodate ones, or the ones to be updated) will 
not be preemptivly removed. Even the old files are not deleted first - 
they are transfered to a temporary file and moved over (unless --inplace 
is being used).


More information about the rsync mailing list