Home » Exchange Server » Restoring a Mailbox from an Exchange Server 2013 Recovery Database

Restoring a Mailbox from an Exchange Server 2013 Recovery Database

In recent articles we’ve looked at how to backup an Exchange 2013 mailbox server, how to restore databases to an Exchange 2013 mailbox server, and how to create a recovery database in Exchange 2013.

In this article I will demonstrate how to use the recovery database to restore data to a mailbox.

Obviously the first step in this process is to restore the database that has the data you’re interested in into a recovery database. You can find the steps for performing that task using Windows Server Backup here.

Here is my recovery database ready to go.

The mailbox I need to restore is Alan Reid, and I can verify that the mailbox is available in the recovery database by using Get-MailboxStatistics.

Restoring from a recovery database involves creating a mailbox restore request, using the New-MailboxRestoreRequest cmdlet.

New-MailboxRestoreRequest requires you to specify:

  • A source database (in this case, the recovery database)
  • A source mailbox
  • A target mailbox

The source and target don’t necessarily need to be the same, and there are a variety of other parameters available to handle situations such as including/excluding specific mailbox folders, handling corrupt items, conflict resolution, and so on.

Let’s take a look at some recovery scenarios to demonstrate how you can use mailbox restore request.

Scenario – Restoring Sent Items Folder

In this scenario Alan Reid has lost all of this sent items older than 3 weeks, and for the sake of demonstration let’s also assume they can’t be restored from the recoverable items folder.

exchange-2013-mailbox-restore-scenario-1-01

At the moment he has 869 items in his sent items folder.

To restore the sent items folder from the recovery database we create a mailbox restore request.

Monitoring the Mailbox Restore Request

Notice that the mailbox restore request is created initially with a status of “Queued”. We can monitor the progress of the restore request using Get-MailboxRestoreRequest and Get-MailboxRestoreRequestStatistics.

While the restore is in progress you might be interested to know the percent completed, and the numbers of items transferred so far compared to how many are estimated to be transferred in total.

When the restore has finished the status will change to “Completed”.

After the restore Alan Reid’s sent items folder has a much larger item count.

Note: The default behaviour for conflict resolution is to keep the source item (ie the item being restored from the recovery database). You can use the -ConflictResolutionOption parameter to specify KeepLatestItem or KeepAll instead if you wish.

Scenario – Restoring Entire Mailbox

In this example a staff member has left the organization some months or years ago, then been re-hired, and wants their old emails, contacts, and calendar items back. Because the mailbox was deleted when they left the organization their new mailbox is empty on arrival.

A recovery database is created from a backup taken while the original mailbox still existed.

A new mailbox restore request is used to restore the entire mailbox contents from the recovery database. Because the LegacyExchangeDN is different for the new mailbox an additional -AllowLegacyDNMisMatch parameter is required to allow the restore to occur. This would be the same situation if you were trying to restore a person’s mailbox data into a complete different person’s mailbox.

When the restore is complete Ann Parker’s mailbox has the recovered items in it.

Scenario – Restoring to a Different Folder

In this example David Abbott knows he has lost some emails but isn’t sure exactly what or when. He has asked that his Inbox be restored to a different folder so that he can look through it and recover any items he finds in there that he needs.

A new mailbox restore request is created using the -TargetRootFolder parameter to specify where to recover the items to, and including only the Inbox and any subfolders of the Inbox.

David will be able to see the folder in Outlook or OWA almost as soon as the restore request begins processing.

exchange-2013-mailbox-restore-scenario-3-01

Cleaning Up Mailbox Restore Requests

You may notice that completed mailbox restore requests are left in place and are not automatically removed. This is so you can do any analysis or reporting you need to do on them before they are removed.

When you are happy to remove the completed mailbox restore requests you can use Remove-MailboxRestoreRequest.

Summary

Restoring mailbox items from a recovery database involves the creation of mailbox restore requests. As you can see from the example scenarios above there are many different ways that the mailbox restore request can be configured to run to suit almost any situation that you encounter.

Paul is a Microsoft MVP for Office Servers and Services. He works as a consultant, writer, and trainer specializing in Office 365 and Exchange Server. Paul is a co-author of Office 365 for IT Pros and several other books, and is also a Pluralsight author.
Category: Exchange Server

