Maintenance and Repair

Revision as of 12:41, 12 June 2015 by Dweuthen (talk | contribs)

MailStore products are developed to require minimal administrative work. Although it is advisable to execute some maintenance tasks from time to time in order to ensure data integrity of the archive.

Occasionally, however, errors do occur due to system crashes or accidental manipulation of the file structure, for example. This section will provide the information necessary to perform certain maintenance and repair works without having to contact MailStore Support (for example if some contents of the archive becomes inaccessible because of such an error).

Archive Stores

The commands described below can be executed by a MailStore administrator through MailStore Client under Administrative Tools > Storage > Storage Locations, the Management Shell or based on a scheduled as a Job.

Check Data Integrity

A data integrity check is used to determine if all emails located in MailStore are still complete and in their original state. For example, if a content file (.dat) was modified by hand, this will be censured by logical verification. Use the Management API command VerifyStore to check a single archive store. Replace the number 1 with the actual number of the archive store to be verified. Use the Management API command VerifyStores to check all archive stores. For both commands, the parameter includeIndexes controls whether the full text indexes should be included in the check routine.

 VerifyStore --id=1 --includeIndexes=true
 VerifyStores --includeIndexes=true

Maintain all FDB Files

Maintaining all Firebird Embedded Database files (FDB files) used by MailStore Server optimizes the internal data structure and remove no longer needed database pages and transaction logs where necessary.

 MaintainFileSystemDatabases

=== Cleanup (Compact)

Compacting of master database:

 CompactMasterDatabase

Compacting of an archive store incl. databases, container and index files. Replace the number 1 with the number of the archive store:

 CompactStore --id=1

Search Indexes

Generally, it is an indication that an index is defective if emails cannot be located through the tree structure or by executing a search. A defective index is not critical - it can be completely rebuilt at any time and without any loss of data.

To rebuild an index by using MailStore Client, follow the instructions in Rebuilding Search Indexes in the MailStore Server manual.

The appropriate Management API command to rebuild all search indexes marked as Needs rebuild is:

  RebuildSelectedStoreIndexes

Also there is a template for creating a corresponding job available at Administrative Tools > Management API > Jobs in order to rebuild broken search indexes regularly.