Difference between revisions of "Backup and Restore"

[unchecked revision][checked revision]
 
(75 intermediate revisions by 5 users not shown)
Line 1: Line 1:
= Backup =
+
MailStore Server is designed as a live system and therefore should be protected by backups against data loss due hardware or system failures, just as any other system that permanently handles or maintains data.
 +
{{#ev:youtube|https://youtu.be/BFyB9r-Mntk|350|right|''Tech Tip: Creating a Backup''}}
 +
MailStore Server supports two methods to perform a full backup of the email archive including all user settings: the MailStore Server integrated backup feature and the use of external backup software.
  
== Preliminary Considerations ==
+
Which method suits the needs of your business best depends on your preferences as well as your system environment.
  
MailStore Server supports two methods to perform a full backup of the email archive including all user settings: the MailStore integrated backup feature and the use of an external backup software.
+
Our Tech Tip video provides an overview.
 +
<br clear="all">
  
Which method best suits the needs of your business depends on your preferences as well as your system environment. In smaller environments without a designated administrator, the integrated backup feature has the advantage that no extensive configuration needs to be performed in order to make sure that the backup is successfully completed and that all pertinent data and directories are included. To be able to transfer the data (for example to Digital Audio Tape), it is necessary to integrate the backed up data into another system backup.
+
== Backup ==
  
When using external backup software (e.g. Symantec Backup Exec, Windows NTBackup or Acronis True Image,) a few measures have to be taken to be able to create a successful backup. However, it has the advantage that the MailStore Server data can be integrated into existing backup strategies without having to perform a separate system backup.
+
=== Preliminary Considerations ===
 +
In smaller environments without a designated administrator, with the integrated backup feature no extensive configuration needs to be performed in order to make sure that the backup is successfully completed and that all pertinent data and directories are included. However, to be able to transfer the data (for example to off-site backup locations), it is necessary to integrate the backed up data into another backup solution.  
  
<p class="msnote">'''Please note:''' In MailStore's ''Administrative Tools'' under ''Storage Locations'', older file groups can be write-protected. Write-protected file groups remain available to all users (although they cannot be moved or deleted) and no longer have to be included in ongoing backup procedures. These file groups can be stored on cost-efficient storage media. More information about file groups and storage locations is available under [[Storage_Locations#Managing_Storage_Locations|Managing Storage Locations]].</p>
+
When using external backup software a successful backup needs a few preparations. On the plus side, MailStore Server data can be integrated into existing backup strategies without having to perform a separate system backup.
  
= Using the MailStore Integrated Backup Feature =
+
=== Which Data Must be Backed Up? ===
 +
To ensure a successful and frictionless restore of MailStore Server at any time, the following data must be included in the backup:
  
 +
* Master Database (MailStoreMaster.fdb), which contains all configuration settings, like profiles, users, etc.
 +
* Encryption Key File for Master Database (<code>MailStoreMaster.key</code>)
 +
* If destination for audit log is set to ''Integrated Audit Log'': Audit log files (<code>Audit Log</code> directory)
 +
* Archive Stores
 +
 +
Each archive store in MailStore Server consists of three components:
 +
 +
* Folder information and meta data (<code>MailStoreFileGroup.fdb</code> + <code>MailStoreFileGroup.key</code>)
 +
* Email headers and contents (<code>Content</code> directory)
 +
* Full text index (<code>Index</code> directory)
 +
 +
'''Please note:''' As the configuration of the MailStore Server service itself (located within MailStore Server's program files folder), contains information specific to the current configuration of the computer where MailStore Server is installed, it it not recommended to backup and restore the service configuration data. Instead, manually reconfigure these settings after re-installing MailStore Server on a new machine. Pay special attention to the Audit Log Destination and VSS Writer settings.
 +
 +
==== Notes on Consistency ====
 +
While ''folder information and meta data'' and ''email headers and contents'' are to be treated as one unit that requires consistency, ''full text indexes'' can be reconstructed if needed. In environments with higher security demands, and depending on the backup target, it may be advisable to exclude the unencrypted full text indexes from the backup for the costs have having to fully rebuild them in case of a restore.
 +
 +
==== Notes on Integrity ====
 +
Irregardless of which backup method is used, only regular maintenance does ensure that the backed up data can successfully be used after a restore. Please refer to [[Maintenance and Repair]] for further details.
 +
 +
== Using the MailStore Server Integrated Backup Feature ==
 
MailStore has built-in technology to perform a full backup of the archive.
 
MailStore has built-in technology to perform a full backup of the archive.
  
A full database backup contains all archived emails and all program settings such as users and privileges. Restoring such a backup is sufficient to completely reinstate the original archive without having to perform any further configurations.
+
The backup contains all archived emails and all settings such as profiles, users and privileges. Restoring such a backup is sufficient to completely reinstate the original archive without having to perform any further configurations.
 +
 
 +
<p class="msnote">'''Important Notice:''' When using the integrated backup feature, MailStore Server only supports internal archive stores. If you are using external archive stores, you need external backup software to perform a full backup.</p>
  
== Procedure ==
+
=== Procedure ===
 +
To create a complete database backup, proceed as follows:
  
To create a complete database backup, click on ''Administrative Tools'' and select ''Create Archive Backup''. Enter the destination directory and specify the scope of the backup. For determining which file groups should be included in the backup, the following options are available:
+
* Log on to MailStore Client as MailStore Server administrator.
+
* Click on ''Administrative Tools > Management API > Jobs''.
'''Backup all file groups:''' All currently attached file groups are archived.
+
* Click on ''Storage'' and select ''Create Backup''.
 +
*: [[File:Jobs_create_backup_01.png|center|450px]]
 +
* Enter the ''target directory''.
 +
*: '''Please note:''' If the target directory is a network share, make sure that the MailStore Server service has access to that share. The path to the network share has to be entered in UNC notation, e.g. \\computer\sharename. Further information is available in the [[Using Network Attached Storage (NAS)]] article.
 +
* The search indexes can be excluded optionally.
 +
*: '''Please note:''' This option can be set so that administrators which have access to the backup files cannot access the unencrypted search index files. When restoring backups that do not include search indexes, the search indexes have to be [[Search_Indexes#Rebuilding_Search_Indexes|rebuilt]].
 +
* Define the start time for the backup in the ''Schedule'' section.
 +
* Click ''OK'' to finish the creation of the backup job.
  
''' Backup all file groups that are not write-protected:''' With MailStore Server file groups can be write-protected. Users are still able to access the data of a write-protected file group but are no longer able to make any changes (by adding or deleting emails). If a backup of a write-protected file group has already been performed, it can be excluded from the backup procedure using this option.
+
If necessary, run the job manually in order to verify that MailStore Server is able to create a backup without errors.  
  
'''Backup the following file groups:''' With this option the backup can be limited to specific file groups.
+
When running the backup function for the first time, all files will be copied, after that only changed files will be copied. To achieve rotation of backups (e.g. daily, weekly), schedule multiple backup jobs with different target directories.
  
After selecting the appropriate option, click on ''OK'' to perform a single backup. To perform a backup at regular intervals, click on ''Schedule Task'' and create the appropriate task.
+
<p class="msnote">'''Please note:''' The archive cannot be accessed while a backup is in progress. Trying to access the archive will generate the error message ''The server is currently not available due to maintenance.''</p>
  
[[File:bkup_archive_01.png|center|450px]]
+
== Using External Backup Software ==
  
<p class="msnote">'''Please note:''' The archive cannot be accessed while a backup is in progress. Trying to access the archive will generate the error message "Due to maintenance the server is currently unavailable."</p>
+
=== Backup of Internal Archive Stores ===
 +
When backing up internal archive stores with an external backup software, attention must be payed to the consistency of data which mainly depends on the backup method. The following sections summarize the pros and cons of the different methods.
  
= Using External Backup Software =
+
==== File Based Backups ====
 +
While file based backups solutions are good for backing up independent files, they are usually not suitable for creating consistent backups of a MailStore Server as its data is spread across multiple rapidly changing files.
  
'''Please note:''' MailStore does not support VSS (Volume Shadow Copy Service). Please make sure that the MailStore Server service is stopped before performing a backup.
+
In order to create consistent backups with file based backup tools, it is required to either freeze and thaw MailStore Server via <tt>net pause mailstoreserver</tt> and <tt>net continue mailstoreserver</tt> commands or to shutdown and restart the MailStore Server via <tt>net stop mailstoreserver</tt> and <tt>net start mailstoreserver</tt> commands.
  
As soon as the MailStore Server service is stopped, the data directories of the archive can be backed up with external backup software. A database backup contains all archived emails and program settings such as users and privileges. Restoring such a backup is sufficient to completely reinstate the original archive without having to perform any further configurations.  
+
As MailStore Server must remain shut down for the time of the backup, this typically results in downtimes during which MailStore Server is neither able to archive new email nor provide end user access to the archived data.
  
How to use external software to create a backup is described below using the Windows backup program ''NTBackup'' under Windows Server 2003 as an example.
+
==== Storage Snapshots ====
 +
When using Volume Shadow Copy Services (VSS) or other methods of creating snapshots on storage level, it is necessary to ensure that all files are closed before the snapshot is created.  
  
== Preparations and Identification of the Necessary Command Line Parameters ==
+
The MailStore Server service provides external backup software using Microsoft Volume Shadow Copy Service with a so-called Volume Shadow Copy Service Writer (VSS Writer). The external backup software can use it to create consistent backups of the MailStore Server master database and all internal archive stores. Whether this method succeeds, however, largely depends on the backup software and the storage that is used. The VSS Writer has to be activated in the [[MailStore_Server_Service_Configuration|MailStore Server Service Configuration]].
  
How to determine the necessary command line parameters for a MailStore Server backup using a batch file is described in the following.
+
To verify if the appropriate VSS events were initiated in MailStore Server during a backup, open the application protocol in the Windows event viewer and search for the following events:
  
* Start the program ''ntbackup.exe'' either by using the ''run''-function of windows or via the start-menu entry located at ''Programs'', ''Accessories'', ''System Tools'', ''Backup''
+
# ''A backup session has been started.''
* Now start the backup wizard of NTBackup.
+
# ''The archive has been frozen as a reaction on the OnPrepareSnapshot event.''
* Click on ''Next''.
+
# ''The archive has been thawn as a reaction on the OnThaw event.''
* Choose ''Back up selected files, drives, or network data'' and click on ''Next''.
+
# ''The backup session has been shut down.''
* Now select the MailStore Server database directory for the backup. The default directory is located under ''C:\MailArchive''. Any additional file groups that were created via ''Administrative Tools -> Storage Locations'' have to be included in the backup as well. Afterwards click on ''Next''
 
*: [[File:Backup_select_files.jpg|center]]
 
*: <p class="msnote">'''Please note:''' Never limit the backup to file groups; each backup must also include the master database (MailStoremaster.fdb).</p>
 
* In the following dialogue enter a name for the backup job and select a location where the backup should be stored before clicking on ''Next''.
 
* Before closing the wizard additional backup options such as the time of execution or schedule have to be specified by clicking on ''Advanced''. This is necessary to create a new scheduled task in Windows which includes the required command line needed in the next section.
 
*:[[File:Backup_wizard_complete.jpg|center]]
 
*:[[File:Backup_schedule.jpg|center]]
 
* The new ''scheduled task'' now contains all necessary parameters to create a batch file. Most important information in the command line shown in the ''Execute:''-textfield.
 
*:[[File:Backup_schedule_command.jpg|center]]
 
  
== Creating a Time-Controlled Backup Task (NTBackup) ==
 
  
* Open the new ''scheduled task'' generated in the previous step.
+
If these events cannot be found in the application protocol, no consistent backup using Volume Shadow Copy Service was performed. In that case the backup software needs to prepare MailStore Server for the snapshots. This can be done with the methods detailed in the [[#File Based Backups|File Based Backups]] section.
* Create a new empty text file and copy the text of the ''Execute''-textfield containing the necessary command line parameters into that newly created file.
 
* Make sure the MailStoreServer service is stopped before the backup runs and gets started again after the backup has finished. To achieve this, we recommend using the ''net stop''- and ''net start''-commands.
 
* Save the file as ''MailStoreBackup.bat''. Here is an example ''MailStoreBackup.bat''-file:
 
  
REM *** Stop MailStore Server service ***
+
For how to execute commands before and after performing snapshots, please consult your backup software's documentation.
net stop MailStoreServer
 
 
REM *** Run saved NTBackup job ***
 
C:\WINDOWS\system32\ntbackup.exe backup "@C:\Documents and Settings\Administrator\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data\MailStoreBackup.bks" /n "MailStoreBackup.bkf created 8/13/2010 at 12:17 PM" /d "Set created 8/13/2010 at 12:17 PM" /v:no /r:no /rs:no /hc:off /m daily /j "MailStoreBackup" /l:s /f "C:\MailStoreBackup\MailStoreBackup.bkf"
 
 
REM *** Start MailStore Server service ***
 
net start MailStoreServer
 
  
* To execute the backup according to a schedule, set up a new scheduled task in Windows which executes the ''MailStoreBackup.bat''-file.
+
==== Full Virtual Machine Snapshots ====
* The scheduled task previously created by NTBackup can now be removed safely.
+
Some backup solutions are highly integrated into virtualization solutions and can create and backup/replicate full snapshots of virtual machines. These types of snapshots not only contain the current state of the hard disks but also of the processor and the current main memory. Thus full virtual machine snapshots can be considered as being consistent.
  
'''Please note:''' Most of the backup software products provide a way to define parameters that are executed before the actual backup task. In this case, creating a separate batch file to stop and start the MailStore Server service is not necessary.
+
==== Other Backup or Replication Methods ====
 +
For questions regarding any other type of backup solutions such as block level replication, continuous backup etc please contact the vendor's support to find out whether their software is able to create consistent backups of whole directory structures.
  
== Manual Execution of a Backup ==
+
=== Backup of External Archive Stores ===
 +
External archive stores allow you to store folder information and meta data in an SQL database. Email headers and contents can be stored optionally in an SQL database as well. Search index files have to be stored in the file system.
  
To perform a single backup of your MailStore Server data, please proceed as follows:
+
To backup external archive stores, the distributed data has to be backed up simultaneously. Stop the MailStore Server service, backup the SQL databases and the files that are stored in the file system with appropriate backup tools, then restart the MailStore Server service when done.
  
* Stop the MailStore Server service using the ''NET STOP MailStoreServer''-command or via the MailStore Server Service Configuration which is located in the MailStore Server program folder in the Windows Start menu.
+
You can stop and start the MailStore Server service by executing the <tt>net stop mailstoreserver</tt> and <tt>net start mailstoreserver</tt> commands.
* Start the backup program and select the appropriate files for the backup as described above.
 
* Start the manual backup.
 
* After the backup has been completed, restart the MailStore Server service using the ''NET START MailStoreServer'' command or via the  MailStore Server Service Configuration.
 
  
= Restoring Backups =
+
In case the unencrypted search index files are not backed up, you can [[Search_Indexes#Rebuilding_Search_Indexes|rebuild]] them after restoring the backup.
  
This section describes how a database backup of the entire email archive can be restored. Information about archiving individual files (in EML or MSG format) is available in the chapter [[Archiving_Emails_from_External_Systems_(File_Import)|Archiving Emails from External Systems]].
+
== Restoring Backups ==
  
== Background ==
+
This section describes how a database backup of the entire email archive, which was created using the integrated backup feature, can be restored.
  
A database backup contains all archived emails and program settings such as users and privileges. Restoring such a backup is sufficient to completely reinstate the original archive without having to perform any further configurations.  
+
=== Background ===
 +
A database backup which was created using the integrated backup feature and that includes the search index files contains all archived emails and program settings such as users and privileges. Restoring such a backup is sufficient to completely reinstate the original archive without having to perform any further configurations.  
  
== Restoring a Database Backup ==
+
=== Automatic Restore of a Database Backup ===
 +
MailStore Server creates two files in the backup destination when creating a backup which allow an automatic full restore of the archive in its original storage location. Should the backup be restored to a different storage location or if only parts (i.e. a single archive store) should be restored, the restore procedure must be performed manually (see next section).
  
 
An operative installation of MailStore Server is required to restore a database backup. Please proceed as follows:
 
An operative installation of MailStore Server is required to restore a database backup. Please proceed as follows:
  
* Copy the database backup to a local hard drive on the computer on which MailStore Server is installed.
+
* Stop the MailStore Server Service and delete the empty archive that has been created during installation in ''C:\MailArchive''.
* Start the MailStore Server Service Configuration. It is located in the MailStore Server program folder that can be accessed through the Windows Start menu.
+
* Reconfigure the service settings (e.g. Certificates, Audit Logs Destination, VSS Support).
 +
* Next execute the file ''restore.bat'' from the backup directory.
 +
*: '''Note:''' Is the file located on a network share, e.g. \\nas01\MailStoreBackup, you first have to crate a mapped drive of that share, e.g. ''N:'', and then execute the file on that drive.
 +
* Follow the on-screen instructions. Carefully check the output for possible error messages.
 +
* Run the [[MailStore_Server_Service_Configuration|MailStore Server Service Configuration tool]] from the MailStore Server program folder in the Windows start menu.
 +
* Click ''Browse...'' under ''General > Master Database'' and select the restore directory which contains the ''MailStoreMaster.fdb'' file. Confirm the selection by clicking ''OK''.
 +
* Finally start the MailStore Server Service again.
 +
 
 +
In case the backup includes the search index files, no further steps are necessary after using the automatic restore. Otherweise the search indexes have to be [[Search_Indexes#Rebuilding_Search_Indexes|rebuild]].
 +
 
 +
=== Manual Restore of a Database Backup ===
 +
An operative installation of MailStore Server is required to restore a database backup. Please proceed as follows:
 +
 
 +
* Copy the database backup to a local hard drive on the computer or to a respective network share.
 +
* Start the [[MailStore_Server_Service_Configuration|MailStore Server Service Configuration]]. It is located in the MailStore Server program folder that can be accessed through the Windows Start menu.
 
* Below ''Master Database'', click on ''Browse...'' and select the backup directory containing the file ''MailStoreMaster.fdb''.  
 
* Below ''Master Database'', click on ''Browse...'' and select the backup directory containing the file ''MailStoreMaster.fdb''.  
 
*: [[File:bkup_restore_01.png|center|450px]]
 
*: [[File:bkup_restore_01.png|center|450px]]
 
* Click on ''OK'' to confirm.
 
* Click on ''OK'' to confirm.
 
* At the bottom of the window, click on ''Restart Service'' to save the new settings.
 
* At the bottom of the window, click on ''Restart Service'' to save the new settings.
* The backup is completely restored to the application and the archive can be used as usual.
+
* When creating the backup, the folder names of the archive store may have changed. Please use the [[Storage Locations|Storage Locations Management]] to adjust the paths to the archive stores or rename the folders in the file system accordingly. The mapping of the backup's archive store folder names to their original names can be found in the ''restore.csv'' file that has been created with the backup.
 
 
Additional file groups may exist which will not have been restored to the archive after following these steps. In this case, please proceed as follows:
 
  
* Start MailStore Client on the MailStore Server PC and log on as MailStore administrator.
+
In case the backup includes the search index files, no further steps are necessary after the restore. Otherweise the search indexes have to be [[Search_Indexes#Rebuilding_Search_Indexes|rebuilt]].
* Under ''Administrative Tools'' > ''Storage'' click on ''Storage Locations''.
 
* In the menu bar at the bottom of the screen, click on ''Attach...'' and select the appropriate file group.
 
* Repeat those steps until all file groups are available again.
 
  
 
[[de:Datensicherung und Wiederherstellung]]
 
[[de:Datensicherung und Wiederherstellung]]
 +
[[en:Backup and Restore]]

Latest revision as of 10:09, 12 March 2024

MailStore Server is designed as a live system and therefore should be protected by backups against data loss due hardware or system failures, just as any other system that permanently handles or maintains data.

Tech Tip: Creating a Backup

MailStore Server supports two methods to perform a full backup of the email archive including all user settings: the MailStore Server integrated backup feature and the use of external backup software.

Which method suits the needs of your business best depends on your preferences as well as your system environment.

Our Tech Tip video provides an overview.

Backup

Preliminary Considerations

In smaller environments without a designated administrator, with the integrated backup feature no extensive configuration needs to be performed in order to make sure that the backup is successfully completed and that all pertinent data and directories are included. However, to be able to transfer the data (for example to off-site backup locations), it is necessary to integrate the backed up data into another backup solution.

When using external backup software a successful backup needs a few preparations. On the plus side, MailStore Server data can be integrated into existing backup strategies without having to perform a separate system backup.

Which Data Must be Backed Up?

To ensure a successful and frictionless restore of MailStore Server at any time, the following data must be included in the backup:

  • Master Database (MailStoreMaster.fdb), which contains all configuration settings, like profiles, users, etc.
  • Encryption Key File for Master Database (MailStoreMaster.key)
  • If destination for audit log is set to Integrated Audit Log: Audit log files (Audit Log directory)
  • Archive Stores

Each archive store in MailStore Server consists of three components:

  • Folder information and meta data (MailStoreFileGroup.fdb + MailStoreFileGroup.key)
  • Email headers and contents (Content directory)
  • Full text index (Index directory)

Please note: As the configuration of the MailStore Server service itself (located within MailStore Server's program files folder), contains information specific to the current configuration of the computer where MailStore Server is installed, it it not recommended to backup and restore the service configuration data. Instead, manually reconfigure these settings after re-installing MailStore Server on a new machine. Pay special attention to the Audit Log Destination and VSS Writer settings.

Notes on Consistency

While folder information and meta data and email headers and contents are to be treated as one unit that requires consistency, full text indexes can be reconstructed if needed. In environments with higher security demands, and depending on the backup target, it may be advisable to exclude the unencrypted full text indexes from the backup for the costs have having to fully rebuild them in case of a restore.

Notes on Integrity

Irregardless of which backup method is used, only regular maintenance does ensure that the backed up data can successfully be used after a restore. Please refer to Maintenance and Repair for further details.

Using the MailStore Server Integrated Backup Feature

MailStore has built-in technology to perform a full backup of the archive.

The backup contains all archived emails and all settings such as profiles, users and privileges. Restoring such a backup is sufficient to completely reinstate the original archive without having to perform any further configurations.

Important Notice: When using the integrated backup feature, MailStore Server only supports internal archive stores. If you are using external archive stores, you need external backup software to perform a full backup.

Procedure

To create a complete database backup, proceed as follows:

  • Log on to MailStore Client as MailStore Server administrator.
  • Click on Administrative Tools > Management API > Jobs.
  • Click on Storage and select Create Backup.
    Jobs create backup 01.png
  • Enter the target directory.
    Please note: If the target directory is a network share, make sure that the MailStore Server service has access to that share. The path to the network share has to be entered in UNC notation, e.g. \\computer\sharename. Further information is available in the Using Network Attached Storage (NAS) article.
  • The search indexes can be excluded optionally.
    Please note: This option can be set so that administrators which have access to the backup files cannot access the unencrypted search index files. When restoring backups that do not include search indexes, the search indexes have to be rebuilt.
  • Define the start time for the backup in the Schedule section.
  • Click OK to finish the creation of the backup job.

If necessary, run the job manually in order to verify that MailStore Server is able to create a backup without errors.

When running the backup function for the first time, all files will be copied, after that only changed files will be copied. To achieve rotation of backups (e.g. daily, weekly), schedule multiple backup jobs with different target directories.

Please note: The archive cannot be accessed while a backup is in progress. Trying to access the archive will generate the error message The server is currently not available due to maintenance.

Using External Backup Software

Backup of Internal Archive Stores

When backing up internal archive stores with an external backup software, attention must be payed to the consistency of data which mainly depends on the backup method. The following sections summarize the pros and cons of the different methods.

File Based Backups

While file based backups solutions are good for backing up independent files, they are usually not suitable for creating consistent backups of a MailStore Server as its data is spread across multiple rapidly changing files.

In order to create consistent backups with file based backup tools, it is required to either freeze and thaw MailStore Server via net pause mailstoreserver and net continue mailstoreserver commands or to shutdown and restart the MailStore Server via net stop mailstoreserver and net start mailstoreserver commands.

As MailStore Server must remain shut down for the time of the backup, this typically results in downtimes during which MailStore Server is neither able to archive new email nor provide end user access to the archived data.

Storage Snapshots

When using Volume Shadow Copy Services (VSS) or other methods of creating snapshots on storage level, it is necessary to ensure that all files are closed before the snapshot is created.

The MailStore Server service provides external backup software using Microsoft Volume Shadow Copy Service with a so-called Volume Shadow Copy Service Writer (VSS Writer). The external backup software can use it to create consistent backups of the MailStore Server master database and all internal archive stores. Whether this method succeeds, however, largely depends on the backup software and the storage that is used. The VSS Writer has to be activated in the MailStore Server Service Configuration.

To verify if the appropriate VSS events were initiated in MailStore Server during a backup, open the application protocol in the Windows event viewer and search for the following events:

  1. A backup session has been started.
  2. The archive has been frozen as a reaction on the OnPrepareSnapshot event.
  3. The archive has been thawn as a reaction on the OnThaw event.
  4. The backup session has been shut down.


If these events cannot be found in the application protocol, no consistent backup using Volume Shadow Copy Service was performed. In that case the backup software needs to prepare MailStore Server for the snapshots. This can be done with the methods detailed in the File Based Backups section.

For how to execute commands before and after performing snapshots, please consult your backup software's documentation.

Full Virtual Machine Snapshots

Some backup solutions are highly integrated into virtualization solutions and can create and backup/replicate full snapshots of virtual machines. These types of snapshots not only contain the current state of the hard disks but also of the processor and the current main memory. Thus full virtual machine snapshots can be considered as being consistent.

Other Backup or Replication Methods

For questions regarding any other type of backup solutions such as block level replication, continuous backup etc please contact the vendor's support to find out whether their software is able to create consistent backups of whole directory structures.

Backup of External Archive Stores

External archive stores allow you to store folder information and meta data in an SQL database. Email headers and contents can be stored optionally in an SQL database as well. Search index files have to be stored in the file system.

To backup external archive stores, the distributed data has to be backed up simultaneously. Stop the MailStore Server service, backup the SQL databases and the files that are stored in the file system with appropriate backup tools, then restart the MailStore Server service when done.

You can stop and start the MailStore Server service by executing the net stop mailstoreserver and net start mailstoreserver commands.

In case the unencrypted search index files are not backed up, you can rebuild them after restoring the backup.

Restoring Backups

This section describes how a database backup of the entire email archive, which was created using the integrated backup feature, can be restored.

Background

A database backup which was created using the integrated backup feature and that includes the search index files contains all archived emails and program settings such as users and privileges. Restoring such a backup is sufficient to completely reinstate the original archive without having to perform any further configurations.

Automatic Restore of a Database Backup

MailStore Server creates two files in the backup destination when creating a backup which allow an automatic full restore of the archive in its original storage location. Should the backup be restored to a different storage location or if only parts (i.e. a single archive store) should be restored, the restore procedure must be performed manually (see next section).

An operative installation of MailStore Server is required to restore a database backup. Please proceed as follows:

  • Stop the MailStore Server Service and delete the empty archive that has been created during installation in C:\MailArchive.
  • Reconfigure the service settings (e.g. Certificates, Audit Logs Destination, VSS Support).
  • Next execute the file restore.bat from the backup directory.
    Note: Is the file located on a network share, e.g. \\nas01\MailStoreBackup, you first have to crate a mapped drive of that share, e.g. N:, and then execute the file on that drive.
  • Follow the on-screen instructions. Carefully check the output for possible error messages.
  • Run the MailStore Server Service Configuration tool from the MailStore Server program folder in the Windows start menu.
  • Click Browse... under General > Master Database and select the restore directory which contains the MailStoreMaster.fdb file. Confirm the selection by clicking OK.
  • Finally start the MailStore Server Service again.

In case the backup includes the search index files, no further steps are necessary after using the automatic restore. Otherweise the search indexes have to be rebuild.

Manual Restore of a Database Backup

An operative installation of MailStore Server is required to restore a database backup. Please proceed as follows:

  • Copy the database backup to a local hard drive on the computer or to a respective network share.
  • Start the MailStore Server Service Configuration. It is located in the MailStore Server program folder that can be accessed through the Windows Start menu.
  • Below Master Database, click on Browse... and select the backup directory containing the file MailStoreMaster.fdb.
    Bkup restore 01.png
  • Click on OK to confirm.
  • At the bottom of the window, click on Restart Service to save the new settings.
  • When creating the backup, the folder names of the archive store may have changed. Please use the Storage Locations Management to adjust the paths to the archive stores or rename the folders in the file system accordingly. The mapping of the backup's archive store folder names to their original names can be found in the restore.csv file that has been created with the backup.

In case the backup includes the search index files, no further steps are necessary after the restore. Otherweise the search indexes have to be rebuilt.