27 comments

  1. JC says:

    Quick question, I have the Exchange 2010 mbx in a netapp iscsi lun but want to move that data over to an nfs drive instead. Is that possible and do you know of any helpful best practices or docs I can use to get a better understanding on how to do this. I can’t seem to find anything relevant.

    Thank you!

    JC

  2. Greg says:

    Paul – Great articles on how to create a 2013 Recovery Database and how to recover items from the Recovery Database back into Production. We’ve used these today to successfully recover 3 mailboxes today – thanks very much!
    So to cleanup my server, just dismount the Recovery DB and delete the 2 folders I created??
    Cheers

  3. Tiscy says:

    Hi Paul,

    great Article, many thanks.
    I am not following your Guide to restore an example Mailbox (with 10 items).
    I used the command, to recover the whole Mailbox into a different Folder, called “Recovered”
    The command executed successfully, but it remains in “Queued” Status, with the percentage of 0.
    SO it does not start.. why could that happen?
    Any possibility to force the start of check the logs?

  4. Mike says:

    How to Exclude multiple folders? Say I want to exclude Contacts and JunkEmails.
    Should I do it this way: -ExcludeFolders “Contacts/*,JunkEmails/*”?

    • Real Dore says:

      After many trials, this worked for me:

      -excludefolders “#Inbox,SentITems,DeletedItems#”

      I did not try the -includefolders, but I would expect this would work as well.

      Real

  5. saurabh sharma says:

    Hi , i have a question .
    we we want to recover the archive of the soft deleted mailbox ,

    then could be use the below command

    New-mailboxrestorerequest -sourcemailbox -SourceisArchive -Targetmailbox -targetisarchive

  6. Kent R. Nilsen says:

    Hello,

    I accidentally deleted a user 3 days too early, and need to restore it. But this returns an error:

    New-MailboxRestoreRequest -SourceDatabase MailboxDB -SourceStoreMailbox d6ee629c-9543-443d-a6fc -22cf1b7b7ad9 -TargetMailbox workers.name -AllowLegacyDNMismatch

    This returns the following error, though the user has been created in AD:

    The operation couldn’t be performed because object ‘workers.name’ couldn’t be found on ‘domaincontroller.ourdomain.com’.

    Any ideas what I’m doing wrong?

  7. Frank says:

    Hi Paul, this is a great article. I came across it when searching for ” restore data exchange 2013 calendar resource “, as I need o restore calendar appointments from a shared calendar that disappeared. I’m hoping this will allow me to restore that, I’ll post back. Thanks

  8. Bianca says:

    Just one question, how do I prevent reminders for old calendar items when restoring to an online mailbox? I assume exclude folder Recoverable Items (perhaps Recoverable ItemsCalendar logging), but all my test have failed.

    Thanks !

  9. Tamer says:

    Hi Paul,
    Nice article.

    Can I use a passive copy of a DAG to extract mailboxes to PSTs files?

    Ex. I have active database on Srv1 replicated to Srv2(remote location),
    Can I extract the mailboxes from the passive copy on Srv2?

  10. Castelo says:

    please i have question , i wanna to restore Mailbox dc2 but it give me at last

    “Mailbox ‘dc2’ is a connected mailbox. Only soft-deleted and disabled mailboxes can be restored.”

  11. Alex says:

    A user have

    Inbox – 9000 emails
    InboxPM – 50 emails
    InboxPM2 – 20 emails
    InboxPM3 – 10 emails
    etc etc etc

    How I can recover only subfolders and not the Inbox content?

    I mean: I don’t need the 9000 emails from Inbox, only the 50 + 20 + 10 from the PM folders.

    Can I exclude INBOX and include PM subfolders? Can I use wildcards?

  12. Matt Hall says:

    I have a user that had various email removed from various folders. I want to restore all of her email from the night of a backup without interrupting the mail she has received since the backup.

    When I restore the data from previous date does it simply merge in the emails they deleted on accident from various folders, or will it replace the mailbox and all emails it received prior. My gut says merge, but don’t want to find out the hard way.

  13. Otmane says:

    Hello,

    Great article thank you, I have a question, my users allways create subfolder so they can do some classification of the email. It happen tha we lost one of those folders. is there a way to recover a specific folder inside the mailbox.

    Thank you

Leave a Reply

Your email address will not be published. Required fields are marked *