rsync and missing files?

Jos Backus
Wed, 17 Apr 2002 09:50:01 -0000

On Wed, Apr 17, 2002 at 10:57:56AM -0500, John Madden
wrote:
> send_files failed to open //home/user/Maildir/new/_dwG.NeZv8.blah: No such
> file or directory
> rsync error: partial transfer (code 23) at main.c(578)

This looks slightly problematic. While Maildir delivery guarantees that files
in new/ will always be complete/present, no such guarantee exists for
retrieval/access. There is a race between stat'ing the source files and
sending file data in the sender and any external process (a program such as
qmail-pop3d in this case) which removes the source files. One way around this
would be to use a lock file to coordinate access to the Maildir between the
backup process and the POP daemon. This isn't too intrusive; while the lock
is
present, mail delivery can still take place.

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