Recently I was tasked with the migration of domains, user accounts and all mailboxes from Zimbra 8.6 running on Ubuntu 16.04 to Zimbra 8.x running on CentOS 7. There were two potential ways of doing this:

  1. Install Zimbra 8.8 on CentOS 7 and write bash scripts to facilitate migration of domains, user accounts, distribution lists, contacts, calendars, notes, forwarding rules, and all other user preferences. This will be a hell of a task and the process will be slow and prone to errors.
  2. Use Zextras Suite to migrate data between the servers. It supports migration from a single server to multi-server setups.

System Requirements:

  • Ready Zimbra setup, this can be a single server installation or a multi-cluster setup. For a multi-server installation of Zimbra, check our previous guide –> https://computingforgeeks.com/zimbra-multi-server-installation-on-centos-7/
  • Downloaded Zextras Suite which is to be installed on all servers running mailboxd daemon. Remember to install them one by one. Especially if you’ve LDAP server running on a mailbox server.
  • ZeXtras Suite uses ports 8735 and 8736 for store-to-store communication, make sure your servers can reach each other on this port and that the same port is closed to outside traffic. You may need to disable SELinux or put it in permissive mode.

Note that zeXtras Suite must be installed on ALL the store servers (the ones with the mailboxd service running).

Install Zextras Suite on Zimbra CentOS 7

Download latest release of Zextras Suite:

wget http://download.zextras.com/zextras_suite-latest.tgz

This package has the following components:

  • ZeXtras Suite Core, abbreviated as ZeXtras Core or Core, which is a jar package extending Zimbra
  • ZeXtras Suite Administrative Zimlet abbreviated as ZeXtras Suite Zimlet or just Zimlet, an administrative zimlet which accesses and manages the Core.
  • ZAL – An Open Source abstraction layer for Zimbra.
    The installation script follows the aforementioned structure allowing you three installation targets: core, zimlet and all. The latter is equivalent to installing core and immediately afterward zimlet.

Open 8735 and 8736 TCP ports on the firewall:

sudo firewall-cmd --permanent --add-port 8735/tcp 
sudo firewall-cmd --permanent --add-port 8736/tcp 
sudo firewall-cmd --reload

Unpack Zextras Suite package

Now unpack the package so that you can start the installation.

tar xvf zextras_suite-latest.tgz

Change to Zextras Suite directory:

cd zextras_suite

Start the installation by running ./install.sh bash script with all option.

sudo ./install.sh all

For help, run:

# ./install.sh -h

./install.sh -h | ./install.sh [ -u ] [ -d ] all|zimlet|core

-h This very message
-d Activates debug mode for the install script
-u Uninstall the target

The targets available for (un)installation are:
core -- Core
zimlet -- Zimlet
all -- Core followed by Zimlet

* In order to use both
* core and zimlet need to be installed.

You should get output like this:

-------------------------

Checking for existing installations ...

FOUND Zimbra 8.8.11 FOSS


Checking whether you are installing the latest version ...

Current release: 3.0.1
Latest  release: 2.4.13

For more information check the Changelog at
http://wiki.zextras.com/wiki/Changelog

This installer is up to date: version 3.0.1

-------------------------
Checking whether the Core is already installed ...
Checking whether the ZAL is already installed ...
Checking whether the ZeXtras Suite Zimlet is already installed ...
Checking whether the ZeXtras Migration Tool Zimlet is already installed ...
-------------------------

-------------------------
No preexistent Core installation found.
No preexistent ZeXtras Migration Tool Zimlet installation found.
No preexistent ZeXtras Suite Zimlet installation found.
-------------------------

----------------------------------------------------------------------
PLEASE READ THIS AGREEMENT CAREFULLY BEFORE USING THE SOFTWARE.
ZeXtras WILL ONLY LICENSE THIS SOFTWARE TO YOU IF YOU FIRST
ACCEPT THE TERMS OF THIS AGREEMENT. BY DOWNLOADING OR INSTALLING
THE SOFTWARE, OR USING THE PRODUCT, YOU ARE CONSENTING TO BE BOUND BY
THIS AGREEMENT. IF YOU DO NOT AGREE TO ALL OF THE TERMS OF THIS
AGREEMENT, THEN DO NOT DOWNLOAD, INSTALL OR USE THE PRODUCT.

