[Dovecot] migration from dovecot to dovecot on different servers without downtime (dovecot replication?)
Hello,
I have an imap server with huge Maildirs and several users running dovecot 1.0.13, I need to migrate all the imap accounts to a new box which runs dovecot 1.1.4.
The requisite is that need to do it with no downtime or minimal downtime possible, and totally transparent for end users.
I have tried IMAP<-->IMAP syncing using a master user in both servers and imapsync, however due to the huge Maildirs (some users have more than 10 years of mail) this tends to be quite slow and painful.
Can I tar all the user's Maildir and move them from one box to the other, and then run imapsync again? which I assume that would be faster... or is there any better solution I am not aware of? (ie: I've seen some emails about dovecot replication on the list archives, but few details of how that should be configured).
I'd appreciate any feedback or thoughts on this matter. Thank you.
Cheers,
Pau Oliva
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Thu, 12 Mar 2009, Pau Oliva wrote:
I have tried IMAP<-->IMAP syncing using a master user in both servers and imapsync, however due to the huge Maildirs (some users have more than 10 years of mail) this tends to be quite slow and painful.
IMAP<->IMAP has the pro that you copy anything and create the data in the new server with the new indexes etc.pp.
I did used rsync, two or three times, then stopped the old server, resync'ed again, moved the indexes etc. into another place and started the new server.
However, rsync needs time still and may require more time, certainly more than "no downtime" ...
For the "any thoughts" section you mentioned:
You could try ImapProxying http://wiki.dovecot.org/PasswordDatabase/ExtraFields/Proxy
On the new server you configure all users with proxy=old_server
You move one user at a time, each with the cycle:
- rsync Maildir*
- disable login and mail delivery for user
- rsync Maildir and CONTROL (if you've separated them) again
- drop proxy= attribute from user on new server
- enable user on new server
- if necessary: deny user on old server
- This step will lower the downtime for the user, because it decreases the time in the "final" rsync. But if you let messages being delivered on the new server into not-yet moved users's Maildirs, you cannot detect deleted mails between both rsync's, because you must keep all messages in the Maildir of the new server, it could be a new one, you might be lucky, if the users don't have Sieve scripts, you could exclude Maildir/new in the first rsync. Also, if you deliver mails into not-synced Maildirs, I think you should remove all indexes etc. before doing the final rsync, so the newly delivered mails are picked up from Maildir/new as new again and they get new UIDs etc. again.
If you go that route, please post your expierences. :)
Bye,
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux)
iQEVAwUBSbj0DnWSIuGy1ktrAQJIzQgAkrg5t8HRfQ7DBsuyl+qPDXUARjOvCgNg z0bB6yrFufv2PHAjPN4W8DqZ5nh0zireOIH5OM1cV+8DamcKKfG+ilTm0PUbiLI8 gCDgpLqjXY70SbNWHe+5Yzb2PUg1o1AHwW4AE3/3XAqQjgcmop3Z9YX72mTcOuFd zcaBpQrFtz1xWSfo4wVCUcAqItoEshGrDnZlFsg4G9GaJpiySmxbInTBeQsjNchr BMx+MAI48h/6d1kCFQ9aBMgFzyrGn/GiRR+cvq8+t6GhNx4SP90TrlqWLFgE56Eq +BCqE1Xgo8kmFdrm0QbwoFJKYEsQlg6e1dgfPXnLqUh7scTnjZ97Yw== =Hcuw -----END PGP SIGNATURE-----
participants (2)
-
Pau Oliva
-
Steffen Kaiser