Zimbra OSE Migration hints and tips
by Brendan Horan –April 2, 2011
Sometimes the Zimbra documentation can be less then good.
I recently decided to make a move away from my old bad VPS provider to a dedicated host. Over to the good people at Hetzner , they where recommended by a friend of mine. Anyways enough of the spam.
If you need to move your Zimbra server to a different host but same DNS host-name, theres is a few things you need to do in addition to the normal cold backup method.
Hear is what I did.
- Stop the Zimbra server, ensure all Zimbra process, this works well after zmcontrol :
# zmcontrol stop
# pkill -9 -u zimbra
- Tar up /opt/zimbra , ensure you grab all permissions.
# tar -zcvpf zimbra-migration.tgz /opt/zimbra
- On the new server to a "Software Only Install". Ensure you are using the same install tarball as the old server install!
# ./install.sh -s
- Remove everything in /opt/zimbra
# cd /opt/zimbra
# rm -rf *
- Untar the backup we made into /opt/zimbra :
# cd/opt
# tar -zxvf zimbra-migration.tgz .
- Find the PID of the zimbra user in /etc/passwd then update the localconf.xml with the new PID : Look for the "zimbra_uid" section
# vim /opt/zimbra/conf/localconf.xml
- Fix the permissions I had to fix one addition folder to : Run the zimbra tool first.
# /opt/zimbra/libexec/zmfixperms --extended -verbose
I also had to fix this :
# chown zimbra:root -R /opt/zimbra/jetty/logs/
7) Start up zimbra the normal way and check the logs :
# su - zimbra
# zmcontrol start
All logs are in "/opt/zimbra/log/" main ones are "mailbox.log" "zmconfigd.log" but check them all!
- Last thing is to update the allowed relay hosts, otherwise you get this error :
"554 5.7.1 : Relay access denied
code: mail.SEND_ABORTED_ADDRESS_FAILURE"
Where "MYHOST.COM" is your host name and" xxx.xxx.xxx.xx/32" is your servers IP :
# zmprov modifyServer MYHOST.COM zimbraMtaMyNetworks '127.0.0.0/8 xxx.xxx.xxx.xxx/32'
- Restart zimbra and checks all the logs again. Also check the zimbra users crontab to ensure its populated correctly.