License Terms for this ZeXtras Suite Software:
https://www.zextras.com/eula/
----------------------------------------------------------------------


Do you agree with the terms of the software license agreement? [N] Y


----------------------------------------------------------------------
In order to be operational, ZeXtras Suite requires the "ZAL" library
to be installed.
ZAL is released under the GNU General Public License version 2.

Due to license restraints, the ZAL library can't be distributed with
ZeXtras Suite , and therefore must be downloaded from the ZAL website.
----------------------------------------------------------------------


Do you wish for ZeXtras Suite to automatically download, install and upgrade the ZAL Library? [Y/N] [] Y


Checking for the most up-to-date version of the ZAL library...


===========================

Beginning Core installation procedure ...



****************************  Note  ****************************

In addition to the ZeXtras Suite Zimlet a command line tool
is also available, "zxsuite" .
Run it as the zimbra user in order to see the available options.

****************************************************************

Press ENTER to continue ...

Press <Enter> to continue.

Download of ZAL library should start and you’ll be asked to confirm installation, press to continue.

************************  WARNING:  ************************

ZeXtras Suite needs to bind on TCP ports 8735 and 8736 in order
to operate, for inter-instance communication.
The ZeXtras Chat module needs to bind on TCP ports 5222 and/or 
5223 in order for any XMPP feature to be functional.
Please verify no other service listens on these ports and that 
ports 8735 and 8736 are properly filtered from public access 
by your firewall.

************************************************************

Downloading the ZAL library. It might take a few minutes ...
** GET http://openzal.org/2.8/zal-2.8-8.8.11.jar ==> 301 Moved Permanently
** GET http://openzal.org/2.8/zal-2.8.0-8.8.11.jar ==> 200 OK (1s)
Download succeeded and validated for ZAL branch 2.8 variant 8.8.11


ZeXtras Suite Core will now be installed. Proceed? [Y] Y
The Zimbra Web Application must be restarted 
in order to perform the installation.

Confirm the stop of Zimbra Web Application when prompted:

Do you wish to stop the Zimbra Web Application (mailboxd)? [Y] Y
Stopping mailboxd...done.
zimbra-chat package detected
ZeXtras Suite Chat is a superset of zimbra-chat with its own database and can't be run together

Uninstall zimbra-chat? [Y] Y
done
ZeXtras Core installation successfully completed.

* Be warned that ZeXtras Suite needs for the
* related zimlet to be installed in order to operate.

Starting The Zimbra Web Application (mailboxd) ....
mailboxd is running.

Waiting 60s for Zimbra to initialize ...

===========================

===========================

Beginning ZeXtras Suite Zimlet installation procedure ...


The ZeXtras Suite Zimlet will now be installed. Proceed? [Y] Y

Checking whether the Core is already installed ...

ZeXtras Suite Core detected.




****************************  Note  ****************************

WARNING: Zimbra 8.x users might experience slowness and AJAX errors
when accessing the Zimbra Administration Console because of the
Zimbra DOS Filter. In this case, raising the number of Maximum Requests
per Second is suggested (see http://wiki.zextras.com/DosFilter
for further informations)

****************************************************************

Press ENTER to continue ...

Deploying zimlet ...

[] INFO: Deploying Zimlet com_zextras_zextras in LDAP.
[] INFO: Installing Zimlet com_zextras_zextras on this host.
[] INFO: Upgrading Zimlet com_zextras_zextras to 3.0.1
[] INFO: Enabling Zimlet com_zextras_zextras

The ZeXtras Suite Zimlet has been successfully installed.

===========================

After installing/uninstalling ZeXtras Suite Zimlet,
it's highly suggested to clear both your browser's and server's cache.

Clear Server cache:

sudo su - zimbra -c 'zmprov fc -a zimlet'

Initialize Zextras Backup

Now that the installation is done, let’s initialize Zextras Backup. To work properly, ZeXtras Backup needs a dedicated directory on a filesystem to save all its configurations and all the backup data. The default path for this directory is /opt/zimbra/backup/zextras/

