Exchange ServerHow-to

Restore mail from backup with an Exchange Server recovery database (RDB), step by step

Get a mailbox or a single folder back from backup without touching production: restore the files, bring them to Clean Shutdown, mount an RDB and merge the data.

A user purged a folder weeks ago, or a deleted mailbox is past its retention period, and the only copy left is in a backup. You don't restore over the production database for that. Exchange Server has a recovery database (RDB) for exactly this job. In this post I'll take a restored database from files to mounted RDB, pull out a whole mailbox or just one folder, and clean up afterwards.

Errors this guide fixes

  • State: Dirty Shutdowneseutil /mh (restored database)+2 more guides
  • -528 JET_errMissingLogFileeseutil /r
  • -1216 JET_errAttachedDatabaseMismatcheseutil /r+1 more guide
How this guide is organized: How a recovery database works → Prerequisites → Step-by-step → Verify → Clean up → Tips & gotchasFlow diagram of the article's sections in reading order: 1. How a recovery database works. 2. Prerequisites. 3. Step-by-step (6 steps: Put the files in place and check the header; Run soft recovery; Create the RDB, restart the store and mount it; Find the mailbox inside the RDB; Restore what you need; Watch the request). 4. Verify. 5. Clean up. 6. Tips & gotchas. Toolbox: New-MailboxRestoreRequest, Remove-MailboxDatabase, Get-MailboxDatabase, E01, E00.1How a recovery databaseworks2Prerequisites3Step-by-step1Put the files inplace and che…2Run softrecovery3Create theRDB, restart t…4Find themailbox insid…5Restore whatyou need6Watch therequest4Verify5Clean up6Tips & gotchasTOOLBOXNew-MailboxRestoreRequestRemove-MailboxDatabaseGet-MailboxDatabaseE01E00How this guide is organized: How a recovery database works → Prerequisites → Step-by-step → Verify → Clean up → Tips & gotchasFlow diagram of the article's sections in reading order: 1. How a recovery database works. 2. Prerequisites. 3. Step-by-step (6 steps: Put the files in place and check the header; Run soft recovery; Create the RDB, restart the store and mount it; Find the mailbox inside the RDB; Restore what you need; Watch the request). 4. Verify. 5. Clean up. 6. Tips & gotchas. Toolbox: New-MailboxRestoreRequest, Remove-MailboxDatabase, Get-MailboxDatabase, E01, E00.1How a recovery database works2Prerequisites3Step-by-step1Put the files in place and check the header2Run soft recovery3Create the RDB, restart the store and mount it4Find the mailbox inside the RDB5Restore what you need6Watch the request4Verify5Clean up6Tips & gotchasTOOLBOXNew-MailboxRestoreRequestRemove-MailboxDatabaseGet-MailboxDatabaseE01E00
At a glance: how this guide is organized · 6 steps · 5 key settings and tools

How a recovery database works#

  • An RDB is a special mailbox database you create in the Exchange Management Shell. You mount a restored copy of a database in it and extract data with New-MailboxRestoreRequest, either into an existing mailbox or into a folder of one.
  • It's isolated: mail can't be sent to or from it, Outlook, Outlook on the web and the other client protocols are blocked, and its mailboxes can't be connected to user accounts.
  • Mailbox management policies and online maintenance don't run against it, so nothing gets cleaned up while you work. Circular logging can't be enabled.
  • Only one RDB can be mounted at a time on a Mailbox server. It doesn't count against the server's database limit, and you can't add database copies of it.
  • It works only with databases from Exchange 2016 or later, and the target mailbox must be in the same Active Directory forest.
  • Folder permissions (ACLs) aren't carried over when you restore content into a live mailbox.

Prerequisites#

  • Database and log files from the backup, restored as files to a disk on the server with enough free space. Some backup products restore straight into an RDB. Windows Server Backup can restore only file-level backups to an RDB, not application-level backups.
  • The log prefix of the original database (E00, E01 and so on): Get-MailboxDatabase DB1 | Format-List Name, LogFilePrefix.
  • An admin account with the permissions Microsoft lists for mailbox recovery in the Exchange Server recipient permissions topic.

Step-by-step#

