[Dovecot] Best way to migrate versions and machines
We are looking to migrate from our current mail server running dovecot-1.2.11-3 to a new mail server running the latest dovecot (2.0.9?). So this would not only be a version change but also a machine change. We currently use Maildir for storing mail and would like to stay that way.
Has anyone preformed such a feat and it worked? Looking for any input.
On 17/02/2011 15:29, Donny Brooks wrote:
We are looking to migrate from our current mail server running dovecot-1.2.11-3 to a new mail server running the latest dovecot (2.0.9?). So this would not only be a version change but also a machine change. We currently use Maildir for storing mail and would like to stay that way.
Has anyone preformed such a feat and it worked? Looking for any input.
I have had a lot of success in setting up both Dovecot and Postfix to read a "mail_location" field which points to the IP of the users real mail server. When this changes then another dovecot instance proxies to the correct machine and postfix invokes a transport map to shift the mail to the correct machine (I think Dovecot has a %my_IP variable and also you can kind of extract your IP at the mysql server side, where you need this param in a query)
In this way you can easily move individual users around very simply.
Your migration can then also be just a few users at first, more through
time, rather than a big bang approach
If your question was migrating config then I think I would start with the default new config and migrate your old changes across. Also run the config upgrade on the old config. Now compare the results of both methods and see if this helps you spot anything you missed during your manual migration? Apart from config changes, I think the upgrade is likely to be uneventful?
Good luck
Ed W
Quoting Ed W lists@wildgooses.com:
On 17/02/2011 15:29, Donny Brooks wrote:
We are looking to migrate from our current mail server running
dovecot-1.2.11-3 to a new mail server running the latest dovecot
(2.0.9?). So this would not only be a version change but also a
machine change. We currently use Maildir for storing mail and would
like to stay that way.Has anyone preformed such a feat and it worked? Looking for any input.
I've done it two ways - Rsync and ZFS snapshots. Both methods are
pretty much the same.
I have multiple satellites doing SMTP incoming/outgoing and dovecot on
a primary 'file server' with NFS exports.
- replicate all data
- replicate diff data (do this until the update window is small)
- disable deliveries (for me, disable qmail-send, umount NFS mounts)
- replicate diff data
- turn off IMAP/POP
- replicate diff data
- Migrate IP address/Change FW rules/etc
- Turn on IMAP/POP
- Turn on deliveries
For my last ZFS migration I only had 2 minutes of 'downtime' from the
user's perspective (Step 5 -> Step 8), as the necessary changes were
already staged.
Rick
On 2/21/2011 9:46 AM, Rick Romero wrote:
Quoting Ed W lists@wildgooses.com:
On 17/02/2011 15:29, Donny Brooks wrote:
We are looking to migrate from our current mail server running dovecot-1.2.11-3 to a new mail server running the latest dovecot (2.0.9?). So this would not only be a version change but also a machine change. We currently use Maildir for storing mail and would like to stay that way.
Has anyone preformed such a feat and it worked? Looking for any input.
I've done it two ways - Rsync and ZFS snapshots. Both methods are pretty much the same. I have multiple satellites doing SMTP incoming/outgoing and dovecot on a primary 'file server' with NFS exports.
- replicate all data
- replicate diff data (do this until the update window is small)
- disable deliveries (for me, disable qmail-send, umount NFS mounts)
- replicate diff data
- turn off IMAP/POP
- replicate diff data
- Migrate IP address/Change FW rules/etc
- Turn on IMAP/POP
- Turn on deliveries
For my last ZFS migration I only had 2 minutes of 'downtime' from the user's perspective (Step 5 -> Step 8), as the necessary changes were already staged.
Rick
Sounds similar to what I was thinking. I was just not sure if there was some unforeseen gotchas that others had dealt with before. The move to a new version is usually not that bad but I knew moving machines with versions could be hazardous. I may end up upgrading the local copy to 2.0.9 before the move so they will be similar.
Sounds similar to what I was thinking. I was just not sure if there was some unforeseen gotchas that others had dealt with before. The move to a new version is usually not that bad but I knew moving machines with versions could be hazardous. I may end up upgrading the local copy to 2.0.9 before the move so they will be similar.
Perhaps, but did you not like my suggestion that you could have basically both versions live at the same time?
To recap, rsync (etc) some data across to the new server which has been upgraded to dovecot2. Set proxy to forward some test users to the new server. Test it thoroughly, copy over a few more accounts, repeat testing, etc
This keeps both old and new servers running at all times and the "proxy" feature allows you to push users across even one by one (or do a bulk move).
Remember, apart from the slight gremlin that the dovecot index files get made non v1 compatible by the v2 server, the data can be copied back/forward between servers and most MUAs will likely not notice the difference between your v1.2 and v2 installation... Don't get over-fixated on the server version, focus on not ending up without a working server during the process
Good luck
Ed W
On 2/21/2011 1:59 PM, Ed W wrote:
Sounds similar to what I was thinking. I was just not sure if there was some unforeseen gotchas that others had dealt with before. The move to a new version is usually not that bad but I knew moving machines with versions could be hazardous. I may end up upgrading the local copy to 2.0.9 before the move so they will be similar.
Perhaps, but did you not like my suggestion that you could have basically both versions live at the same time?
To recap, rsync (etc) some data across to the new server which has been upgraded to dovecot2. Set proxy to forward some test users to the new server. Test it thoroughly, copy over a few more accounts, repeat testing, etc
This keeps both old and new servers running at all times and the "proxy" feature allows you to push users across even one by one (or do a bulk move).
Remember, apart from the slight gremlin that the dovecot index files get made non v1 compatible by the v2 server, the data can be copied back/forward between servers and most MUAs will likely not notice the difference between your v1.2 and v2 installation... Don't get over-fixated on the server version, focus on not ending up without a working server during the process
Good luck
Ed W
That makes better sense. I did not realize you meant to leave both live during the process. Thanks for clarifying that.
On 2/17/2011 9:29 AM, Donny Brooks wrote:
We are looking to migrate from our current mail server running dovecot-1.2.11-3 to a new mail server running the latest dovecot (2.0.9?). So this would not only be a version change but also a machine change. We currently use Maildir for storing mail and would like to stay that way.
Has anyone preformed such a feat and it worked? Looking for any input.
I have looked through the docs and can't seem to find anything that would pertain to my situation. Unless I totally missed it. Anyone have any pointers?
participants (4)
-
Charles Marcus
-
Donny Brooks
-
Ed W
-
Rick Romero