The initialization process automatically creates the folder structure and the configuration files needed. You need to perform initialization process:

  • Immediately after installing ZeXtras Suite
  • Every time the “Backup Destination Path” is changed in the ZxBackup tab of the ZeXtras Administration Zimlet.

Configure ZxBackup on NFS (Optional)

If you’re interested in configuring NFS for your ZxBackup, follow below steps. Skip this part if you want to use default Backup Path of /opt/zimbra/backup/zextras/

Step 1: Add disk for ZeXtras Backup backup data and create a filesystem on it.

sudo parted /dev/xvdc mklabel gpt
sudo parted /dev/xvdc mkpart primary 0% 100%
sudo mkfs.xfs /dev/xvdc1

Step 2: Mount the filesystem

I’ll mount /dev/xvdc1 to /mnt directory and create a separate directory for ZeXtras backups.

sudo mount /dev/xvdc1 /mnt
sudo mkdir /mnt/zextras
sudo chown -R zimbra:zimbra /mnt/zextras

Step 3: Install and configure NFS server

sudo yum -y install nfs-utils

Get UID/GID of Zimbra user

# id zimbra
uid=996(zimbra) gid=993(zimbra) groups=993(zimbra),5(tty)

Configure exports file

$ sudo vim /etc/exports
/mnt/zextras 192.168.1.0/24(rw,anonuid=996,anongid=993,no_root_squash)

Replace 192.168.1.0/24 with subnet you need the NFS service to be accessible from.

Step 4: Start and enable NFS service

sudo systemctl start rpcbind nfs-server 
sudo systemctl enable rpcbind nfs-server

Step 5: Open nfs ports on the firewall

sudo firewall-cmd --add-service=nfs --permanent
sudo firewall-cmd --reload
sudo exportfs -rvv

Step 6: Mount NFS path on all mailbox servers ( source and destination)

Everything should be ready, proceed to configure nfs client.

sudo yum -y install nfs-utils
sudo systemctl start rpcbind && sudo systemctl enable rpcbind

Configure fstab for persistent mounting:

192.168.1.10:/mnt/zextras /mnt/zextras nfs defaults 0 0

Create /mnt/zextras dir and change ownership to zimbra user and group:

sudo mkdir -p /mnt/zextras
sudo chown -R zimbra:zimbra /mnt/zextras
sudo mount -a
sudo df -hT | grep /mnt/ze

Initialization Guide

To Initialize the ZeXtras Backup Module just run a SmartScan following these steps:

  • Access your Zimbra Admin interface.
  • In the Left Pane of the Administration Console select ZeXtras to show up the ZeXtras Panel.
  • Click the Backup tab (requires either the ZeXtras Suite Trial or a valid License).
  • Under “Basic Backup Configuration” click “Initialize NOW”

Remember to change path from /opt/zimbra/backup/zextras/ to /mnt/zextras if you configured NFS part.

View initialization progress using the command:

sudo su - zimbra -c "zxsuite backup monitor"

Once the SmartScan is completed, ZxBackup will be fully initialized and working!. The operation is pushed into the queue, you will be notified as soon as the operation is completed. In order to monitor the progress of this operation, run the following command in a shell as the zimbra user:

sudo su - zimbra
$ zxsuite backup monitor 29b58b66-4a41-4816-b5c8-6a4e035cf50f

ZeXtras Suite Uninstallation

The removal procedure is mostly similar to the installation one. Placing the -u switch before the target is all is needed. The script will verify the presence of any ZeXtras Suite components and prompt for their removal.

./install.sh -u all

This will uninstall both the ZeXtras Core and the ZeXtras Administration Zimlet

To uninstall ZeXtras Core only, run:

./install.sh -u core

Remove ZeXtras Administration Zimlet by running:

./install.sh -u zimlet

Post-Install and Post-Uninstall

After either installing or uninstalling ZeXtras Suite, it’s highly recommended that you clear both your browser’s and server’s cache. To clear Server’s Zimlet cache, run the following command as zimbra user:

$ zmprov fc zimlet

For further reading, have a look at ZxBackup Admin Guide