Overview
A user has deleted some content from their mailbox that they want to recover, but you don't want to replace the mailbox content via KMSRecover as this would overwrite newer content. You want to recover old backed-up emails from a mailbox that was deleted.
Solution
Recovering data from a backup using KMSRecover will replace the current data with the targeted data, which may be undesirable if new content has been received since the last backup. Alternatively, if the mailbox that the items were backed up from no longer exists on the mail server, setting up a new mailbox to recover the data would be required.
Alternatively, you can manually move items from existing Kerio Connect Backups or from 3rd-party backup solutions (if stored in the original .eml format) using the guidance below. Note: Before you manually move the .eml files, please complete these 2 steps:
- Create a User from Kerio Control Administration Window with exact same user name as before
- Login in as the User in Webmail once and log out immediately. This will create the internal file structure for the user under the Store Directory which you can then use to copy the contents back.
- Stop Kerio Connect
- Locate the Backup File containing the emails to restore.
- For Kerio Connect Backups, these can be located within the Backup Directory defined within the Web Admin > Configuration > Archiving and Backup > Backup menu.
- The backups are stored in ZIP Archives with the name of the file indicating the DateTime of the backup (The letter indicates F for Full, D for Differential, or C for Manual Backups):
- Unpack the ZIP archive using your preferred archive management utility.
- Navigate to the desired content folder for the user content you want to recover. For example:
@backup\store\mail\domain.com\username\INBOX\#msgs
@backup\store\mail\domain.com\username\Sent Items\#msgs
@backup\store\mail\domain.com\username\Calendar\#msgs
@backup\store\mail\domain.com\username\Contacts\#msgs
- Copy the desired mailbox content
-
The emails, calendars, and contacts have the
.eml
extension, but the filename is randomly generated in hex format (e.g.,0000000a.eml
). - The challenge here may be identifying the correct item to restore, as you will need to open the
.eml
file in an email client or text editor. You can also try the native search in Windows or run scripts (ex. grep) to search for the emails (if you know specific keywords like the recipient, etc.).
-
- Place the collected eml files within the correct folder within the live mailstore.
- If you are recovering emails for the same user, you can use the backup path to inform this decision. The path in the mail store will match the backup, such as below for a user INBOX:
- If you are recovering emails for a deleted user, you can instead place them in your preferred path within the mail store.
- Care should be taken when copying the raw eml files, as if the filename already exists, you will need to change the filename using the same hex format manually. If you are not sure how to change the filename, you can follow the filenames structure in that folder. For example, if the newest file is
0000000a.eml
, you can change it to0000000b.eml
. - In case .eml files are copied to Multiple folders - create these 5 files in every folder that contains a #MSGS folder:
- index.fld
- metadata.dbb
- metadata.dbo
- search.fld
- status.fld
- If you are recovering emails for the same user, you can use the backup path to inform this decision. The path in the mail store will match the backup, such as below for a user INBOX:
- Start Kerio Connect
- After restoring the emails from a backup, re-index the mailboxes that received the recovered emails.
Note: As a workaround for conflicting filenames, you can create a new folder for the target user mailbox and place all of the collected eml files into that new folder. As there will be no eml files within the #msgs folder, you can move and index them and then use your email client to relocate them to their intended final destination once they are restored.