Start a conversation

Recovering Data in Kerio Connect

Overview

 

To recover the backup data, use a special tool, Kerio Connect Recover which is a built-in feature of Kerio connect. The tool extracts the backed-up data and saves the data in their original locations.

 


 

Step-By-Step Guide

 

  1.  Stop Kerio Connect.
  2.  Open the command-line interface and navigate to the Kerio Connect installation directory. The defaults are:
    • Windows: C:\Program Files\Kerio\MailServer
    • macOS: /usr/local/kerio/mailserver
    • Linux: /opt/kerio/mailserver
  3.  Run the following command from the directory:
    kmsrecover [advanced options] <directory_name>|<file_name> 
    • For Mac OS X and Linux, if the path to the Kerio Connect installation directory is included in the path variable, use:
      ./kmsrecover [advanced options] <directory_name>|<file_name>

 

Where the advanced options are those that are listed in the below table.

Parameters:

  • Directory -  A directory containing the store backup(s). The latest backup in this directory will be applied. If you want to recover the message store from backup files created by Kerio MailServer 6.0.x, enter a particular directory with backup files. (e.g., /mnt/d/backup/20041024T020000Z).
    For a backup created by Kerio MailServer 6.1.x or Kerio Connect, enter the main backup directory (e.g., /mnt/d/backup).

 

  • Filename - A single backup file to be used. The backup files have names like C20041027T100000Z.zip. For multiple-volume backups, specify just the first archive file. The sequential files of multiple-volume backups look like C20041027T100000Z.1.zip.

WARNING: Applying the backup will overwrite the existing configuration and modify the message store.
Make sure that Kerio Connect is NOT running while you run the kmsrecover tool.

 

To see details and example of individual options, run:

kmsrecover -h or, kmsrecover --help

 

Note: If you do not specify any advanced options, all items in the datastore of Kerio Connect will be overwritten.

 


 

Advanced Options for Kerio Connect Recover

 

Abbreviation Full Option Mask

Description

-d --domain  

Recovers (or lists with the parameter -l) all backed-up data for the specified domain.

-u --user  

Recovers (or lists with the parameter -l) data of the specified user.

-f --folder  

Recovers the specified folder of the users. Requires specifying the -d and -u options (click the image below to enlarge and view the example).

kmsrecover2.png

-s --store  

Sets the location to recover the storage directory. By default, the store folder in the Kerio Connect installation directory is used.

-c  --cfgdir  

Sets the main directory for configuration files (mailserver.cfg), SSL certificates and the license. By default, the installation directory is used.

-m --mask   This specifies which parts of the backup will be recovered. You must set the value of the mask with -m <value> or --mask'<value>. Example: -m cfg, license, sslca, sslcert. 
cfg

This argument recovers only configuration files. mailserver.cfg and users.cfg

mail

Recovers only the \store\mail directory.

lists

Recovers only the configuration of the mailing list, the \store\lists directory.

spamassassin

Recovers only the SpamAssassin database.

license

Recovers the Kerio Connect license. 

sslca

Recovers SSL certificates issued by certification authorities.

sslcert

Recovers the Kerio Connect certificates.

public

Recovers public folders.

-b --backup  

Performs an additional backup before the recovery starts. The original directory will have the BAK extension. If such a file already exists, it is replaced by the new version. Verify that you have enough free disk space available, as this backup doubles the store size.

-g --noprogress  

Hides information about the recovery progress. Recommended if the recovery is recorded to the log.

-l --listing  

Lists the backup store content. You can also use additional parameters, such as -d and -u, which lists only specific content.

-q --quiet  

Hides the recovery progress information in the command line.

-v --verbose  

Display the recovery process information in the command line.

-h --help  

Prints out the help file.


 

Backup Files

 

File Names

 

Each backup archive (ZIP) filename consists of the backup type abbreviation and the date when it was created:

Backup Type Abbreviation

Backup File Name Example

Full Backup F

F20120118T220007Z.zip

The file name is interpreted as follows:

  • F — full backup
  • 2012 — year
  • 01 — month
  • 18 — day
  • T220007Z — GMT timestamp (22:00:07); always starts with T and ends with Z.
Differential Backup D

D20120106T220006Z.zip

The file name is interpreted as follows:

  • D — differential backup
  • 2012 — year
  • 01 — month
  • 06 — day
  • T220006Z — GMT timestamp (22:00:06); always starts with T and ends with Z.
Backup Copy/Manual Backup C

C20120117T084217Z.zip

The file name is interpreted as follows:

  • C - Backup copy or Manual backup
  • 2012 — year
  • 01 — month
  • 17 — day
  • T084217Z — GMT timestamp (08:42:17); always starts with T and ends with Z.

 

 

File Content

 

Each backup archive (ZIP) file includes the following files and directories:

File/Directory Name

Description

.version.txt

This file is created at the start of the backup process and includes the following information:

  • started — Time the backup started (YYYY-MM-DD hh:mm:ss).
  • version — The version of the backup tool.
  • hostname  DNS name of the Kerio Connect host for which the backup was created.

@backup

This is the main directory of the backup and includes the following items:

  • license — License backup.
  • sslca — Backup of certificates of certification authorities.
  • sslcert — Backup of Kerio Connect's SSL certificates.
  • store — Backup of the data store

mailserver.cfg

This file stores the Kerio Connect configuration that includes all settings done in the administration interface.

users.cfg

This file contains all users and their parameters as set in the Kerio Connect's administration interface.

.summary.txt

This file is created at the end of the backup creation process and includes the following information:

  • started — Time the backup started (YYYY-MM-DD hh:mm:ss).
  • finished — Time the backup ended YYYY-MM-DD hh:mm:ss.
  • count_files — Number of backed-up files.
  • total_size — Total size of the files (in bytes) which are backed-up between the creation of files .version.txt and .summary.txt.
  • duration — Total time of the backup creation process (hh:mm:ss:msms).

 

 

Note: If an issue with the backups occurs, consult the Debug log.
  1. Right-click the Debug log area.
  2. Click Messages.
  3. Select the Store Backup option.

    store_backup_debugs.png

 

Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Priyanka Bhotika

  2. Posted
  3. Updated

Comments