--delete-after-fetch mode?

Jos Backus jos at catnook.com
Mon Apr 8 18:08:04 EST 2002


On Tue, Apr 09, 2002 at 11:05:51AM +1000, Martin Pool wrote:
> I think what you want is the proposed --move option, which would
> delete the files after they're transferred.  However, your example
> points out a critical problem with --move: it will always race with
> other applications writing to the file.  If your mail delivery agent
> delivers a message while rsync is transferring the file, you might get
> none, some, or all of it on the destination, and the rest might be
> lost.
> 
> If you can ensure that this is not going to happen (by shutting down
> the mda or locking the mailbox), or you don't care, then you can do
> it.

Fwiw, the Maildir delivery algorithm seems to be resistant against this.
Transferring the cur and new directories in a Maildir should be safe.  See
http://cr.yp.to/proto/maildir.html for details. Of course, this only applies
when you are using Maildir-style mailboxes.

-- 
Jos Backus                 _/  _/_/_/        Santa Clara, CA
                          _/  _/   _/
                         _/  _/_/_/             
                    _/  _/  _/    _/
jos at catnook.com     _/_/   _/_/_/            use Std::Disclaimer;




More information about the rsync mailing list