Recently I was tasked with the migration of domains, user accounts and all mailboxes from Zimbra 8.6 running on Ubuntu 14 to Zimbra 8.8 running on CentOS 7. There were two potential ways of doing this:
- 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.
- Use Zextras Suite to migrate data between the servers. It supports migration from a single server to multi-server setups.
- 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://www.zextras.com/download/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:
# firewall-cmd --permanent 8735/tcp # firewall-cmd --permanent --add-port 8735/tcp # firewall-cmd --reload success
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-<version>
For me, I’ll do:
# cd zextras_suite-2.6.4
Start the installation by running ./install.sh bash script with all option.
# ./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:
Press <Enter> to continue.
Download of ZAL library should start and you’ll be asked to confirm installation, press Y to continue.
Confirm the stop of Zimbra Web Application when prompted:
Do you wish to stop the Zimbra Web Application (mailboxd)? [Y] Y
Confirm everything on the next prompts.
Clear Server cache:
# 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.
# parted /dev/xvdc mklabel gpt # parted /dev/xvdc mkpart primary 0% 100% # 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.
# mount /dev/xvdc1 /mnt # df -hT | grep /mnt /dev/xvdc1 xfs 200G 33M 200G 1% /mnt # mkdir /mnt/zextras # chown -R zimbra:zimbra /mnt/zextras
Step 3: Install and configure NFS server
# yum -y install nfs-utils # vim /etc/idmapd.conf Domain = domain.com
# id zimbra uid=996(zimbra) gid=993(zimbra) groups=993(zimbra),5(tty)
# 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
# systemctl start rpcbind nfs-server # systemctl enable rpcbind nfs-server
Step 5: Open nfs ports on the firewall
# firewall-cmd --add-service=nfs --permanent # firewall-cmd --reload # exportfs -rvv
Step 6: Mount NFS path on all mailbox servers ( source and destination)
Everything should be ready, proceed to configure nfs client.
# yum -y install nfs-utils # systemctl start rpcbind && 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:
# mkdir -p /mnt/zextras # chown -R zimbra:zimbra /mnt/zextras # mount -a # df -hT | grep /mnt/ze 192.168.1.10:/mnt/zextras nfs4 200G 33M 200G 1% /mnt/zextras
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:
# 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:
# 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