I recently succeeded in migrating our Zimbra server to a 64bit operating system. If you are tasked with doing the same, I hope this post helps you out, because a ran into a few problems. I had to use 4 different guides to finish the migration on Ubuntu; apparently the migration on Ubuntu requires more steps than other operating systems. If you are reading this you already know that Zimbra no longer supports a 32bit operating system for it's newest release, Zimbra 8. In our environment, we moved from Zimbra 7.2.1 on Ubuntu 8.04 32bit to Zimbra 7.2.1 on Ubuntu 10.04 64bit.
Here are the guides that I used to complete the move:
For the most part, I followed the first guide above, which is pretty straight foward. But it omits several steps that were required in our migration. Here is what I did:
Make certain you are installing the exact version of Zimbra on the new server that was installed on your old server!
Install 32bit runtime libraries on Ubuntu as root.
apt-get install ia32-libs
Install the just the packages on new host.
Copy /opt/zimbra/zimbramon of the 64bit installed stuff to a tmp dir
cp -rp /opt/zimbra/zimbramon /opt/zimbramon-64bit
Remove /opt/zimbra on new host.
rm -rf /opt/zimbra
On old host, rsync /opt/zimbra AS ROOT to the new host.
nice -n +19 rsync --progress -avzH -e ssh /opt/zimbra/ root@NEWHOSTIP:/opt/zimbra
Continue to sync the zimbra directory until you are ready to move.
STOP SERVICES ON OLD HOST. Failure to stop services can result in data corruption on the target host.
Perform last rsync as root on old host.
nice -n -20 rsync -avzH -e ssh --delete --progress /opt/zimbra/ root@NEWHOSTIP:/opt/zimbra
Copy the zimbramon-tmp over the /opt/zimbra/zimbramon dir
cp -rp /opt/zimbramon-64bit/* /opt/zimbra/zimbramon
Repair permissions on new host.
/opt/zimbra/libexec/zmfixperms --verbose --extended
Export the LDAP data on the old host:
a. Create an LDAP dump directory. As root, type:
b. As root, type:
chown zimbra:zimbra /backup
c. Backup the LDAP data, as zimbra, type:
d. Backup LDAP config data, type:
/opt/zimbra/libexec/zmslapcat -c /backup
e. On new host, do:
f. From old host, copy over the ldap.bak file:
scp /backup/ldap.bak firstname.lastname@example.org:/backup
g. From old host, copy over the ldap-config.bak file:
scp /backup/ldap-config.bak email@example.com:/backup
Rename new host to old name and change IP. If you are not changing the IP, make sure that you have updated DNS and that the hostname resolves to the correct IP. (This varies by distro- /etc/hosts /etc/sysconfig etc). You may want to reboot the host just to be sure the name change takes.
Restore the LDAP data to the new server. As zimbra, type on new server:
rm -rf /opt/zimbra/data/ldap/hdb/* rm -rf /opt/zimbra/data/ldap/config/*
If this is an ldap master with replicas:
rm -rf /opt/zimbra/data/ldap/accesslog/* mkdir -p /opt/zimbra/data/ldap/hdb/db /opt/zimbra/data/ldap/hdb/logs
If this is an ldap master with replicas:
mkdir -p /opt/zimbra/data/ldap/accesslog/db /opt/zimbra/data/accesslog/logs
Create the new directory structure and restore database tuning
cd /opt/zimbra/data/ldap mkdir -p hdb/db mkdir -p hdb/logs
chown -R zimbra:zimbra /opt/zimbra/data/ldap
/opt/zimbra/openldap/sbin/slapadd -q -n 0 -F /opt/zimbra/data/ldap/config -cv -l /backup/ldap-config.bak
/opt/zimbra/openldap/sbin/slapadd -q -b "" -F /opt/zimbra/data/ldap/config -cv -l /backup/ldap.bak
this time without the -s flag. This will upgrade the files under /opt/zimbra that need to be corrected for the new hardware. Select Y to upgrade. Do not check the database as you will receive some errors.
update the ssh keys after the install is finished, as zimbra, type:
Make sure that the UID for the zimbra user is the same as before. If it has changed, edit /etc/passwd to make it match the zimbra user UID on the old server.
If you use secondary disks, you can mount them on your new operating system without any problems. The filesystem is not changed from 32bit to 64bit.
Now your /opt/zimbra/* is the same on both hosts (or upgraded for new hardware by install.sh), and you have imported the LDAP DB, your hostname should be the same as before. You should be able to start Zimbra on the new host.