Advanced Backup Methods

Advanced Backup Methods

This section introduces a number of possibilities to recover a single lost item and other advanced backup management options before moving on to a disaster recovery scenario and the solutions to it.

Emergency Recovery

One or more of the following events must take place for a situation to be labelled as a disaster:

  • One or more critical discs or filesystems (such as / or /opt/zextras/) experiencing hardware failure
  • Due to internal or external circumstances (such as a thoughtless rm * an incursion from the outside, an incorrect file being replaced, or other), the content of a crucial disc became inaccessible.
  • issues with the hosting environment for Carbonio, such as faulty hardware or a failed hypervisor that affects snapshots.
  • a serious flaw in a piece of third-party software or an OS update or upgrade, like a corrupt kernel.

In a catastrophe situation, you would experience a data loss and would either need to replace a hardware part or make repairs to the virtualization infrastructure, as well as repair or reinstall the system.

Reduce the Chances

Because one of the failures stated in the preceding section is unpredictable and might occur at any time, preventing a disaster scenario may not be a simple undertaking.

However, there are a number of solid practises we may recommend to reduce the likelihood of a tragedy, including the following:

  • Always retain important filesystems on separate discs, such as your Carbonio backup path or / /opt/zextras/.
  • For your server, use a monitoring and alerting solution to spot issues as soon as they arise.
  • Plan your upgrades and migrations thoroughly.
  • To duplicate the services offered by Carbonio, think about using redundancy.
  • Keep numerous backup copies on hand: Please see section Making Additional and Offsite Backups of Carbonio Backup’s Volume for additional details.
The Rehabilitation Process

If, despite your best efforts, a disaster still occurs, you can follow these procedures to restore the system:

  • Installing the operating system is the first step in setting up the foundational system.
  • Section Installation is dedicated to the installation and bootstrapping of Carbonio.
  • Recovering data entails re-importing the most recent data onto the Carbonio server, which may include user and domain configurations, COS data, and mailbox contents.
  • Recovery of Configurations and Settings

The third point can benefit from Carbonio Backup’s Import Backup option, which offers a quick and secure means of recovering from a catastrophic situation.

Yes, you may import data using the previous server’s backup path. allows you to roll back a Carbonio installation to its most recent working state on your previous server.

To recover Carbonio to a certain condition recorded in a backup, there are two equal methods:

  1. A generic one that may be utilised
  2. A VM-based that use the snapshot function of the hypervisor
Data restoration

These steps must be followed in order to complete the recovery process. It is difficult to estimate in advance how long it will take to properly finish the recovery given the amount and kind of objects involved.

  • Install Carbonio on a fresh server, then set the global and server settings.
  • Mount the old server’s backup folder on the new one. Use the most recent version of either of the two external backups if this is not an option.
  • Use the following CLI command to launch an External Restore on the new server:
  • zextras$ carbonio backup doExternalRestore /path/to/the/old/store

The system will be available for your users as soon as the External Restore procedure is finished (see your Carbonio Notifications), since it will immediately generate the domains, accounts, and mailing lists. Emails and other mailbox contents will thereafter be recovered.

Configurations and Setting

Although server and global settings are backed up, they are not immediately restored. With the exception of the minimal Carbonio version necessary, you may restore your data to a server with a different OS, Carbonio Release, networking configuration, and storage arrangement thanks to the high-level connection between Carbonio Backup and Carbonio.

Carbonio Backup has a very useful CLI command that can be used to make an exact duplicate of the previous server or to simply modify its settings to a new environment.

Basic Usage Examples
zextras$ carbonio backup getserverconfig standard date last

Display the latest backup data for Server and Global configuration.

zextras$ carbonio backup getserverconfig standard file /path/to/backup/file

Display the contents of a backup file instead of the current server backup.

zextras$ carbonio backup getServerConfig standard backup_path /your/backup/path/ date last query / | less

Display the latest backed up configurations, using a pipe to show one page of output at a time.

Advanced Usage

Change the query argument to display specific settings

zextras$ carbonio backup getServerConfig standard date last backup_path /opt/zextras/backup/mail.example/ query serverConfig/zimbraMailMode/

config date_______________________________________________________________________________________________28/12/2022 15:14:29 CET

Use the verbose true parameter to show more details; for example, that the /opt/zextras/conf/ and /opt/zextras/postfix/conf/ directories are backed up as well.

zextras$ carbonio backup getServerConfig customizations date last verbose true
ATTENTION: These files contain the directories /opt/zextras//conf/ and /opt/zextras/postfix/conf/ compressed into a single archive.
Restore can only be performed manually. Do it only if you know what you're doing.

   filename                                                    customizations_28_12_22#04_01_14.tar.gz
   path                                                        /opt/zextras/backup/ng/server/
   modify date                                                 28/12/2022:01:14 CET
Repair from snapshots and virtual machines

These days, hypervisors’ customizable snapshot capabilities and snapshot-based VM backup solutions are among their most valuable features. Using Carbonio Backup’s External Restore function and the server’s backup path as the import path, it is always feasible to roll back to the most recent snapshot in the event of a disaster and recover the lost data.

You can preserve a frozen duplicate of a virtual machine in a usable condition and roll back to it whenever you want with snapshot-based backup methods. It is preferable to make snapshot copies of powered-off VMs to maintain complete data consistency, although this is not required.


When using these kinds of systems, it is vital to make sure that the Backup Path is either not part of the snapshot (you can ensure this for example by setting the vdisk to Independent Persistent in VMWare ESX/i) or altered in any way when rolling back, in order for the missing data to be available for import.

Using Carbonio Backup, you may execute a disaster recovery from a prior VM state if you do the following:

  • Make sure that no users can access it and that neither incoming nor outgoing emails are sent before you restore the last reliable backup onto a different (clone) VM in a separate network.
  • Wait for Carbonio to start before switching to the clone.
  • Disable the RealTime Scanner in Carbonio Backup.
  • Connect and mount (on a separate path) the virtual disc holding the unaltered backup path to the clone.
  • Launch an external restore while utilising the import path for the backup.

This process analyses every item in the Backup Path and imports the ones that are missing, hastening catastrophe recovery. Furthermore, as long as user access and mail traffic are restricted, these processes can be done as often as necessary.

Verify that everything is operational when the restoration is finished, then restart user access and mail traffic.


At the end of the operation, you can check that the configuration of the new mailbox is the same by running the command carbonio config dump.

The Aftermath:

 Initialise a new Backup Path and save the old one in case you need to restore any stuff from before the tragedy.