On Thu, 2011-09-15 at 11:37 +0200, Attila Nagy wrote: > > So you have a proxy that decides what backend server the connections are > > redirected to? How about you do it completely without locking with > > dsync? Moving between servers works basically the same as converting a > > mailbox format, with the difference of "changing mail_location" you > > "change backend server". > > http://wiki2.dovecot.org/Tools/Dsync#example_converting > > > Yes, there is a proxy in front of the servers. Is dsync usable with 3rd > party maildir programs? (not only Dovecot uses these mailboxes)
The problems with 3rd party maildir programs come if during the move they: - Expunge last message(s) from mailbox. (dsync can't know if it should add or expunge them, so it plays it safe and adds them back) - Delete a mailbox. (dsync can't know if it should add or delete it, so again it just adds it back.) - Remove subscriptions. (again pretty much the same reason.) It's probably quite unlikely that they do any of this during the move. You could even reduce the window by doing: 1. dsync backup 2. dsync backup 3. switch to new server 4. kill all existing connections 5. dsync mirror The 3-5 steps probably take only a few seconds. The "dsync backup" then guarantees that the destination server will look exactly like the source server. ("dsync mirror" is used in step 5, because between steps 3-4 either server can get changes.)