Backup and Disaster Recovery with Zextras Backup

One of the main tasks that a system administrator faces when implementing any information system is to ensure the safety of the data stored in it. The most optimal way to achieve this goal is redundancy, which allows you to always have the tools to restore the system’s operability at minimal cost, even in the event of a sufficiently large-scale failure.

The most advanced backup tool for Zimbra OSE today is Zextras Backup, which is part of Zextras Suite Pro and Zextras Suite Basic. It implements transactional backup, which tracks every change that occurs in Zimbra OSE in real time and backs up all transactions. Thanks to this, in addition to the data itself, the history of their changes is saved in the backup copy, and when restoring information from the backup, you can recreate any mailbox, any domain or even a mail server as it was at a certain point in time.

image

Initial data

This article demonstrates how Zextras Backup works on the example of Zextras Zimbra 9 OSE in single server mode. Features shown only work with a valid Zextras Suite Pro or Zextras Suite Basic license. To purchase it, you can contact the official Zextras representative in Russia Ekaterina Triandafilidi by e-mail katerina@zextras.com.

Initializing a reservation

After installing the latest version of Zextras Suite, a new section called Zextras will appear in the Zimbra OSE admin console, where the modules provided by Zextras Suite will be located. Among them:

  • Kernel – This is where information about the operation of Zextras Suite modules, updates, notifications and so on is collected. In addition, it is in this section that the Zextras Team, Zextras Docs and Zextras Drive modules are installed.
  • Admin – Here you can manage the list of delegated administrators, as well as domain quotas
  • Backup – The backup settings are collected here
  • Mobile – Here you can find the settings for synchronization with mobile devices using the Exchange ActiveSync protocol and a list of mobile devices that connect to the server.
  • ZxPowerstore – The settings for the hierarchical data storage structure are collected here. In particular, you can attach secondary and index volumes to the server and configure the storage policy
  • Alerts – A list of all alerts from Zextras Suite is displayed here. They include notifications about the start and end of operations, errors that occur, and license expiration.

We are interested in the Backup section. First of all, we need to initialize the reservation. By default, the backup files will be stored in / opt / zimbra / backup / zextras /.

If desired, the path to the backup can be changed to any other. To do this, in the Backup section, enter a new path to the folder with the backup and click on the “Save” button in the upper right corner. After changing the backup storage path, you must reinitialize the backup.

Please note that the initialization of the backup will be successful only if the zimbra user has read and write permissions to the specified folder. Immediately after the initialization of the backup, a real-time scanner starts working, which automatically backs up every transaction that occurs on the Zimbra OSE server.

You can find out that the reservation was completed successfully in the “Alerts” section. In the event that an error occurs during the reservation, the text of the notification will tell you what exactly happened. The most common mistake is the lack of write access to the folder where the backup is saved.

We are currently using a single-server Zimbra OSE installation and backing up all data to the same media as the Zimbra server itself. This is not a very correct decision from the point of view of data security, since in the event that the medium is physically damaged, the data is encrypted or a failure occurs in the file system, not only the Zimbra OSE server itself, but also its backup copy will be under attack. To avoid this, you should use a separate backup storage device.

Connecting a separate backup storage device

The easiest way to do this is to connect an additional device to the server and mount it in the folder where the backups are saved. In order to find out how the connected device is identified, use the command sudo fdisk -l

In our case, in addition to the main sda device, as well as many loop devices, the / dev / sdb1 device appeared. We draw your attention to the fact that before mounting it, you must stop the backup, if it is carried out on your server.

There are two ways to mount the device. The first is using the mount command on the command line as user zimbra. In our case, this command will look like this:

sudo mount /dev/sdb1 /opt/zimbra/backup/zextras/ 
sudo chmod -R -v 777 /opt/zimbra/backup/zextras/* 

Then, in order not to manually mount the device each time, you can register the parameters for automatic disk mounting in the / etc / fstab file.

You can also use the “Disks” application to mount the device, which is included in the default Ubuntu 18.04 distribution. In it, you need to select the device intended for backup, go to its settings and specify the mount point. In our case, this is / opt / zimbra / backup / zextras /. And if you check the “Connect at system startup” checkbox, the device will automatically connect even if the system is rebooted.

As a result, the backup copy of the data on the Zimbra OSE server will remain intact even if the device on which the operating system files are stored fails for the indicated reasons.

In this example, a physical device is connected to the server; however, network storages can be connected using the same principle. It is only important that the data write speed is good enough.

Simulated accident

In order to test the backup operation, let’s recreate the crash on the server. To do this, first on the source server, a control user named Backup.

Let’s enter with his identification data into the web client and:

  • We will send a letter on his behalf
  • We will send him a letter
  • Let’s save one of the letters in draft
  • Let’s create a new task
  • Let’s create a new meeting
  • Let’s create a new contact

Thus, our control account will have several components for backup at once and it will be possible to check what will be restored from this during backup.

The next step is to simulate data loss. In fact, we will simply format the partition with Ubuntu 18.10 on which Zimbra OSE 9 is installed. Thus, not only the operating system data will be lost, but also the original data of the mail server.

Data recovery

In order to start data recovery, you need to reinstall Ubuntu 18.04 and deploy Zimbra OSE 9 on it with the same domain as before. This process is described in great detail in our previous article. It is also necessary to install Zextras Suite and use the previously reserved license file.

After the mail server is working again, all that remains is to restore the data from the backup. Since all data was saved on a separate device, you can connect it to the new server and recover from the backup stored on it.

To do this, you need to create a folder where the disk with the backup of the old server will be mounted and connect the device.

sudo su - zimbra
mkdir /opt/zimbra/backup_old 
sudo mount /dev/sdb1 /opt/zimbra/backup_old/

After that, you need to go to the administration console on the new server and in the Backup section click on the “Import backup” button at the bottom of the screen.

In the backup import wizard that opens, you need to:

  • Specify the path to the backup from the old server (in our case, this is / opt / zimbra / backup_old)
  • Specify domains to be restored
  • Specify the accounts to be restored

The wizard also allows you to opt out of restoring system accounts such as galsync, deleted accounts, aliases, distribution lists, and service classes. In the event that we are talking about a real accident and the count is in minutes, refusing to restore these elements can be very helpful.

After all the necessary parameters are specified, you can configure the addresses for sending notifications about the completion of the procedure for importing data from the backup.

Checking the result

To check the result, let’s try to log in under the name of the previously created Backup user. Since the login was successful, it means that the credentials of the account were successfully restored.

Now let’s make sure that all previously created elements are saved in his account: incoming and outgoing letters, drafts, created events and tasks.

As you can see in the screenshots, all elements are safe and sound. Thus, Zimbra OSE 9 Server Disaster Recovery with Zextras Backup was successful.

For all questions related to Zextras Suite, you can contact the Representative of the Zextras company Ekaterina Triandafilidi by e-mail katerina@zextras.com

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *