Difference between revisions of "Maintenance and Repair"

[unchecked revision][checked revision]
(Created page with 'MailStore products are developed so that they work correctly without requiring any maintenance. Occasionally, however, errors do occur due to system crashes or accidental manipu…')
 
m
 
(14 intermediate revisions by 3 users not shown)
Line 1: Line 1:
MailStore products are developed so that they work correctly without requiring any maintenance.
+
MailStore products are developed to require minimal administrative work. It is advisable nonetheless to run some maintenance tasks from time to time in order to ensure the archive's data integrity.
  
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 (if, because of such an error, some contents of the archive become inaccessible, for example).
+
Another reason to use the maintenance and repair facilities can be errors that do occasionally occur because of system crashes or accidental manipulation of the file structure, for example, due to which some contents of the archive may have become inaccessible. This section will provide the information necessary to perform certain maintenance and repair tasks without having to contact MailStore Support.
  
'''Please note:''' The commands described below can be entered and executed by a MailStore administrator through the Management Shell.
+
== Archive Stores ==
 +
The commands described below can be executed by a MailStore administrator through the MailStore Client under ''Administrative Tools > Storage > Storage Locations'', the [[MailStore Server Management Shell|Management Shell]] or scheduled as a [[Jobs|Job]].
  
== Logical Verification ==
+
For these commands the ID of an archive store often needs to be specified as parameter <tt>id</tt>. You can find these IDs at ''Administrative Tools > Storage > Storage Locations'' in the row ''ID'' of the table ''Archive Stores''.
 +
[[File:Maintenance_repair_01.png|500px|center]]
 +
Alternatively, you can use the Management API command <tt>GetStores</tt>, for example at the [[MailStore Server Management Shell|Management Shell]], to get a list of all archive stores.
  
Logical verification 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. Replace the number 1 with the actual number of the file group to be verified:
+
=== 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) has been modified manually, this will be reported by the check.
 +
Use the Management API commands <tt>VerifyStore</tt> to check a single archive store and <tt>VerifyStores</tt> to check all archive stores. For both commands, the parameter <tt>includeIndexes</tt> determines whether the full text indexes should be included in the check.
  
   filegroup-verify --gid=1
+
   VerifyStore --id=1 --includeIndexes=true
 +
  VerifyStores --includeIndexes=false
  
== Maintenance and Repair of Databases ==
+
=== Maintain all FDB Files ===
 +
Maintaining all Firebird Embedded Database files (FDB files) used by MailStore optimizes the internal data structure and removes obsolete database pages and transaction logs where necessary.
  
Simple sweep of the master database (no data is deleted):
+
  MaintainFileSystemDatabases
  
  maintain-db --command=sweep
+
=== Cleanup (Compact) ===
  
Complete rebuilding of the master database (e.g. if structural problems arise):
+
Compacting of the master database.
  
   maintain-db --command=backup-restore
+
   CompactMasterDatabase
  
Simple sweep of a file group database (no data is deleted). Replace the number 1 with the number of the file group:
+
Compacting of an archive store incl. database, container and index files.
  
   maintain-db --command=sweep --gid=1
+
   CompactStore --id=1
  
Complete rebuilding of a file group database (e.g. if structural problems arise):
+
== Search Indexes ==
 +
If emails cannot be located in the tree structure or by executing a search, this generally indicates a defective index. A defective index is not critical - it can be completely rebuilt at any time and without any loss of data.
  
  maintain-db --command=backup-restore --gid=1
+
To rebuild an index by using the MailStore Client, follow the instructions in [[Search Indexes#Rebuilding Search Indexes|Rebuilding Search Indexes]] in the MailStore Server manual.
  
== Maintenance and Repair of Indexes ==
+
The appropriate Management API command to rebuild all search indexes marked as ''Needs rebuild'' is:
  
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, please proceed as follows:
+
  RebuildSelectedStoreIndexes
  
Using MailStore Client, log on to MailStore Server as administrator.
+
There is also a template for creating a corresponding job available at ''Administrative Tools > Management API > Jobs'' in order to rebuild broken search indexes regularly.
Click on Administrative Tools and select Index Options.
+
 
Select the file group and the user index and click on Rebuild Now.
+
[[de:Wartung und Reparatur]]
Repeat this process for all affected file groups and user indexes.
+
[[en:Maintenance and Repair]]

Latest revision as of 10:26, 15 June 2015

MailStore products are developed to require minimal administrative work. It is advisable nonetheless to run some maintenance tasks from time to time in order to ensure the archive's data integrity.

Another reason to use the maintenance and repair facilities can be errors that do occasionally occur because of system crashes or accidental manipulation of the file structure, for example, due to which some contents of the archive may have become inaccessible. This section will provide the information necessary to perform certain maintenance and repair tasks without having to contact MailStore Support.

Archive Stores

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

For these commands the ID of an archive store often needs to be specified as parameter id. You can find these IDs at Administrative Tools > Storage > Storage Locations in the row ID of the table Archive Stores.

Maintenance repair 01.png

Alternatively, you can use the Management API command GetStores, for example at the Management Shell, to get a list of all archive stores.

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) has been modified manually, this will be reported by the check. Use the Management API commands VerifyStore to check a single archive store and VerifyStores to check all archive stores. For both commands, the parameter includeIndexes determines whether the full text indexes should be included in the check.

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

Maintain all FDB Files

Maintaining all Firebird Embedded Database files (FDB files) used by MailStore optimizes the internal data structure and removes obsolete database pages and transaction logs where necessary.

 MaintainFileSystemDatabases

Cleanup (Compact)

Compacting of the master database.

 CompactMasterDatabase

Compacting of an archive store incl. database, container and index files.

 CompactStore --id=1

Search Indexes

If emails cannot be located in the tree structure or by executing a search, this generally indicates a defective index. 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 the 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

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