Recently I have undergone a massive change, we have decided at our organization to go with Snow Leopard server in place of our Leopard Servers. Knowing that this could be problematic to use Apples built in GUI for migrating data I decided to start with a 100% clean configured Snow Leopard server and slowly start to migrate items over to the new server. Our current Leopard Server was running an DNS, Open Directory Master, Mail, and Wiki Server services. I have decided to share my experience in migrating our mail from one server to another.
setup the 10.6.2 Snow Leopard server clean before I did anything I setup DNS on the server and manually retyped and rechecked all of the DNS records from the 10.5 server to the 10.6.2 server. Once I verified that the DNS records were set. I checked the server’s DNS by running sudo changeip -checkhostname and it came back clean. Great good to go, or so I thought.
I had setup split horizon DNS on the server, the Open Directory Master, has already been setup on a single use Mac Mini Server. The Mac Mini Server is running the ODM and DNS. The DNS on the Mini is self referencing and my router has the public ip mapped to the private. The new Mail server (10.6.2) also running DNS had a record pointing to the public ip of the ODM. Great, next step bind the mail server to the ODM so that I can start to migrate mail accounts.
I was working on this project around 10:00pm in the evening not knowing how long that it would take to migrate the accounts from Cyrus to Dovecot, but I had studied the Apple upgrade instructions for weeks prior so I felt like I had it totally under control. I followed the instructions and used the code from page 42 of the manual.
sudo /usr/libexec/dovecot/migrate_mail_data.pl --moveMail 0 --cyrusBin "/Volumes/10.5 Server Volume Name/usr/bin/cyrus/bin" --database "/Volumes/10.5 Server Volume Name/var/imap" --sourceSpool "/Volumes/10.5 Server Volume Name/var/spool/imap" --targetSpool "/var/spool/imap/dovecot/mail"
The script will tell you if your doing something wrong, which is helpful. My biggest question was how long would it take to migrate 30GB of mail to the new mail server. The answer, exactly two hours. I had decided that instead of using a firewire cable to connect the two servers together that I would simply pop the HD out of the old mail server and put it into the new server. This made a huge difference in the time of migration.
Once it finished I turned on mail, and everything started working fine. Great! I cleaned up my tools and logged out of the server and went home around 2am. The next few days were pure hell. As mentioned above I decided to use split horizon DNS. It was my first attempt at doing this and what I had noticed in the logs were a myriad of disconnect warnings every 5 min the mail server was getting disconnected from the ODM and then reconnecting causing some major issues.
The log files were filling up so fast that they were causing kernel panics, I had to reboot the server many times once every couple of hours, I decided to call Apple. The Apple representative captured my logs, and promptly told me that I would have to reformat the hard drive and completely start over. I told him that this was a clean install and that no way would I be starting over. He offered no other solution or advice other than telling me that it was not normal for a new server to have kernel panics this early in the game.
I decided to check my DNS turns out that the route statement in the router, was not properly entered. It was getting to the server but it was unable to retain a connection. I re-entered the route statement correctly and then rebooted the router. Almost immediately the issues stopped. Apple has come a long way in their migration capabilities if your ever having issues with your 10.6.2 mail service DNS is almost always the culprit!
[...] Follow this link: Jon Brown Designs [...]
[...] Excerpt from: Jon Brown Designs [...]
Can you describe your DNS setup in a bit more detail? I have looked up the definition of split horizon dns but it did not help.
Also, I cannot seem to get the migration script to run. I have copied the /usr/bin/cyrus/bin directory to an external drive, and referenced it in my script. But it comes back with an error stating “Error: cvt_cyrusdb does not exist in: .”
I know the file is in the directory. My original server setup was using an external volume to keep the mail store. Is it possible that the /cyrus/bin folder is also in a different location than normal?
Thanks!
Wow. Thanks so much for a detailed and clear reply. The old server is still running while I figure out how to best accomplish migration. So, I can certainly give your suggestion a try.
I have been going off of the Migration document you recommend using the section for Manual Migration. It describes exporting data and backing up certain files. Somehow I interpreted it to mean I could do what I tried. And, I was using split horizon dns without knowing what it is called.
Thank you for educating me!
Hmm, I can think of an issue with mounting the drives in target disk mode. The new drives have the same names as the old ones. Macintosh HD and UserData. So when I mount the old ones I will have two drives of each name. If I rename the old drives Macintosh HD-old and UserData-Old will this break the info in /usr/bin/cyrus/bin ??
Thanks!
Your very welcome, I think you can rename the drives without any problem that should be fine and should not affect the transfer. What I did instead of target disk mode was just take the drive out of the old XServe and put it in the new one, and yes I did rename my drive seemed to be ok.
Split horizon DNS means that you have two sets of DNS records, a public facing set and a private facing set. You never want your server to be out on the public internet so what you should be doing is putting your server behind a firewall and using its port forwarding options to forward your servers public IP to its private IP. When people in the real world want to get to your server they will reference your public facing DNS records. We use GoDaddy for our public DNS since we also get our domains with them as well. Internally your server should reference itself. You should be running DNS but the record should point internally. That is what split horizon DNS is.
The mail migration script needs to run off of the original drive, you can either mount your old server in target disc mode onto your new hardware. If your performing an upgrade then you should not just copy the /usr/bin/cyrus/bin/ directory to another hard drive, this will never work because the permissions have changed and the Apple migration script looks in the database, and the database in turn references other directories you really should either install on a clean hard drive and import from the old hard drive, or use carbon copy cloner to clone the drive to another drive then run the script.
I understand that your mailstore was on another drive, I did that too without looking at your setup I would guess that the /usr/bin/cyrus/ folder you copied might be empty indeed. You can check the exact path in Server Admin if your old server is still operational. You should also reference this document and read it carefully. http://manuals.info.apple.com/en_US/Migration_v10.6.pdf it answers a lot of your questions. Good luck and thanks for commenting!
Reply