Kerio MailServer enables regular backups of user folders and configuration files on a corresponding media. For this purposes, any removable or network disk can be used.
Kerio MailServer makes a backup of the entire store data directory and of the users.cfg and mailserver.cfg configuration files.
Backups of user folders include various settings. To configure backups, go to the Backup tab under :
Use this option to back up all user folders together with the current Kerio MailServer configuration. It applies to the whole store data directory and users.cfg and mailserver.cfg files.
If you do not wish to use Kerio MailServer's backup functions, disable the Enable message store and recovery backup option. If you remove all items in the backup schedule and leave the option active, the default backup schedule is downloaded and applied upon a Kerio MailServer's restart.
Warning:
The backup system in Kerio MailServer does not include all configuration files of the server. If it is necessary to move the configuration and user folders to another server or to reinstall Kerio MailServer, manual backup must be performed for the sslcert (includes SSL certificates) and license (includes license files) directory, in addition to standard backup. For detailed information on this issue, see chapter 28.2 Configuration Backup and Transfer.
It is recommended to backup the sslcert and license directories immediately upon Kerio MailServer's installation and registration and also everytime their content changes (e.g. when number of user licenses is increased or when a new trustworthy certificate is imported.
On the Backup tab, backups can be scheduled in details. Two backup types can be scheduled:
Full backup — full backup of all files.
Differential backup — a partial backup, including all changed and new files. These backups are not so bulky. Typically, partial backups complement a full backup. If multiple differential backups in row are scheduled, the newest backup always rewrites the previous one. This means that at most one differential backup can be saved on the backup disk besides the full backup.
Note: If the method of differential backups is used, the most recent full and differential should be used in case that a backup recovery is performed.
The backup schedule is defined by backup tasks. Each task includes settings for time when the particular backup will be performed and selection of a backup type (see above). To add a new backup task to the schedule, click . A backup schedule definition window is opened (see figure 18.5 A backup task) that includes the following setting options:
This is an optional item, it is used for better reference.
The box includes two entries where day and time are selected for the backup. It is recommended to perform backups at night (especially full backups) since backups might overload the mailserver.
Selection of either the full or differential backup type.
The button opens a definition of a new backup task. You can also click the button to edit a corresponding task or to remove a task from the schedule.
Both backup types can be combined by using multiple tasks. Any number of backup tasks can be defined. This depends on the user. Number of backup tasks may depend on:
Size of the data store which influences how long each backup takes and on its size. Both problems might be easily solved by using differential backups.
Importance of data which might be lost. This implies that backups are typically more frequent in companies where email communication and message storing is important. If backups are performed frequently, minimum of data is lost in case of the server's failure.
Click for advanced settings (see figure 18.6 Backup advanced options):
Backups are saved in compressed files (.zip) where the maximal size of 2 GB is allowed. This box enables you to split the backup to several files of smaller size. The maximal file size for splitting is set to 2 GB by default. If a file exceeds the value set in the dialog, the file is not backed up.
Each backup of user folders is very space-demanding and it might be desirable to often remove these backups. It is possible to set rotation where old backups are removed automatically. Just specify number of backups to be kept in the Keep at most ... complete backups. Whenever the number is exceeded, the oldest backup is rewritten by the new one.
Specification of the complete path to the backup directory (according to conventions of the operating system on which Kerio MailServer is installed).
The default backup store is in the directory where Kerio MailServer is installed:
Kerio\MailServer\store\backup
Warning: It is recommended to change the backup directory by setting the path to the corresponding removable disk or another media where the backup will be stored if available.
If Kerio MailServer is running on Windows, the path must be specified as UNC (see figure 18.7 Backup directory specification).
If Kerio MailServer is running on Linux or Mac OS, the following options are allowed:
Connect the backup server as a directory and specify the path to this directory in the Backup Directory entry. Here is an example of a result:
/mnt/server-backup
Save the backup in a local directory and then, send it to the server (e.g. by using the rsync synchronization utility). Here is an example of a result:
/backup/kms/backup
Each archive consists of backup type and date when it was created:
Full backup — F20060118T220007Z.zip
F — full backup
2006 — year
01 — month
18 — day
T220007Z — GMT timestamp (22:00:07);it always starts with T and ends with Z.
Differencial backup — I20060106T220006Z.zip
I — differential backup
2006 — year
01 — month
06 — day
T220006Z — GMT timestamp (22:00:06);it always starts with T and ends with Z.
Backup copy (manual back up startup) — C20060117T084217Z.zip
2006 — year
01 — month
17 — day
T084217Z — GMT timestamp (08:42:17);it always starts with T and ends with Z.
In addition to saving backups to removable media it is also possible to store save backups to a network disk. If access to the disk is secured, authentication by username and password must be enabled (a user with access rights to the network location must be used).
Username and password for authentication to the network disk can be used only if Kerio MailServer is installed on MS Windows.
Specify an email address where notifications about the backup status will be sent by Kerio MailServer.
In addition to backups set in the schedule, it is also possible to make so called backup copies. The copy is a kind of full backup. The copy can be enabled by the button. The current status of the backup process appears next to the button. In case of a backup recovery, the copy is considered as a standard full backup and it is used for the recovery if it is the most recent copy performed.
A special application called Kerio MailServer Recover is used for recovering of the backup data. This application performs decompression of the particular backup and saves it in the store directory.
To launch Kerio MailServer Recover, run the kmsrecover command from the directory where Kerio MailServer is installed.
Usage:
kmsrecover <directory_name>|<file_name>
Warning: On Mac OS X and Linux it is necessary to enter a command on the following format, unless having already been introduced in the file of the path system variable:
./kmsrecover <directory_name>|<file_name>
This means that it is necessary to add the ./ string before the utility name that will inform the system that the command to be used is in the current directory.
You can also see these details and examples to individual attributes, by running the kmsrecover command.
Warning:
It is necessary to stop the Kerio MailServer Engine prior to the recovery.
Applying a full or copy backup will overwrite the existing store. Applying any backup will overwrite the existing configuration.
Backup recovery will be better understood through this simple example:
The recovery is performed on a host using MS Windows. The directory with configuration data is stored at the default location (as set as default during the installation), the store directory is located on a separate disk (RAID or a faster disk) of the same computer where the configuration directory, and the backup directory is located on an exchangeable disk. For backup recovery, use full backup.
Conditions:
The configuration data is stored under
C:\Program Files\Kerio\MailServer
The store directory is located in
D:\store
For security purposes, the backup directory is stored on the removable disk
E:\backup
Solution:
The command must be run from the directory where Kerio MailServer is installed. In this case, the directory is
C:\Program Files\Kerio\MailServer
At this point, two command formats can be used:
We want to recover the last complete backup (the most recent full and differential backups or the most recent backup copy). The command will be as follows:
kmsrecover E:\backup
To recover a particular backup (except the last one), use the following format:
kmsrecover E:\backup\F20051009T220008Z.zip
The kmsrecover detects the path to the store (D:\store) automatically in the Kerio MailServer's configuration file and uses it.
Warning: If the parameter contains a space in a directory name, it must be closed in quotes. For example:
kmsrecover "E:\backup 2"
The recovery is performed on a host using Mac OS X. The directory with configuration data is stored at the default location (as set as default during the installation), the store directory is located on a separate disk of the same computer where the configuration directory, and the backup directory is located on an exchangeable disk. For backup recovery, use the most recent full backup.
Conditions:
The configuration data is stored under
/usr/local/kerio/mailserver
The store directory is located in
/store
For security purposes, the backup directory is stored on the removable disk
/Volume/backup
Solution:
The command must be run from the directory where Kerio MailServer is installed. Therefore, it is necessary to go to the directory:
/usr/local/kerio/mailserver
We want to recover the last complete backup (the most recent full and differential backups or the most recent backup copy). Now, the command pattern depends on the fact whether the path to the Kerio MailServer directory is included in the path variable or not. If the path is not set there, the command will be as follows:
./kmsrecover /Volume/backup
Otherwise, it will be like this:
kmsrecover /Volume/backup
The kmsrecover detects the path to the store (/store) automatically in the Kerio MailServer's configuration file and uses it.
For cases when a problem regarding backups occurs and needs to be solved, Kerio MailServer allows logging of backups:
In the Kerio Administration Console, go to the Logs section and select the Debug log.
Right-click on the log pane to open a context menu, and select Messages.
In the Logging messages dialog box, select Store Backup.
Confirm changes by OK.
Once your problems are solved, it is recommended to disable the logging.