Migrate and upgrade Zimbra to a new server

Want to upgrade your Zimbra server but you wanna make sure the upgrade won’t crash your production server? the best way is to migrate it to a new server.

What you need?

- A new server! (with minimum 2 Hard Drive, 2 to 4GB of RAM)
- Same OS on the new server than the previous install
- The old package of your previous install of Zimbra
http://www.zimbra.com/community/downloads_previous.html

My installation was previously on a Ubuntu 6.06 LTS. The Zimbra server was 4.5.3

The new server will have Ubuntu 6.06 LTS too

Prepare the new server
IP: 192.168.1.1
DNS server: 192.168.2.1
Domain: yourdomain.com
Name of the server: mail.yourdomain.com

- Install Ubuntu 6.06 LTS (Don’t forget to manually partition the disk:
- 40-60 GB for /
- 2 to 4 gb for swap (depending the RAM you’ve got)
- Another hard drive (minimum 500GB) for /opt (Zimbra installation)
- Install and configure Bind to point to your local IP address 192.168.1.1 (not localhost)
# nano /etc/resolv.conf
search yourdomain.com
nameserver 192.168.1.1
nameserver 192.168.2.1
# nano /etc/hosts
127.0.0.1 localhost
192.168.1.1 mail.yourdomain.com yourdomain.com
# hostname mail.yourdomain.com
# hostname -f

Install a dummy Zimbra 4.5.3 on the new server

# cd /opt
# tar -xvzf zcs-4.5.3_GA_733.UBUNTU6.tgz
# cd /opt/zcs
# ./install
- You have to copy paste all the missing package
# apt-get update
# apt-get install the_missing_plugins
# ./install

The installation is now done.

Backup the fresh install

# su - zimbra
# zmcontrol stop
# exit
# mv /opt/zimbra /opt/zimbra.fresh_install
Make sure /opt/zimbra is not there anymore.
# la -lah /opt

Backup the production server (Zimbra OpenSource Version 4.5.3)
The best way to backup the production server in the OpenSource version is to stop it first.

# su - zimbra
# zmcontrol stop
# exit
# scp -rp /opt/zimbra root@192.168.1.1:/opt/

done!
Go back to the new zimbra server

Fix permission on the new Zimbra server

With root user
# chown -Rf zmbra:zimbra /opt/zimbra
# chmod -Rf 755 /opt/zimbra
# su - zimbra
# /opt/zimbra/libexec/zmfixperms

Install Zimbra 5

# cd /opt
# wget http://files.zimbra.com/downloads/5.0.8_GA/zcs-5.0.8_GA_2462.UBUNTU6.20080709173036.tgz
# tar -xvzf zcs-5.0.8_GA_2462.UBUNTU6.20080709173036.tgz
# cd /opt/zcs5
# ./install
- Follow the instruction, don’t forget to set the admin password…!!
Maybe permissions won’t be ok so you have to set it again
# su - zimbra
# zmcontrol stop
# exit
# chown -Rf zimbra:zimbra /opt/zimbra
# chmod -Rf 755 /opt/zimbra
# /opt/zimbra/libexec/zmfixperms
# su - zimbra
# zmcontrol start
# zmcontrol status

Now the server should start without any problem with all the users accounts!

(OPTIONAL) Enable IM list and chat feature (Beta)

# su - zimbra
# zmprov mcf zimbraXMPPEnabled TRUE
# zmprov mc default zimbraFeatureIMEnabled TRUE
# zmprov mc default zimbraFeatureInstantNotify TRUE
# zmmailboxdctl restart

Enjoy !!!

One Response to “Migrate and upgrade Zimbra to a new server”

  1. Sheep Guarding Llama » Blog Archive » Updating Zimbra on Linux Says:

    [...] Linux Zimbra Upgrade HowTo from GeekZine [...]

Leave a Reply