This article providers step by step instruction on how to restore individual mail items back to user mailboxes in Exchange 2013.
Similar articles are available for other versions of Exchange.
Scenario: a user deleted a folder in his mailbox
User Billy has accidentally deleted his IMPORTANT folder, and by the time he discovered that folder is missing, the item had already been purged from the Recoverable Items storage container.
Here is screenshot of his original folder:
Steps to recover
1. Determine which database hosts user mailbox
We need to find out which mailbox database hosts Billy's mailbox. If your environment uses a single mailbox for all users, skip this step.
Run the following command in the Exchange Management Shell (Powershell)
Get-MailboxStatistics -identity billy | fl
2. Create "Recovery Database" using the Exchange Management Shell (Powershell)
Create a Recovery Storage Group to use as temporary storage for our restored mailbox.
Create folders where the recovery database will reside. In our example, we will use "C:\EXCH-DATA\RDB1-DB\" and "C:\EXCH-DATA\RDB1-LOG".
Run the New-MailboxDatabase cmdlet with the following parameters:
- -EdbFilePath (the path to the restored mailbox database file)
- -LogFolderPath (the path to be used for transaction log files, which must be an empty folder)
- -Server (the server that the recovery is being performed on)
The full command for our example is:
New-MailboxDatabase -Recovery -Name RDB1 -Server EXCH2010 -EdbFilePath "C:\EXCH-DATA\RDB1-DB\RDB1.EDB" -LogFolderPath "C:\EXCH-DATA\RDB1-LOG"
After adding the recovery database, you must restart the Microsoft Exchange Information Store.
3. Use ZCB/ESB to restore the mailbox database to the Recovery Database
Launch ZCB, and visit the Restore page. Select the backup run containing your mailbox database. Restore to the Recovery Database and enter the appropriate information.
Once restore begins, you will be taken to the Monitor page where you can track the progress of your restore.
4. Mount the database via Powershell
Run this command. Be sure to use the name of your database. Our example database is RDB1.
5. Restoring Mailbox Items from a Recovery Database
Proceed with mailbox item restores once the mailbox database has been mounted. Use Powershell to see the available mailboxes to restore with this command:
Get-MailboxStatistics -Database RDB1
Restore Items into sub-folder of user Mailbox
We will use New-MailboxRestoreRequest cmdlet to restore mailbox into Restore folder.
If you want to perform more granular restore, such as restoring messages with a specific subject, please refer to this article: New-MailboxRestoreRequest
New-MailboxRestoreRequest -SourceDatabase RDB1 -SourceStoreMailbox "Billy Gates" -TargetMailbox billy -TargetRootFolder Restore
You can pipe 2 cmdlets below to get status of you restore request
Get-MailboxRestoreRequest | Get-MailboxRestoreRequestStatistics
6. Verify restored items and move them to appropriate location
Use Outlook to view or move restored items to their Original Location. As you can see from the picture below, we can move "IMPORTANT" folder back to its original location under Inbox.
Alternative restore destinations
Outlook PST file
In some scenarios, you might want to get restored items in the form of PST file, rather then recover them directly to user mailbox. For example you need to recover emails of an employee who is not longer with your organization.
Create a temporary user with its own mailbox, recover email items to it, and then extract recovered content to PST file.
Create temporary User Mailbox
In our example, we call the temporary user "Billy Recovery", and give it the user name billyrec. You can choose any mailbox database.
Restore and mount a recovery database
Use steps 1 - 4 in the Steps to Recover section above to restore and mount a recovery database.
Recover mailbox items with Restore-Mailbox cmdlet
In this example we use New-MailboxRestoreRequest cmdlet to restore the entire mailbox to our temporary user "Billy Recovery". For more detail about performing more granular restore follow this link: New-MailboxRestoreRequest
New-MailboxRestoreRequest -SourceDatabase RDB1 -SourceStoreMailbox "Billy Gates" -TargetMailbox firstname.lastname@example.org -AllowLegacyDNMismatch
Extract the contents of the recovery mailbox to a PST folder
Create a network share where you planning to place extracted PST file. Make sure that "Exchange Trusted Subsystem" group has full permissions on the share.
You might need to assign Mailbox Import Export role to Exchange administrator's account, if that has not been done previously.
If the Exchange administrator does not have the Mailbox Import Export role, run the below command, and log on/off of the exchange server so that the role will be applied.
In this example, user is specified using domain name convention, where domain name is WQA1.local
New-ManagementRoleAssignment –Role “Mailbox Import Export” –User wqa1\Administrator
Run New-MailboxExportRequest cmdlet. More information about this cmdlet can be found here http://technet.microsoft.com/en-us/library/ff607299(v=exchg.141).aspx
New-MailboxExportRequest -Mailbox billyrec -FilePath \\exch2010\Recovered.PST\Billy.Recovered.pst
The export process can take some time if the database is large. You can check the progress of export task by piping to two cmdlets: Get-MailboxExportRequest and Get-MailboxExportRequestStatistics
Get-MailboxExportRequest | Get-MailboxExportRequestStatistics
Verify recovered content.
Once you get PST file, you can open it in Outlook to verify recovered content
Perform Cleanup Operations
Once the mailboxes have been recovered, it is a good idea to clean up any unnecessary databases, user accounts, and files.
- Dismount the recovery database and storage group. Delete files from database folders.
- If you used a temporary user for recovery, delete its mailbox and account in Active Directory, along with any associated files, like PSTs.