[Dovecot] migrate machines and upgrade
I am about to be migrating mail servers and have a few questions. First a little background:
Old mail server: Fedora 11 dovecot-1.2.11-3.fc11.x86_64 installed from yum repo mbox mail format OpenLDAP authentication 250+ users
New mail server: Fedora 13 dovecot-2.0.1-1_118.fc13.x86_64 installed from atrpm rpm file Maildir mail format OpenLDAP authentication 250+ users
I plan to use dsync on the new machine to migrate the mail off the old machine and mbox format to the new machine and Maildir. I think I read where I can do the migration without interfering with normal mail delivery and then when i get ready to do the final move I just kill dovecot on the old machine, dsync once more, and start the service on the new machine. What would be the best way to accomplish this?
And as for the configuration changed between 1.2.11 and 2.0.1, where to start? I see there is now a conf.d directory for 2.0.1. How will this tie in to the 1.2.11 config? Any pointers there?
Other option is to move the mbox mail as it sits to the new machine, install 1.2.X branch dovecot on new machine, and let the convert plugin do all the work. However I like the idea of the dsync doing the sync with minimal downtime.
Thanks in advance.
--
Donny B.
On 10/6/2010 4:18 PM, Donny Brooks wrote:
I am about to be migrating mail servers and have a few questions. First a little background:
Old mail server: Fedora 11 dovecot-1.2.11-3.fc11.x86_64 installed from yum repo mbox mail format OpenLDAP authentication 250+ users
New mail server: Fedora 13 dovecot-2.0.1-1_118.fc13.x86_64 installed from atrpm rpm file Maildir mail format OpenLDAP authentication 250+ users
I plan to use dsync on the new machine to migrate the mail off the old machine and mbox format to the new machine and Maildir. I think I read where I can do the migration without interfering with normal mail delivery and then when i get ready to do the final move I just kill dovecot on the old machine, dsync once more, and start the service on the new machine. What would be the best way to accomplish this?
And as for the configuration changed between 1.2.11 and 2.0.1, where to start? I see there is now a conf.d directory for 2.0.1. How will this tie in to the 1.2.11 config? Any pointers there?
Other option is to move the mbox mail as it sits to the new machine, install 1.2.X branch dovecot on new machine, and let the convert plugin do all the work. However I like the idea of the dsync doing the sync with minimal downtime.
Thanks in advance.
Ok, I found the way to convert the configuration. However I am still having issues trying to get the right way to migrate the users from the old machine on 1.2.11 and mbox to the new one on 2.0.1 and Maildir. I am trying the dsync commands on the wiki to use ssh to no avail due to it still being 1.2.11 on the old server. I am slowly trying various mirror commands, but if anyone has any pointers that can help speed this along I will be much appreciative.
Here is what I have tried thus far:
As root I su to my user on the new server: -bash-4.1# su - dbrooks then tried the dsync command as in the wiki:
-bash-4.1$ dsync -u dbrooks mirror dbrooks@roark dsync(dbrooks): Error: userdb lookup: connect(/var/run/dovecot/auth-userdb) failed: Permission denied (euid=879(dbrooks) egid=100(users) missing +r perm: /var/run/dovecot/auth-userdb, euid is not dir owner) dsync(dbrooks): Fatal: User lookup failed: Internal error occurred. Refer to server log for more information. No go so I go back to root login and try it that way, still on the new machine: -bash-4.1$ logout -bash-4.1# dsync -u dbrooks mirror dbrooks@roark root@roark's password: bash: dsync: command not found dsync-local(dbrooks): Error: read() from worker server failed: EOF
Now I try the ssh command from the new machine as root: -bash-4.1# ssh dbrooks@roark dsync -u dbrooks dbrooks@roark's password: bash: dsync: command not found -bash-4.1#
I am lost. I am sure it is something simple I am missing.
Donny B.
On 06/10/2010 22:18, Donny Brooks wrote:
dovecot-2.0.1-1_118.fc13.x86_64 installed from atrpm rpm file
2.0.1?
It seems strange to go with an old point version. Would you not be better off with 2.0.5 ?
Though the latest FC13 binaries I could find were for v2.0.4 to be found at
http://packages.atrpms.net/dist/f13/dovecot/
Bill
On 06/10/2010 22:18, Donny Brooks wrote:
dovecot-2.0.1-1_118.fc13.x86_64 installed from atrpm rpm file
2.0.1?
It seems strange to go with an old point version. Would you not be better off with 2.0.5 ?
Though the latest FC13 binaries I could find were for v2.0.4 to be found at
http://packages.atrpms.net/dist/f13/dovecot/
Bill I just installed the newest version for what I could find for the distro I am running. I don't think the version matters much at this point
On 10/8/2010 12:37 PM, William Blunn wrote: though. I am mainly focused on trying to migrate the mail to the new server. I don't want to have to upgrade the OS on the existing machine and THEN upgrade dovecot to do an "in-place" migration. Since we are currently on Fedora 11 on the old machine I would have to upgrade to at least Fedora 12, but then why mess with 12 when 13 is current and then 14 is out in about 25 days?
It boils down to, I just need to figure out how to make the migration work between the two machines and nothing i am trying is working properly. Anyone able to point me in the right direction?
Donny B.
Gotcha, so should I stay with the 1.2.xx branch and just use the mail_convert plugin? The only issue I have with that one is that I can't do it gradually and it pegs the server for all it has when a user is converted. Is there a better way to migrate from mbox to Maildir and also from old machine to new? That is my end goal, migrate to new machine and to Maildir. Anything else is not really a huge deal.
--
Donny B.
On Friday, October 08, 2010 02:01 PM CDT, Charles Marcus CMarcus@Media-Brokers.com wrote:
On 2010-10-08 2:53 PM, Donny Brooks wrote:
I don't think the version matters much at this point though.
2.0 has been a bit buggy, so in this case, it does matter...
--
Best regards,
Charles
Donny Brooks wrote:
Gotcha, so should I stay with the 1.2.xx branch and just use the mail_convert plugin? The only issue I have with that one is that I can't do it gradually and it pegs the server for all it has when a user is converted. Is there a better way to migrate from mbox to Maildir and also from old machine to new? That is my end goal, migrate to new machine and to Maildir.
I'm facing a similar issue. I was thinking of separate stages.
1 leave the mail where it is, make it available via NFS. 2 install a good new Dovecot (1.2.15) on the new machine (Test it etc.) 3 Change clients to access new Dovecot instead. Give it a few days. 4 Sometime later, do the mail conversion to Maildir, and you could decide what machine to have the mail on, too.
regards, Ron
Please don't top-post...
On 2010-10-08 3:15 PM, Donny Brooks wrote:
On Friday, October 08, 2010 02:01 PM CDT, Charles Marcus CMarcus@Media-Brokers.com wrote:
On 2010-10-08 2:53 PM, Donny Brooks wrote: I don't think the version matters much at this point though.
2.0 has been a bit buggy, so in this case, it does matter...
Gotcha, so should I stay with the 1.2.xx branch and just use the mail_convert plugin?
Or upgrade to 2.0.5 on the new server and still use doveadm - this is probably best if you can...
Honestly though, I'm not really the best one to be advising you on this (I know enough to be dangerous, have played with the tools, but don't provide any warranties, etc)...
The only issue I have with that one is that I can't do it gradually and it pegs the server for all it has when a user is converted.
You can convert one or a few at a time, and I don't see any reason why you couldn't 'nice' the process somehow (not sure exactly how though)...
Is there a better way to migrate from mbox to Maildir and also from old machine to new? That is my end goal, migrate to new machine and to Maildir. Anything else is not really a huge deal.
I think the best thing would be to do what you need to do to get 2.0.5 installed on the new server, make sure it is working properly in your environment and for your use case, then migrate the users.
How many users do you have? I'm fairly certain there is a good way to do this mostly automated in batches...
--
Best regards,
Charles
On Friday, October 08, 2010 02:33 PM CDT, Charles Marcus CMarcus@Media-Brokers.com wrote:
Please don't top-post...
I do apologize, I was using my webmail program and it was not setup properly
On 2010-10-08 3:15 PM, Donny Brooks wrote:
On Friday, October 08, 2010 02:01 PM CDT, Charles Marcus CMarcus@Media-Brokers.com wrote:
On 2010-10-08 2:53 PM, Donny Brooks wrote: I don't think the version matters much at this point though.
2.0 has been a bit buggy, so in this case, it does matter...
Gotcha, so should I stay with the 1.2.xx branch and just use the mail_convert plugin?
Or upgrade to 2.0.5 on the new server and still use doveadm - this is probably best if you can...
The newest I see for an rpm is 2.0.4 on the atrpms site. We try not to build from source due to the way a previous admin messed things up. Any pointers on a source for the 2.0.5 rpm?
Honestly though, I'm not really the best one to be advising you on this (I know enough to be dangerous, have played with the tools, but don't provide any warranties, etc)...
The only issue I have with that one is that I can't do it gradually and it pegs the server for all it has when a user is converted.
You can convert one or a few at a time, and I don't see any reason why you couldn't 'nice' the process somehow (not sure exactly how though)...
Is there a better way to migrate from mbox to Maildir and also from old machine to new? That is my end goal, migrate to new machine and to Maildir. Anything else is not really a huge deal.
I think the best thing would be to do what you need to do to get 2.0.5 installed on the new server, make sure it is working properly in your environment and for your use case, then migrate the users.
How many users do you have? I'm fairly certain there is a good way to do this mostly automated in batches...
We have about 160 users I believe at last count. Mail boxes range in size from a few MB to around 8GB. Being a state agency, they tell us we cannot delete any mail. This is why I am wanting to switch to Maildir so I can migrate "old" messages off to a different machine/disk for archival purposes but still remain accessible.
--
Best regards,
Charles
--
Donny B.
On 2010-10-08 3:54 PM, Donny Brooks wrote:
On Friday, October 08, 2010 02:33 PM CDT, Charles Marcus CMarcus@Media-Brokers.com wrote:
Or upgrade to 2.0.5 on the new server and still use doveadm - this is probably best if you can...
The newest I see for an rpm is 2.0.4 on the atrpms site. We try not to build from source due to the way a previous admin messed things up. Any pointers on a source for the 2.0.5 rpm?
No, sorry - but you could join the atrpms users list and request an updated rpm - axel and co are usually pretty responsive, or so I've heard (my package manager is not rpm based)...
Also, I said doveadm above, but I meant dsync (which is only available in 2.0.x)...
I think the best thing would be to do what you need to do to get 2.0.5 installed on the new server, make sure it is working properly in your environment and for your use case, then migrate the users.
How many users do you have? I'm fairly certain there is a good way to do this mostly automated in batches...
We have about 160 users I believe at last count. Mail boxes range in size from a few MB to around 8GB. Being a state agency, they tell us we cannot delete any mail. This is why I am wanting to switch to Maildir so I can migrate "old" messages off to a different machine/disk for archival purposes but still remain accessible.
The dovecot wiki has decent instructions for accomplishing your goal - have you read them thoroughly? If not, I recommend doing so, then coming back with any questions:
http://wiki2.dovecot.org/Tools/Dsync
--
Best regards,
Charles
Gotcha, so should I stay with the 1.2.xx branch and just use the mail_convert plugin? The only issue I have with that one is that I can't do it gradually and it pegs the server for all it has when a user is converted. Is there a better way to migrate from mbox to Maildir and also from old machine to new? That is my end goal, migrate to new machine and to Maildir. Anything else is not really a huge deal. From what I have seen and experienced I would install a 2.0.x, x>=5,
Am 08.10.2010 21:15, schrieb Donny Brooks: perhaps waiting until a matching rpm is provided by somebody. The 2.0 series is a huge improvement, but as always with new software, with the first versions a bunch of problems is being uncovered.
As for the migration, have you had a look at imapsync? With that tool I migrated lots of mailboxes user-wise from one imap server to another.
HTH, Jakob Curdes
On Friday, October 08, 2010 02:52 PM CDT, Jakob Curdes jc@info-systems.de wrote:
Gotcha, so should I stay with the 1.2.xx branch and just use the mail_convert plugin? The only issue I have with that one is that I can't do it gradually and it pegs the server for all it has when a user is converted. Is there a better way to migrate from mbox to Maildir and also from old machine to new? That is my end goal, migrate to new machine and to Maildir. Anything else is not really a huge deal. From what I have seen and experienced I would install a 2.0.x, x>=5,
Am 08.10.2010 21:15, schrieb Donny Brooks: perhaps waiting until a matching rpm is provided by somebody. The 2.0 series is a huge improvement, but as always with new software, with the first versions a bunch of problems is being uncovered.
As for the migration, have you had a look at imapsync? With that tool I migrated lots of mailboxes user-wise from one imap server to another.
HTH, Jakob Curdes
*insert Homer Simpson sound...* D'OH!
I totally forgot about imapsync. I played with it a few months back but totally forgot about it. Thanks for reminding me!
--
Donny B.
participants (5)
-
Charles Marcus
-
Donny Brooks
-
Jakob Curdes
-
Ron Leach
-
William Blunn