Restoring items through a recovery database, start to finishStep 1: Put the files in place and check the header. Dirty Shutdown is normal for a restored database; it must reach Clean Shutdown. Step 2: Run soft recovery. Use the database's own log prefix; good is State: Clean Shutdown. Step 3: Create the RDB, restart the store, mount it. Restarting the Information Store briefly interrupts every database on that server. Step 4: Find the mailbox inside the RDB. List its mailboxes with their MailboxGuid. Step 5: Restore what you need. A whole mailbox or one folder, under a separate folder so nothing mixes with current mail. Step 6: Watch the request. If corrupt items make it fail, retry with a small -BadItemLimit. Step 7: Clean up. Remove the requests, dismount and remove the RDB, then delete its files yourself.1Put the files inplace and check theheaderDirty Shutdown isnormal for a restoreddatabase; it must reachClean Shutdown.2Run soft recoveryUse the database's ownlog prefix; good is State:Clean Shutdown.3Create the RDB,restart the store,mount itRestarting theInformation Store brieflyinterrupts everydatabase on that server.4Find the mailboxinside the RDBList its mailboxes withtheir MailboxGuid.5Restore what youneedA whole mailbox or onefolder, under a separatefolder so nothing mixeswith current mail.6Watch the requestIf corrupt items make itfail, retry with a small-BadItemLimit.7Clean upRemove the requests,dismount and removethe RDB, then delete itsfiles yourself.Restoring items through a recovery database, start to finishStep 1: Put the files in place and check the header. Dirty Shutdown is normal for a restored database; it must reach Clean Shutdown. Step 2: Run soft recovery. Use the database's own log prefix; good is State: Clean Shutdown. Step 3: Create the RDB, restart the store, mount it. Restarting the Information Store briefly interrupts every database on that server. Step 4: Find the mailbox inside the RDB. List its mailboxes with their MailboxGuid. Step 5: Restore what you need. A whole mailbox or one folder, under a separate folder so nothing mixes with current mail. Step 6: Watch the request. If corrupt items make it fail, retry with a small -BadItemLimit. Step 7: Clean up. Remove the requests, dismount and remove the RDB, then delete its files yourself.1Put the files in place and check the headerDirty Shutdown is normal for a restored database; itmust reach Clean Shutdown.2Run soft recoveryUse the database's own log prefix; good is State: CleanShutdown.3Create the RDB, restart the store, mount itRestarting the Information Store briefly interrupts everydatabase on that server.4Find the mailbox inside the RDBList its mailboxes with their MailboxGuid.5Restore what you needA whole mailbox or one folder, under a separate folderso nothing mixes with current mail.6Watch the requestIf corrupt items make it fail, retry with a small-BadItemLimit.7Clean upRemove the requests, dismount and remove the RDB,then delete its files yourself.
Figure 1 · Process Restoring items through a recovery database, start to finish. Bring the restored files to Clean Shutdown before you mount them, and delete the RDB files when you're done: restored mail is sensitive data.

1. Put the files in place and check the header#

Copy or restore the .edb and its logs into one folder, for example E:\Databases\RDB1. Then dump the header from an elevated prompt (eseutil is in %ExchangeInstallPath%Bin):

Command Prompt
eseutil /mh "E:\Databases\RDB1\DB1.edb"

A restored database almost always reports State: Dirty Shutdown. That's normal here: it has to be brought to Clean Shutdown before it can mount.

2. Run soft recovery#

Command Prompt
eseutil /r E01 /l E:\Databases\RDB1 /d E:\Databases\RDB1

Use your database's log prefix instead of E01. Run eseutil /mh again; good is State: Clean Shutdown. If recovery stops with an error such as -528 JET_errMissingLogFile or -1216 JET_errAttachedDatabaseMismatch, the logs don't match the database: check that every log from the backup set is in the folder, that the prefix is right and that /d points at the folder holding the .edb. My Dirty Shutdown and soft recovery guide goes deeper.

3. Create the RDB, restart the store and mount it#

