Prequisits
The old mail server should run the same version of Zimbra you are going to use on the new server. If not then upgrade the old server to that version.
Centos
Create a virtual machine on ESX 4 or 5 using the SCSI LSI Logic Parallel driver. Install Centos 6.2 with a minimal install using kickstart and PXE boot.
chkconfig postfix off
service postfix stop
chkconfig iptables off
service iptables stop
chkconfig ip6tables off
service ip6tables stop
# install vmware tools
mount /dev/cdrom /mnt
cd /tmp; tar xvzf /mnt/
tar xvzf /mnt/VMwareTools-8.6.0-425873.tar.gz
cd vmware-tools-distrib/
./vmware-install.pl
yum install perl libstdc++.i686 -y
yum install fetchmail sysstat nc rsync -y
To prevent postfix error: 451 4.5.0 Error in processing, id=08434-01, parts_decode_ext FAILED: Unix utility file(1) not available, but is needed at (eval 102) line 110, <GEN17> line 63. (in reply to end of DATA command))
yum install file -y
scp root@old_mail_server:/etc/fetchmailrc /etc/
Add the host and the host.domain name to the /etc/hosts.conf file
yum install ntp -y
scp root@old_mail_server:/etc/ntp.conf /etc/ntp.conf
ntpdate nl.pool.ntp.org
service ntpd start
chkconfig --level 345 ntpd on
Install Zimbra on new server
Perform a clean install of the same version of Zimbra as you had on the old server, on the new server (with the new server as the default hostname??? TESTING THIS, WANT IT TO BE THE SAME)
cd /tmp; wget http://files2.zimbra.com/downloads/7.2.0_GA/zcs-7.2.0_GA_2669.RHEL6_64.20120410002025.tgz
Run visudo to temporarily comment the “Defaults requiretty” line
If not you’ll get prompts during installation saying “sudo: sorry, you must have a tty to run sudo”
Obsolete: To prevent messages about the missing libstdc++.so.6 library:
cp /usr/lib64/libstdc++.so.6 /usr/lib/libstdc++.so.6
tar -xzvf
zcs-7.2.0_GA_2669.RHEL6_64.20120410002025.tgz
cd zcs-7.1.1_GA_3196.RHEL6_64.20110527010625
./install.sh --platform-override --skip-activation-check
Copy my backup scripts from the old mail server:
mkdir /opt/zimbra/rict_scripts
rsync -avu root@old_mail_server:/opt/zimbra/rict_scripts/ /opt/zimbra/rict_scripts
As user zimbra set some parameters to improve performance:
su - zimbra
zmlocalconfig -e zmmtaconfig_interval=6000
zmprov mcf zimbraLogRawLifetime 7d
zmprov mcf zimbraLogSummaryLifetime 30d
exit
su - zimbra
crontab -e
*/60 * * * * /opt/zimbra/libexec/zmstatuslog
I stopped the logging process:
$ su - zimbra
$ zmprov ms fill_in_your_hostname -zimbraServiceEnabled logger
Then as the root user edit /etc/logrotate.d/zimbra and comment out all logger related start / reload commands e.g.
# su - zimbra -c "/opt/zimbra/bin/zmswatchctl restart" > /dev/null 2>&1 || true
# su - zimbra -c "/opt/zimbra/bin/zmlogswatchctl start"
As zimbra user:
su - zimbra
zmconfigdctl stop
zmconfigdctl status
Migrate data
Backup the LDAP config database and the LDAP data on old server:
su - zimbra
/opt/zimbra/libexec/zmslapcat -c /tmp
/opt/zimbra/libexec/zmslapcat /tmp
Copy the zimbra installation of the old server to the new one:
mkdir -p /opt/zimbra.old
rsync -avHS root@old_mail_server:/opt/zimbra/ /opt/zimbra.old/
Shut down zimbra on the new server:
service zimbra stop
On the old server shutdown Zimbra and change the hostname and IP address to something else. Do not turn off the server.
Copy the data and config from your old server over the relevant directories on the new server (as root):
cd /opt/zimbra
mkdir /tmp/zimbra-orig-backup
mv conf data db index logger postfix-*/conf redolog store /var/tmp/zimbra-orig-backup
for f in conf data db index logger postfix-*/conf redolog store ; do mv /opt/zimbra.old/$f/ $f/ ; done
rm data/postfix/spool/pid/master.pid
Edit /opt/zimbra/conf/localconfig.xml to update the following with the values from the localconfig.xml file on the old server:
a. zimbra_mysql_password
b. mysql_root_password
c. zimbra_logger_mysql_password (Note: Transfer/copy this value to the new server only if available from the old server.)
d. mailboxd_keystore_password (Note: Transfer/copy this value to the new server only if available from the old server.)
e. mailboxd_truststore_password
f. mailboxd_keystore_base_password
g. zimbra_ldap_password
h. ldap_root_password
i. ldap_postfix_password
j. ldap_amavis_password
k. ldap_nginx_password
l. ldap_replication_password
As root fix permissions:
/opt/zimbra/libexec/zmfixperms
This is now a version of Zimbra for your new operating system, with your old operating system’s data, that thinks it’s still the old hostname
Startup ldap as zimbra:
su - zimbra
ldap start
Change the hostname with zmsetservername -n $newserver following ZmSetServerName instructions to see if there are any other values that need changing. (You should also search for IP addresses like zimbraMtaMyNetworks etc)
Restart zimbra on the new server
zmcontrol restart
Check that everything starts up OK by watching /var/log/zimbra.log. If not debug, rinse and repeat
http://wiki.zimbra.com/wiki/Moving_ZCS_to_New_Server
http://wiki.zimbra.com/wiki/LDAP_data_import_export
http://wiki.zimbra.com/wiki/Zmconfigd
_______________
vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=ventoux.r71.nl
GATEWAY=10.0.1.254
vi /etc/hosts
10.0.2.4 ventoux.r71.nl ventoux
hostname ventoux.r71.nl
service network restart
yum install bind-utils nc sysstat -y
DEVICE=”eth0″
HWADDR=”00:50:56:89:D7:2B”
NM_CONTROLLED=”yes”
ONBOOT=”yes”
TYPE=”Ethernet”
BOOTPROTO=static
BROADCAST=10.255.255.255
IPADDR=10.0.2.4
NETMASK=255.0.0.0
NETWORK=10.0.0.0
cd /tmp/zcs
./install.sh --platform-override --skip-activation-check
*** not finished yet!! ***
Leave a Reply