Note: TEKYHOST will not be responsible for any unexpected results or data loss due to use of this article. We suggest that you make sure you have full backup and your recovery procedures are fully tested before you perform any ZIMBRA migration attempts.
TEKYHOST provides ZIMBRA consulting services by knowledgeable and experienced ZIMBRA experts.
1-888-638-1233 | [email protected]
Reason for Migration
In this Post we will be looking into how to migrate Zimbra Collaboration Release 8.8.15 GA to Ubuntu Server Version 20.04.6 LTS from CentOS based distributions.
In our case Current Zimbra Server is running CentsOS Stream 8. The main reason for this migration is that we require more stable OS with predictable stability and solid package repository.
Ubuntu came up as number one choice because of its stability, performance and security . We run it in AWS cloud and although the latest EC2 instance version available is 24.04 for compatibility reasons we could only run Ubuntu 20.04.6 LTS. The reason being you can not currently install Zimbra 8.8.15 Open Source on Ubuntu 24.04 or even 22. You have to go with version 20.04.
Prepare New Server(Ubuntu 20.04.6 LTS)
1. Deploy AWS EC2. We deployed Ubuntu 20.04 Market Space based image with enough memory, CPU and space to accommodate Zimbra installation.
2. Ones EC2 instance was deployed we Run update. apt update and apt upgrade commands.
# apt update -y # apt upgrade -y
3. Configure /etc/hosts file to include your Zimbra mail servers name.
4. Run hostnamectl set-hostname command and make sure same name as in /etc/hosts file is set.
# hostnamectl set-hostname "zimbramailservername"
5. Disable systemd-resolved to make sure there is no conflict on port 53
# systemctl disable systemd-resolved # systemctl mask systemd-resolved
6. Next step would be installing dnsmasq service. This service is perfectly sutable for our purpose. It will provide lighwaight local DNS resolution for our email domain so mail can be routed to local ZIMBRA server.
# apt install dnsmasq -y
7. Edit /etc/dnsmasq.conf file and add following to the end of the file. Replace x.x.x.x with you ec2 instance internal and external IP addresses.
listen-address=127.0.0.1,x.x.x.x,x.x.x.x expand-hosts domain="contoso.com" server=x.x.x.x mx-host=contoso.com,server.contoso.com,0
8. Start dnsmasq service and make sure it is enabled after reboot.
# systemctl start dnsmasq # systemctl enable dnsmasq
9. Test contoso.com domain name resolution with dig to make sure your Zimbra server Public DNS name is displayed. Correct name resolution would point to local Zimbra server name which should resolve to local private IP address.
# dig contoso.com mx
10. Download Zimbra package from Zimbra Ealier Releases. In our case 8.8.15 GA Release (Open Source for Ubuntu 20.04 LTS)
11. Uncompress files after download.
# tar -xvzf zcs-8.8.15_GA_4179.UBUNTU20_64.20211118033954.tgz
12. Run Zimbra install with -s switch to install all necessary packages
#./install -s
13. Ones installation competed you can remove /opt/zimbra local directory directory. In later steps we will replace it with files coming from our existing Zimbra server.
#rm -rf /opt/zimbra
Steps performed on existing Zimbra server
1. Stop Zimbra services on existing server.
# su zimbra # zmcontrol stop
2. Copy /opt/zimbra directory from existing server to our new Ubuntu server.
rsync -e ssh -axvzKHS /opt/zimbra x.x.x.x:/opt/zimbra
x.x.x.x represents your public IP address or internal address if you have local connection of your new Ubuntu ZIMBRA server. Ones this sync process completed you can simply shut down existing server.
On new Ubuntu 20.04.6 Zimbra server
Fix permissions by running following command as root
#/opt/zimbra/libexec/zmfixperms -e -v
As root run installer without -s option
#./install.sh
The installer should detect ZIMBRA installation and prompt you for upgrade.
Start services
#su zimbra #zmcontrol start