What is the External Backup?

This functionality allows to define an external volume on which to store the backups, with the purpose to dramatically reduce the amount of local storage that is needed by the backup and tackle some possible issue that may arise over time, like a hardware failure that leads to data corruption of both the working copy and the backup or scalability issues i.e., the growth in size of the Mailbox might require more space than possibly available on the server.

Since it relies on an external volume, the External Backup is also called Backup on external volume.

The introduction of this feature does not impact the other functionalities of the Backup and can possibly remain disabled; it is also not intended as a replacement for High Availability or Replication services.

Goals and benefits of the External Backup include:

  • The space needed by the backup on the local storage decreases up to 90%

  • Support for remote mount points, which must be configured in /etc/fstab and S3 object storage.

  • Efficient Real Time Scan

  • Backups are accessible to disaster recovery sites

This functionality partially impacts the existing CLI interface: a few new configuration parameters are introduced and some commands are slightly modified or are extended to support external volumes.

How it works

Before enabling this feature, it is necessary to configure the new volumes that will store the External backup, because no existent volume can be reused. Depending on what approach you choose, the steps to carry out are different.

  • When local Local shares are used, define a mount point in /etc/fstab with the necessary information to access the volume. In case of a multiserver installation, each server must access a different volume. Note that a volume does not coincide with a partition. For example, when using NFS shares, it is possible to expose different shares that are all stored within a same partition. Consider the following scenario as an example: NAS is located on and has a partition mounted on /mount/externalBackup and exposed via NFS in which we want to store our multiserver installation’s backups. To do so, we first create under /mount/externalBackup one directory for each server: mkdir Server1 Server2 Server3, then we mount the three directories separately via NFS on the server, by adding on Zextras installation three entries similar to the following one in /etc/fstab: /mnt/Server1 nfs rw,hard,intr  0 0 /mnt/Server2 nfs rw,hard,intr  0 0 /mnt/Server3 nfs rw,hard,intr  0 0
  • When using buckets, a new S3 bucket must be created for the purpose and will have its own credentials. You can choose to define in this S3 bucket one or more Zextras Buckets, depending on your requirements (e.g., geographic location, throttling, de-centralisation of backups, and so on). Each Zextras Bucket is identified by a prefix, hence you can use the combination of S3 bucket credentials and Zextras bucket prefix to uniquely identify and store multiple Zextras Buckets within a single S3 Bucket.

Once the volume is configured in zextras, it is possible to use it for the backup: the admin can migrate the backup from the current, local storage to the new external volume.

The external volume will then be used as a storage for the $BACKUP_PATH/items only, while the metadata (which are in $BACKUP_PATH/accounts will still use the local volume like a working directory to store the changed metadata. The SmartScan will then upload to the External Volume one tar.gz archive for each account.

Finally, there is a set of dedicated commands to download the metadata from the External Volume and rebuild the structure and the content of the account in case of disaster recovery.

Folder Permissions

The destination folder must be readable and writable by the zimbra user.

To create a valid export directory, run the following commands:

mkdir /opt/zimbra/backup/yourdestfolder

chown -R zimbra:zimbra /opt/zimbra/backup/yourdestfolder

Preparing the Migration

To minimize the risk of errors, please perform the following maintenance procedures before migrating:

  • Double check Zimbra permissions with the following command (must be ran as root): /opt/zimbra/libexec/zmfixperms --verbose --extended

  • Reindex all mailboxes.

  • Check the BLOB consistency with the zxsuite hsm doCheckBlobs utility.

Running an External Backup

Via the Administration Zimlet

To start an External Backup via the Administration Zimlet:

  • Click the Zextras Backup tab.

  • Click the Export Backup button under Import/Export to open the Export Backup wizard.

  • Enter the Destination Path in the textbox, and press Next. The software will check if the destination folder is empty and whether the 'zimbra' user has R/W permissions.

  • Select the domains you want to export, and press Next.

  • Verify all your choices in the Operation Summary window. You can also add additional email addresses to be notified when the restore operation is finished. Please notice that the Admin account and the user who started the restore procedure are notified by default.

Via the CLI

To start an External Backup via the CLI, use doExport command:

zxsuite backup doExport destination_path [param VALUE[,VALUE]]

Scheduling Script

The Zextras CLI can be used to schedule External Backup operations. This is handy when you need to keep a daily/weekly/monthly backup for corporate or legal reasons.