Off-site Zimbra OSE Backup with Zextras Backup

In the last article, we talked about how to connect a separate drive to the server so that in the event of a server or drive failure in it, the server backup can be transferred to another server and quickly restore Zimbra OSE to work. This method of protecting a backup, although it is quite effective in terms of reliability and recovery speed, is still not universal and is not able to protect you, for example, from a fire, which, if it occurs, will not spare either the server or the drive with the backup connected to it. Off-site reservation will help eliminate these risks.



image

The latest version of Zextras Suite introduces the function of remote backup in the cloud or geographically remote storage, which is an excellent option for secure data backup, because the backup will remain available no matter what is currently happening with your server. And since such storage will also be a backup path, during disaster recovery it can be connected as a backup path for a new server and start the recovery process by analogy with using a physical device.



As a reminder, Zextras Backup is part of the Zextras Suite and is available to those Zimbra OSE users who have purchased a Zextras Suite Basic license or a Zextras Suite Pro license. Therefore, when you reproduce the steps from the article, we recommend that you make sure that you have a valid Zextras Suite license.



One of the options is to back up data to S3 storage. To connect an S3 bucket as a backup path, you must use the command line. Note that the process for connecting cloud storage for a new server will be slightly different from the process for connecting cloud storage for a server that is already backing up to local storage.



In the event that you have just created a server and have not yet configured backup, to connect an S3 bucket as a backup path, you should use the  zxsuite backup setBackupVolume S3 command  with some of the following parameters:



  • bucket_name - Bucket name
  • access_key - Account name
  • secret - The secret key of the account
  • volume_prefix - The prefix that the server uses in object keys
  • bucket_configuration_id  - ID for already existing data
  • S3region - Amazon AWS Region 
  • url - S3-compatible service url
  • prefix - The prefix to add to blobs
  • use_infrequent_access — ,
  • infrequent_access_threshold
  • use_intelligent_tiering —  S3 Intelligent‑Tiering, .










For example, let's create a bucket with cold data called zextrasbackup in the S3 storage from Mail.ru group and create a user with a secret key to access it. Based on the received data, you can form a command like zxsuite backup setBackupVolume S3 bucket_name zextrasbucket access_key czSFxfj ***** z6TaQgts secret bSvyLBkgxb6HV ******** XSbF2CUHGhJCT5G2reaW url ib.bizmrg.com .



After entering this command, Zextras Suite will also ask you to run the command zxsuite backup doSmartScan start deep true remote_metadata_upload true in order to download all metadata to the backup storage as well. This is optional. Thus, the bucket we created will now be used as the Zimbra OSE backup path.







If the backup is already initialized locally, you need to migrate to the S3 bucket. To do this, just run the  zxsuite backup migrateBackupVolume S3 command  with the parameters of your S3 bucket:



  • bucket_name - Bucket name 
  • access_key - Account name  
  • secret - The secret key of the account
  • volume_prefix - The prefix that the server uses in object keys
  • bucket_configuration_id - ID for pre-existing S3 data
  • region - Amazon AWS region 
  • url - S3-compatible service url
  • prefix - The prefix to add to blobs 
  • use_infrequent_access -  — ,
  • infrequent_access_threshold
  • use_intelligent_tiering —  S3 Intelligent‑Tiering,
  • threads — ()


So, with the help of the team zxsuite the backup migrateBackupVolume the S3 bucket_name zextrasbucket access_key czSFx ********** 6TaQgts secret bSvyLBkgxb6HV ************ CUHGhJCT5G2reaW url No ib.bizmrg.com  threads 4  can be transferred already the created backup to the cloud storage and in the future write all the backed up data to it.



If disaster recovery is required, the S3 storage can be connected to the server using the  zxsuite backup setBackupVolume S3 command . Once the bucket is connected, you can start importing the backup into Zextras Backup to recover any lost data.



If you have a multi-server infrastructure, backing up data to one S3 bucket will create confusion between backups of different mail storages. To prevent this from happening, when configuring backup to S3 storage, you must set a unique volume_prefix parameter   for each mail server. Thanks to this, backup data from different mail servers will not overwrite each other.



Also, you can connect local network storage based on NFS or FUSE as a backup path. To do this, you need to mount the device on the file system. This is done using the command  sudo mount -t nfs 192.168.0.100:/zextras / mnt / zextras, where 192.168.0.100 is the ip-address and the zextras folder is a pre-created folder for storing backups. If the device cannot be mounted, you should install the missing packages using the sudo apt install nfs-common command  .



In the event that off-site backup is configured correctly, a plate will appear in the Zextras Backup section of the Zimbra OSE administrator console with information that the backup is being made to an external data storage.







After that, if you have not yet configured the backup, you need to enter the command  zxsuite backup setBackupVolume Local / mnt / zextra s, and if you have already initiated the creation of a backup, enter the command  zxsuite backup migrateBackupVolume Local / mnt / zextras... In both cases, the only argument required to connect is the mount path of the NAS. 



Immediately after this, the backup copy of Zimbra OSE will begin to be saved to the local network device, and in case of an emergency, it will be possible to connect it to the new Zimbra OSE server for quick data recovery.



It would be a great idea to enable the automatic mount of the NAS when the Zimbra OSE server is turned on. This is done using the / etc / fstab file, where it is necessary to register the parameters for automatically mounting the network storage. In our case, they will look like this:  192.168.0.100:/zextras / mnt / zextras nfs defaults 0 0



If an accident occurs, and with it the need to restore data from a backup, you need to mount the folder with the backup on the server and start restoring the backup.



As a result, the backup is created and stored separately from the server. This increases the likelihood that even if the server is physically destroyed, all the necessary data will survive.



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



All Articles