No --delete-after?

Mack, Daemian DMack at
Thu Jan 31 02:17:13 EST 2002

> On Fri, Dec 21, 2001 at 04:05:01PM -0500, Mack, Daemian wrote:
> > I can get --delete to work, but I'd prefer to delete files only on a
> > successful transfer, to ensure that the end-user has a 
> working collection of
> > files, no matter what release.  For some reason, 
> --delete-after does nothing
> > for me, even as administrator on the Win2k box that's 
> acting as a client.
> > 
> > 
> > Daemian Mack
> --delete is already not supposed to delete anything if there 
> are any errors
> on the sending machine.  Are you in particular concerned 
> about errors on
> the receiving machine?  I've never used --delete-after, but 
> in looking at
> the code it looks it should move all the deletes to after all 
> the files
> have been received.  Can you itemize a series of simple 
> steps, starting
> from scratch, that demonstrates the problem you're seeing?

Sorry it's taken me so long to get back to this problem. 

Here's how I recreated this problem this morning: on the rsync server, I
created an rsync area called zorn with, say, 8 files and one subdirectory.
In that subdirectory are three or four files.

I synced that over to the client machine with 

	rsync --archive --verbose --checksum --times --modify-window 2
--delete-after --force /cygdrive/c/zorn

I checked out /cygdrive/c/zorn -- all files were local and accounted for,
including that subdirectory and its contents.

Then, I deleted that subdirectory off of the server's zorn rsync area.  I
confirmed that it and its contents were gone.  Then, repeated the client's
rsync maneuver:

	rsync --archive --verbose --checksum --times --modify-window 2
--delete-after --force /cygdrive/c/zorn

Checking local /cygdrive/c/zorn shows that subdirectory and its contents
*are still there.*

If I drop "--delete-after force" in favor of "--delete --force", it works as
I planned, by deleting that subdirectory and its contents.

I'm unclear on all the details concerning the delete switch (especially
lately), but as I understand it, the distinction between --delete and
--delete-after is that --delete-after will queue local deletes until after
the rsync process is satisfied that the two data areas are otherwise
perfectly in sync.  I'd very much like to make sure nothing is deleted on
the client machine unless and until the rsync process completes everything
else perfectly, as I'm responsible for pushing out automatic updates to
clients' executables, and it's far preferable to leave them with a working
but older version of the code rather than a partially new version.  Which, I
suppose, goes without saying.  ;)

Daemian Mack

More information about the rsync mailing list