# The challenge: move zimbra open source edition off my oldserver to my new server.
# Old server: Ubuntu 8.04 32 bit 6.0.4_GA_2038
# New server: should become Ubuntu 10.04 64bit 6.0.8_GA_2661
# Steps (this is not a recipe. Just test and test and test first!)
### ON THE OLD SERVER
# make full copy on new machine
DEST="new.server.tld:/opt/"
# Live sync before stopping Zimbra to minimize sync time with the services down
# you need to have SSH leys in place of course.
rsync -essh -avHK --delete /opt/zimbra/ $DEST/zimbra 2>&1 >/tmp/zimbra-backuplog-1
# stop Zimbra
/etc/init.d/zimbra stop
# Kill any orphaned Zimbra processes
pkill -9 -u zimbra
# rsync the changes (a lot less then in previous run!!)
rsync -essh -avHK --delete /opt/zimbra/ $DEST/zimbra 2>&1 >/tmp/zimbra-backuplog-2
# needed later for ldap
/opt/zimbra/libexec/zmslapcat /tmp
scp /tmp/ldap.bak $DEST
scp /opt/zimbra/data/ldap/hdb/db/DB_CONFIG $DEST
exit
### ON THE NEW SERVER
# download 6.08
# wget whatever, tar something, cd to the installer dir, then:
./install.sh --softwareonly
/opt/zimbra/libexec/zmfixperms --verbose
#Then follow this recipe (from
Exporting and Importing Zimbra LDAP Data » Zimbra :: Blog)
#To dump on the 32-bit:
#/opt/zimbra/libexec/zmslapcat /tmp
#Which is essentially running ${zimbra_home}/openldap/sbin/slapcat -F ${zimbra_home}/data/ldap/config -b "" -l /tmp/ldap.bak.${D}
# WE DIT THAT ALREADY, in /opt there is ldap.bak and DB_CONFIG
#To import on the 64-bit:
rm -rf /opt/zimbra/data/ldap/hdb/*
# 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
# Copy the file /opt/zimbra/data/ldap/hdb/db/DB_CONFIG from the 32-bit server to /opt/zimbra/data/ldap/hdb/db on the 64-bit server. Note: If this file does not exist, or is empty, creating it may improve performance.
cp /opt/DB_CONFIG /opt/zimbra/data/ldap/hdb/db
chown -R zimbra:zimbra /opt/zimbra/data/ldap
# Copy from the 32-bit server to the 64-bit server the /backup/ldap.bak file. WE DONE THAT
# now add ldap
/opt/zimbra/openldap/sbin/slapadd -q -b "" -F /opt/zimbra/data/ldap/config -cv -l /opt/ldap.bak.
# this is needed, why? well i can't tell why.
cd /opt/zimbra/zimbramon/lib/
mv i486-linux-gnu-thread-multi i486-linux-gnu-thread-multi-old
ln -s x86_64-linux-gnu-thread-multi i486-linux-gnu-thread-multi
# run fixperms again.
/opt/zimbra/libexec/zmfixperms --verbose
# UPDATE YOUR DNS SO old.server.tld points to the new IP.
# ALSO FIX /etc/hosts accordingly
# see
[SOLVED] Problem migrating 6.0.8 GA from Debian 4 32-bit to Ubuntu 10.04 LTS 64-bit
# needed for clamav, in the above docs it's called llibltdl7 (one l to much)
apt-get install libltdl7
/opt/zimbra/libexec/zmsetup.pl
### THAT IS IT? MAYBE. YOU NEED TO CHECK.
# also, change the IP number that is trusted! You can do that in the graphical admin
# console, under MTA, there is some ip numbers that are trusted (needed for webmail?)
### ON THE OLD SERVER
apt-get install redir
redir --laddr=0.0.0.0 --lport=25 --caddr=YOUR-NEW-IP --cport=25 --syslog &
# ADD A SIMILAR LINE FOR EACH PORT YOU WANT FORWARDED: 443, 993,
# 465, 110, 143, etc etc ONLY TCP!
Comments welcome.
Open Source, Open Content & Open Standards on Curaçao