[Dovecot] migration from dovecot to dovecot on different servers without downtime (dovecot replication?)

Steffen Kaiser skdovecot at smail.inf.fh-brs.de
Thu Mar 12 13:37:47 EET 2009


-----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-----


More information about the dovecot mailing list