Migrate Zimbra Community to New Server

Migrate Zimbra Community to New Server

Migrate Zimbra Community to New Server

** NOT RESPONSIBLE FOR DATA LOSS, BE SMART, MAKE A BACKUP /OPT FIRST **

In this blog we are migrating Zimbra Community to a new server. Let’s go over the minimum requirements one more time:

I’m Behind a NAT, you need this step:

CentOS installer hostname screen with zimbra.mydomain.com entered (needed behind NAT)

the hostname of your Zimbra Server needs to be that of the Public nature, it CANNOT be the internal name, you will run into issues. That being said, set a Static IP, and do the Install as normal. Be aware that zimbra installs in /opt for when you get to the Disk Partitioning Area.

Once you have your VM/Dedicated Box, make sure you disable Iptables, and Ip6tables, as well as SELinux

Start by updating all Software Packages, and rebooting afterwards:

Same CentOS hostname screen set to zimbra.mydomain.com, repeated at the update step

install the prerequisites

CentOS hostname zimbra.mydomain.com screen shown again at the prerequisites step

part 2

yum -y install nano make libtool-ltdl glibc perl ntp prerequisites on the new Zimbra server

edit your hosts file

vi /etc/hosts opened as root on the new Zimbra server

enter the necessary info

/etc/hosts with localhost lines and the server IP mapped to zimbra.mydomain.com

also disable Postfix, it’s included with the CentOS Default Install

yum -y install rsync run from /opt on the new Zimbra server

this process also requires Rsync to be installed on both servers (if not already)

yum -y install rsync, needed on both the old and new Zimbra servers

From here we need to do one of the following:

1) shut-down live Zimbra and rsync -avH /opt/zimbra /mnt/Backup

2) while we wait copy the installer for your present version of Zimbra to the new Server

In our case we have the installer in the /opt/Installers folder, so we are copying that over now

cp -R Installers /opt copying the Zimbra installer folder to the new server

in this case we need to change to the proper folder with the proper versioncd /opt/Installers/zcs-8.0.6 into the Zimbra installer folder

from here run the installer with the -s option

Zimbra 8.0.6 installer folder listing and ./install.sh -s to install software only

Install all packages the same as you did on your original Zimbra Server

Zimbra install prompts answering y for ldap, logger, mta, snmp, store, apache, spell, memcached; n for proxy

now the new system will be modified, obviously we want to continue

Zimbra installer prompt: The system will be modified. Continue? answered y

all the original packages will be installed….

Installing packages: zimbra-core, ldap, logger and mta 8.0.6 RHEL6 x86_64 RPMs done

perfect, just as expected….

Same Installing packages progress screen for the Zimbra 8.0.6 RPMs

now on the NEW server, rm -rf /opt/zimbra, this removes the dummy copy

Zimbra 8.0.6 Installing packages screen repeated before removing the dummy /opt/zimbra

from here hopefully your backup has completed, now we need to restore it, mount and change to your backup directory, from here we rsync the zimbra folder to /opt

ls in /opt showing Installers and zimbra, then rsync -avH zimbra /opt to restore the backup

This particular step takes forever + 1 day, don’t get too worried if it’s stuck there forever.

rsync copying zimbra/data/ldap/mdb/db/data.mdb, the slow part of the restore

completed!

rsync finished: total size 85213188747 bytes, speedup is 1.00

now we need to fix zimbra permissions, just in case

Running /opt/zimbra/libexec/zmfixperms to fix Zimbra file permissions

that step completed quickly, now we need to re-run the installer one more time to “upgrade” the databases

Zimbra-8.0.6 folder listing and ./install.sh -s run again to upgrade the databases

run the installer one more time with the -s option

Same ./install.sh -s command in the Zimbra-8.0.6 installer directory

accept the licence agreement if you agree

at this step, it would be a good idea to check the integrity to make sure your backup was good (unless you want to gamble with many users email)

Installer prerequisite check finds perl, sysstat and sqlite, asks to verify message store integrity

perfect, all is installed correctly, we must now upgrade (sound silly, but in order for it to work, that’s the process)

Zimbra installer: The Zimbra Collaboration Server appears already to be installed. Do you wish to upgrade? [Y]

select the proper packages

Select the packages to install: Upgrading zimbra-core through zimbra-memcached, proxy set to N

from here all will be upgraded

Checking required space, Installing zimbra-core through zimbra-memcached, Continue? answered y

after a while you will see the following:

Software Installation complete! Operations logged to /tmp/install.log, run zmsetup.pl next

From here once all is completed, su to zimbra

Same Software Installation complete message pointing to /opt/zimbra/libexec/zmsetup.pl

zmcontrol start

zmcontrol start run as the zimbra user to start all Zimbra services

at this point, you may want to shutdown your old Zimbra Server, Test Web URL, re-configure backups, verify mailflow, etc

Check these links if you are having trouble with inbound/outbound email:

http://wiki.zimbra.com/index.php?title=ZimbraMtaMyNetworks

http://wiki.zimbra.com/wiki/Incoming_Mail_Problems

That’s it!

Related guides: Install Zimbra Community CentOS 6 | Upgrade Zimbra Community Version CentOS 6

Leave a Reply

Your email address will not be published. Required fields are marked *