Hi, This is a general backup issue (files changing during backup run) and nothing Dovecot specific. You should look into something that gives you a consistent view of the data, f.i. LVM snapshots (when you're running linux).
Regards, Tom Alexander Chekalin wrote: > Yes, I'm trying to make some backup solution. > > The idea was to have two identical (well, nearly identical) servers with > the same software and data on them, and while the first do its job as > SMTP and POP3/IMAP4 server, the second server just get copy of first's > current state (that is, copy user db and mail spool). In case of > something wrong with 1st server I'll just put its IP on second one and > will go on. > > And the problem is that rsynced mailboxes sometimes have duplicates that > may confuse users. It happens when box changes between rsyncs by means > of Dovecot's ordinary operations (when msg file move from new/ to cur/ > on 1st server and after rsync to 2nd this may produce two files with > same filename in new/ and cur/, and Dovecot for some reason renames one > of it). > > Doing this using imapsync won't work. It is slow (hours vs minutes with > rsync) so I can't run it every 5 minutes, and, moreover, it crashes on > some messages, so can not rely on it in production. > > Yours, > Alexander > > 11.01.2010 15:07, Charles Marcus wrote: >> On 2010-01-11, Alexander Chekalin (acheka...@lazurit.com) wrote: >>> I'm not sure if this is intended behaviour. It is quite easy to see >>> such situation when doing periodical rsync (SMTP put message to new/ >>> dir, then rsync copy it to second server, then message on the first >>> server move to cur/, and second rsync results in two files on second >>> server). >>> >>> It there any workaround? >> >> I would only use rsync for migrating to a new box, or for backups only... >> >> It soundslike you're using the wrong tool for the job - maybe you should >> be using something like imapsync? >> >> Or, please describe what you are trying to accomplish? >