PowerShell
New-MailboxDatabase -Recovery -Name RDB1 -Server EX01 `
    -EdbFilePath "E:\Databases\RDB1\DB1.edb" -LogFolderPath "E:\Databases\RDB1"

Restart-Service MSExchangeIS
Mount-Database RDB1

Watch out: restarting the Information Store service briefly interrupts every database mounted on that server. Use a server without active copies or a quiet period.

4. Find the mailbox inside the RDB#

PowerShell
Get-MailboxStatistics -Database RDB1 | Sort-Object DisplayName |
    Format-Table DisplayName, MailboxGuid, ItemCount, TotalItemSize -AutoSize

5. Restore what you need#

The whole mailbox, back into the same user's mailbox, under one folder so nothing mixes with current mail:

PowerShell
New-MailboxRestoreRequest -SourceDatabase RDB1 -SourceStoreMailbox 1d20855f-fd54-4681-98e6-e249f7326ddd `
    -TargetMailbox morris@contoso.com -TargetRootFolder "Recovered from backup"

Only the Inbox and its subfolders (the #Inbox# syntax finds the well-known folder whatever its localized name):

PowerShell
New-MailboxRestoreRequest -SourceDatabase RDB1 -SourceStoreMailbox "Morris Cornejo" `
    -TargetMailbox morris@contoso.com -IncludeFolders "#Inbox#/*" -TargetRootFolder "Recovered Inbox"

Into somebody else's mailbox, for example a leaver's data for their manager, add -AllowLegacyDNMismatch. By default the restore checks that the source mailbox's LegacyExchangeDN exists on the target, to stop you restoring into the wrong mailbox. Use -TargetIsArchive to restore into an archive mailbox, and give it a -TargetRootFolder so the content is visible.

If the request fails on corrupt items, retry with a small -BadItemLimit (Microsoft recommends 10 or lower); the default of 0 fails on the first bad item.

6. Watch the request#

PowerShell
Get-MailboxRestoreRequest | Get-MailboxRestoreRequestStatistics |
    Format-Table Name, TargetAlias, StatusDetail, PercentComplete, ItemsTransferred -AutoSize

Verify#

  • The request shows Completed, with no bad or large items skipped that you didn't expect.
  • The target folder exists and holds the expected number of items:
    PowerShell
    Get-MailboxFolderStatistics morris@contoso.com | Where-Object { $_.FolderPath -like "/Recovered*" } |
        Format-Table FolderPath, ItemsInFolder -AutoSize
  • The user opens the mailbox in Outlook or Outlook on the web and confirms the recovered items are there.

Clean up#

PowerShell
Get-MailboxRestoreRequest -Status Completed | Remove-MailboxRestoreRequest -Confirm:$false
Dismount-Database RDB1 -Confirm:$false
Remove-MailboxDatabase RDB1 -Confirm:$false

Remove-MailboxDatabase removes the database object, not the files. Delete the RDB folder yourself once you're sure nothing else is needed, because restored mail is sensitive data sitting outside your normal controls.

Tips & gotchas#

  • Restore into a folder like Recovered from backup rather than merging: users find items faster and you avoid duplicates. The default conflict handling (KeepSourceItem) applies when items match.
  • Restored content arrives without the original folder permissions; re-share folders if needed.
  • A mailbox deleted within the retention period doesn't need a backup at all: see Recover a deleted mailbox in Exchange Server.
  • Plan disk space for the full restored database plus logs, and keep the RDB on a volume separate from production databases.

References#

Written and checked against current Microsoft Learn documentation. Test changes with a pilot group before rolling them out to everyone, and if an admin center path has moved since, search for the setting name instead.

Spotted a mistake, or did this fix work differently for you? Email me or message me on LinkedIn — corrections are credited in the article.

Written by

Omer Eltayeb

M365 Subject Matter Expert, former Microsoft Cloud Solutions Architect, Microsoft Certified Trainer and Microsoft Innovative Educator Expert (2024–26) and Microsoft Elevate Educator Expert (2026–27). I share practical, step-by-step guides, study plans, scripts and toolkits for Microsoft Intune, Configuration Manager, Microsoft Entra ID, Microsoft Defender, Exchange and Microsoft 365 with the community.

Microsoft Certified Trainer (MCT) 2026Microsoft Innovative Educator Expert 2025–2026Microsoft Elevate Educator Expert 2026–2027ISC2 Certified Information Systems Security Professional (CISSP)Microsoft 365 Certified: Enterprise Administrator Expert (MS-102)