How to recover from a corrupt archive store by merging stores
When an archive store is damaged (typically due to power issues or third party antivirus interaction), the following steps can be used to extract the messages from the problematic archive and merge them into a new archive store.
Check Infrastructure for damage
Before we merge the archive store data we must confirm if the disk the store is using has any disk errors. This is often the reason for why the .dat files have been corrupted in the first place.
We recommend you run a disk check command on the drive as well as check for any possible Antivirus software that may have quarantined the .dat files.
Check for Database damage
If you suspect the Firebird Database could be damaged you can run the following from Administrative tools -> Miscellaneous -> Management shell command:
RecoverStore –id=x (where x is the id number of the impacted Store)
This can take a long time to rebuild the database from recovery records.
Merge the old store data with a new store to remove any dead references
Note: We strongly recommend you take a full backup of all your data before taking the steps below.
- Stop all current archive jobs from running via the Archive Email link in the MailStore Client.
- In Administrative Tools -> Storage -> Storage Locations, use the Create… button to define a new Archive Store with a similar name to the corrupt store (for example 2018-10-new).
- In Administrative tools -> Storage -> Storage Locations, determine the ID of both the old damaged store and newly created store via the ID column.
- Using the command below, merge the contents of the old store ID into the new store ID. For example, if the old store has ID of 10 and the new store has ID of 11, run the following command via Administrative tools -> Management API -> Command Prompt
MergeStore -id=11 -sourceId=10
(Please note this command is case sensitive note the uppercase ‘I’ in ‘sourceId’)
This can take a very long time to copy the data from one store message by message to the new store as the damage to the existing store may be severe.
- Once completed you will have two stores in Administrative Tools -> Storage -> Storage Locations. You can now detach the old problematic store and delete it from the disk if needed.
- Re-enable the archive jobs.
Related Articles
Attaching and Detaching Archive Stores
Existing archive stores can be detached from the archive. To do so, right-click on an archive store in Administrative Tools -> Storage -> Storage Locations and select Detach: The detached archive store and the emails contained within it are now no ...
How to extract messages from a damaged MailStore archive
When an archive store is damaged (typically due to power issues or third party antivirus interaction), the following steps can be used to extract the messages from the problematic archive to your local hard drive and then re-archive the old data into ...
Moving an archive store to a new location
To move an archive store to another hard-disk or network share, follow the instructions below. The MailStore master database all other archive stores remain unchanged. When moving an archive store to a network share the information from the article ...
MailStore Data integrity fails with "Message #xxxxx: Header for mime entity #xxxx is not available..."
After running a MailStore data Integrity check ( Or verify Store command) If you then see errors that look like: Message #148472: Header for mime entity #840552 is not available. Container: 3909.dat, Entry #29 This is explaining that the message with ...
Moving a MailStore server installation to a new server
To move a MailStore Server archive to a new machine including all users, settings and emails follow these steps: Stop the MailStore Server service on the current machine, either through the MailStore Server Service Configuration tool or the service ...