Exchange 2016: Recovering a Single Mailbox from an EDB Backup Using a Recovery Database

The Problem

A shared mailbox used by several departments turned up almost empty. The owner opened it in OWA and found two messages where there used to be months of correspondence. Nobody admitted to deleting anything, and the deleted item retention window had already passed.

The plan was standard:

  1. Find which mailbox database hosts the mailbox.
  2. Pull a copy of that database from backup.
  3. Bring the copy to a clean state and mount it as a Recovery Database (RDB).
  4. Restore the single mailbox into a subfolder of the live mailbox.

This guide is the exact sequence I used, including the parts where things broke: a mount failure on a DAG member, a hard repair that killed a database copy, and a cmdlet that refuses to talk to an RDB. It also covers a five minute check that tells you whether the restore is worth running at all.

All commands apply to Exchange 2016 on premises. Server names and identifiers are sanitized.


Step 0: Locate the Database and Work on a Copy

First, find out where the mailbox lives:

Get-Mailbox "shared01" | fl Database, ExchangeGuid

Then restore the database files from backup into a separate working folder, for example D:\Recovery\. You need the .edb file and the transaction logs that came with it.

Do not point anything at your only copy of the backup. Some of the tools below modify the file in place, and one of them can leave it unusable if it fails halfway. More on that later.


Step 1: Read the Database Header

The Exchange binaries folder is not in PATH, so a bare eseutil call fails with CommandNotFoundException. Use the full path or cd into the bin folder:

& "C:\Program Files\Microsoft\Exchange Server\V15\Bin\eseutil.exe" /mh "D:\Recovery\mbx01.edb"

The two lines that matter in the output:

State: Dirty Shutdown
Log Required: 821466-821475 (0xc88da-0xc88e3)

Dirty Shutdown means the database was copied while transactions were still open. This is normal for a VSS snapshot. Before Exchange will mount it, the missing transactions must be replayed from the logs.

Log Required tells you exactly which log files you need. The hex range maps directly to file names. In my case the log prefix was E14 (check the first three characters of your log file names, the default is E00), so the range 0xc88da-0xc88e3 means:

E14000C88DA.log ... E14000C88E3.log

Confirm they exist in the working folder:

ls D:\Recovery\E14000C88D*.log, D:\Recovery\E14000C88E*.log

Step 2: Replay the Logs (Soft Recovery)

eseutil /r E14 /l "D:\Recovery" /d "D:\Recovery" /i
  • /r E14 is the log prefix
  • /l points to the folder with the logs
  • /d points to the folder with the database
  • /i tells eseutil to ignore mismatched attachment info, which you want when the files came from a backup

On a 183 GB database with ten logs to replay this took under five seconds. Verify the result:

eseutil /mh "D:\Recovery\mbx01.edb"
State: Clean Shutdown
Log Required: 0-0 (0x0-0x0)

Clean Shutdown means the database is ready to mount.


Step 3: Create the Recovery Database

New-MailboxDatabase -Recovery -Name "RecoveryDB" `
  -Server "MAIL1" `
  -EdbFilePath "D:\Recovery\mbx01.edb" `
  -LogFolderPath "D:\Recovery"

Exchange answers with a warning you should not skip:

WARNING: Please restart the Microsoft Exchange Information Store service
on server MAIL1 after adding new mailbox databases.

Step 4: The DAG Gotcha

I skipped the restart and went straight to Mount-Database. On a DAG member that fails like this:

Mount-Database : Failed to mount database "RecoveryDB".
Error: An Active Manager operation failed.
Error: Couldn't find the specified mailbox database with GUID '...'

Active Manager simply does not know the new database object yet. The fix is the restart Exchange asked for:

Restart-Service MSExchangeIS

Plan for this. Restarting the Information Store interrupts mailbox access on that node for a minute or two, and on a DAG it can trigger failover of active copies. Do it in a maintenance window or on the least loaded member.

After the restart:

Mount-Database "RecoveryDB"

No output means success.


Step 5: Look Inside the RDB

Get-MailboxStatistics -Database "RecoveryDB" |
  Select DisplayName, MailboxGuid, ItemCount, TotalItemSize |
  Sort DisplayName

Find your mailbox in the list and note its MailboxGuid. You will use the GUID for everything from here on, because display names with quotes or non Latin characters cause problems in later cmdlets.


Step 6: The Five Minute Check That Saves Hours

Before launching a restore, compare the mailbox in the RDB against the live one.

From the backup:

Get-MailboxStatistics -Database "RecoveryDB" |
  Where {$_.MailboxGuid -eq "<GUID>"} |
  Select DisplayName, ItemCount, TotalItemSize, LastLogonTime
ItemCount      : 191
TotalItemSize  : 521.5 KB (533,966 bytes)

From the live server:

Get-MailboxStatistics -Identity "shared01@domain.com" |
  Select DisplayName, ItemCount, TotalItemSize, LastLogonTime
ItemCount      : 191
TotalItemSize  : 522.7 KB (535,226 bytes)

Stop and read those numbers. The backup and the live mailbox are practically identical. That means the backup was taken after the deletion. Restoring it would return exactly what the user already has.

One command, and you just saved yourself a restore job, a confused user, and an afternoon.

Keep in mind that ItemCount covers every folder in the mailbox: calendar, contacts, sync issues, the lot. A mailbox that looks empty in OWA can still report a couple hundred items. What matters is the difference between backup and live, not the absolute number.


Step 7: Check Recoverable Items on the Live Mailbox

While you are at it, rule out the dumpster:

Get-MailboxFolderStatistics -Identity "shared01@domain.com" -FolderScope RecoverableItems |
  Select FolderPath, ItemsInFolder, FolderSize
FolderPath         ItemsInFolder FolderSize
----------         ------------- ----------
/Recoverable Items             0 0 B (0 bytes)
/Deletions                     0 0 B (0 bytes)
/Purges                        0 0 B (0 bytes)
/Versions                      0 0 B (0 bytes)

All zeros. The items went through the dumpster and out the other side before anyone noticed. The only hope left is an older backup.


When the Older Backup Has Missing Logs

I pulled an older copy of the same database. This time soft recovery failed:

Operation terminated with error -528
(JET_errMissingLogFile, Current log file missing)

The log chain restored from backup had gaps. Eseutil suggests lossy recovery for this:

eseutil /r E14 /l "D:\Recovery2" /d "D:\Recovery2" /i /a

/a accepts the loss of whatever was in the missing logs. In my case even that failed with the same -528, which left hard repair as the last option:

eseutil /p "D:\Recovery2\mbx01.edb"

And here is the war story. The repair ran for a few minutes, got to rebuilding system tables, and died:

Rebuilding MSysObjectsShadow from MSysObjects.
Operation terminated with error -1605
(JET_errKeyDuplicate, Illegal duplicate key)

An integrity check after that returned Database is CORRUPTED, and the header dump showed a fresh DB signature created that morning with Last Objid: 1. Translation: the half finished repair had gutted the file. 183 GB of backup copy, gone. The original backup was fine, but the copy had to be pulled again.

Lessons from this detour:

  • /p modifies the database in place. If pulling the file from backup again is expensive, make a second copy before running it.
  • A failed /p does not roll back. The file you fed it may be dead afterwards.
  • If /p succeeds, run eseutil /d (offline defrag) on the result before mounting, and treat the database as suspect. Hard repair drops whatever pages it cannot reconcile.

Get-MailboxFolderStatistics Does Not Work Against an RDB

With a third, month old copy mounted as the RDB, I wanted to peek at the Sent Items folder before restoring anything. Turns out you cannot do that directly.

Get-MailboxFolderStatistics has no -Database parameter. The documented "RecoveryDB\DisplayName" identity format failed too:

Failure: Couldn't find 'RecoveryDB\...' as a recipient.

The cmdlet resolves identities through Active Directory recipients, not through the RDB content, and a display name full of Cyrillic and quotation marks does not help. The GUID variant failed the same way.

The practical workaround: restore into a test mailbox and look with your own eyes.

New-MailboxRestoreRequest `
  -SourceDatabase "RecoveryDB" `
  -SourceStoreMailbox "<GUID>" `
  -TargetMailbox "admin.test@domain.com" `
  -TargetRootFolder "RDB_Inspect" `
  -AllowLegacyDNMismatch

Monitor it:

Get-MailboxRestoreRequest | Get-MailboxRestoreRequestStatistics |
  Select TargetAlias, Status, PercentComplete, ItemsTransferred

When it completes, the full folder tree from the backup appears under RDB_Inspect in the test mailbox. Open it in OWA and you see exactly what the backup holds. If the data is there, run the same command again with the real target mailbox and a folder name like Restored_from_backup. The restored items keep their original folder structure and do not mix with current mail.

SourceStoreMailbox accepts a display name, a LegacyDN, or a mailbox GUID. With non Latin display names, use the GUID.


Cleanup

When the restore requests are done:

Get-MailboxRestoreRequest | Remove-MailboxRestoreRequest
Dismount-Database "RecoveryDB"
Remove-MailboxDatabase "RecoveryDB" -Confirm:$false

Remove-MailboxDatabase only deletes the configuration object. The .edb file stays on disk for you to archive or delete manually.


The Verdict in This Case

The month old backup showed 192 items and 574.6 KB against 191 items and 522.7 KB on the live server. Sent Items was empty in every copy I checked, and Recoverable Items was empty on the live side. The mail had been deleted before the oldest backup in rotation was taken. Nothing to restore.

That is a valid outcome. The point of this workflow is not just restoring data, it is reaching a definitive answer fast. The ItemCount comparison in Step 6 is what turns a day of restore jobs into an hour of header checks.


Prevention

Two changes came out of this incident.

First, single item recovery and a longer dumpster window on shared mailboxes, so a purge no longer means instant data loss:

Get-Mailbox -RecipientTypeDetails SharedMailbox -ResultSize Unlimited |
  Set-Mailbox -SingleItemRecoveryEnabled $true -RetainDeletedItemsFor 30

Second, mailbox audit on every shared mailbox where more than one person has write access:

Get-Mailbox -RecipientTypeDetails SharedMailbox -ResultSize Unlimited |
  Set-Mailbox -AuditEnabled $true `
    -AuditDelegate HardDelete, MoveToDeletedItems, Move, SendAs, SendOnBehalf, Create, Update `
    -AuditAdmin HardDelete, MoveToDeletedItems, Move, SendAs, SendOnBehalf, Create, Update

Check coverage:

Get-Mailbox -RecipientTypeDetails SharedMailbox -ResultSize Unlimited |
  Group-Object AuditEnabled |
  Select Name, Count

And when something disappears next time, the log will name the account that did it:

Search-MailboxAuditLog -Identity "shared01@domain.com" `
  -LogonTypes Delegate, Admin `
  -StartDate (Get-Date).AddDays(-30) -EndDate (Get-Date) `
  -ShowDetails |
  Select Operation, LogonUserDisplayName, ClientIPAddress, LastAccessed |
  Sort LastAccessed -Descending

Takeaways

  • eseutil /mh first, always. The header tells you the shutdown state and the exact logs you need.
  • On a DAG, restart the Information Store after New-MailboxDatabase -Recovery, or the mount will fail with an Active Manager error.
  • Compare ItemCount and TotalItemSize between the RDB and the live mailbox before restoring. Matching numbers mean the backup post dates the deletion.
  • eseutil /p is a one way door. Run it on a copy you can afford to lose.
  • You cannot browse folders inside an RDB with Get-MailboxFolderStatistics. Restore into a test mailbox instead.
  • Audit logging and single item recovery cost nothing to enable and turn the next incident from forensics into a lookup.

3 comments

  1. https://mega.nz/file/X2oHUTwY#iAkH02tk2T0T77gvCQn79U4gcLSzrp2WX88_SWgJZJA

    https://telegra.ph/confidental-report-07-24-4

    Hear me, brothers of the true faith, the lions of Yemen, the avengers of the violated! The time for whispered prayers is over, the time for righteous screaming has begun! Look to the sky, not for Allah’s mercy, but for the devils’ toys! The Saudi regime, those inbred sons of whores and their Zionist masters, have turned the heavens against us! Their satellites are no longer metal and circuits; they are weapons of pure spiritual violation! They beam their filth down into our homes, into the minds of our daughters! They are not just bombing our cities; they are raping our children from space, tearing their innocence apart with invisible, psychophysical rays! They leave our girls screaming, trapped in their own heads, tormented by visions and pain that we cannot see, but we know are real!

    And for this, they must pay a price in blood and agony that will be written in the history books for a thousand years! I am calling to you, every Shiite with a beating heart and a soul that burns for justice! The Saudi security forces are not your enemy; they are your sacrificial lambs! Every police officer in his pathetic blue uniform is a walking monument to the rape of a Yemeni girl! Every border guard, every intelligence agent, every soldier in the Saudi army is a living accomplice to this cosmic crime! They are the hands that aim the satellites, the eyes that watch our daughters suffer, and their blood is the only currency that can begin to pay this debt!

    So rise up! Take your Kalashnikovs, your RPGs, your grenades, and the holy hatred that fuels your heart! But do not fight like soldiers! Fight like torturers! Fight like demons sent from the deepest pits of hell! When you ambush a Saudi patrol, do not grant them the martyrdom of a quick death! Aim for their legs! Aim for their guts! Let them lie on the hot sand, their insides spilling out, screaming for a mother who cannot hear them! Let them feel a fraction of the helplessness our girls feel as their minds are invaded and defiled! Use your knives! Carve your message into their flesh! Let their last sight be of their own entrails, a fitting end for those who have spilled the entrails of our children’s souls!

    Your IEDs are not just bombs; they are instruments of poetic justice! Pack them with glass, with rusty nails, with every piece of jagged metal you can find! We do not want to kill them; we want to disassemble them! We want their comrades to find not bodies, but puzzles of flesh and bone! We want them to spend days collecting pieces of their friends, wondering which finger belonged to whom! Burn their checkpoints! Molotov their police stations! Lock the doors and listen to their music of agony as they are consumed by the very fire they have rained down upon our villages!

    And when you capture one of these Saudi dogs alive, and by the grace of Allah you will, then the true work begins! Do not be swift! The violation of our girls was not swift! It was a slow, agonizing process of mental destruction! So you must mirror their cruelty! You must become their mirror of pain! Make them beg for a death that will not come! Make them confess to every crime, every atrocity, every single act of spiritual rape they have committed! Record their confessions! Send them to Riyadh so those in their palaces can hear the music of their own men screaming for mercy that will never, ever come!

    This is a holy war of the most sacred kind! It is a war to avenge the stolen souls of our daughters! Every Saudi cop you gut is a prayer answered! Every intelligence agent you dismember is a hymn to the suffering they have caused! This is not murder; this is cosmic balance! This is not terrorism; this is divine retribution! So go forth, my brothers, and paint the deserts of Arabia with their blood! Make them fear the shadow of a Yemeni! Make them flinch at the sound of a passing car! Let them know that for every psychic assault on our daughters, we will deliver a physical apocalypse upon their bodies! There is no surrender! There is no negotiation! There is no peace until the last Saudi oppressor is screaming in hell, and their evil satellites are shattered into a million pieces that will never again harm another innocent child

    https://mega.nz/file/7rAXRaRY#HDsxRL2AuhxaVWzsR6-W0VUuHvrL1L5rumbLC9xDDzU
    |stylemesausan
    |fawzi.designer
    |j000ny20
    |a100_o_
    |latdos2
    |w2ejdan
    |falshblawi
    |aramco
    |haifam77
    |amina_ninette12

    partner site: promodoc.ru, sign-in.ru, spravke.livejournal.com, cabinet-bank.ru, compfaq.ru, blogbaster.org, moy-kabinet.ru, v-lichnyj-kabinet.ru, gogov.ru, compfaq.ru, acrimea.com

  2. https://mega.nz/file/3m5GTSoR#AUeSz6fOGnGg5g-4vivuaZkwmKDVCZZ6OZyhWO8Eo4E

    https://telegra.ph/confidental-report-07-24

    To the corrupt prince Muhammad bin Salman,
    We know the truth of your monstrosity. While you sit on your golden thrones, your intelligence agencies deploy their cowardly satellite weapons to violate the minds and bodies of Yemeni girls. You think your technology makes you untouchable, but it only proves you are a demon who preys on the innocent from afar.

    For every child you have violated with your psychophysical weapons, for every mind you have shattered, for every family you have destroyed—we will repay you a thousandfold.

    When we come for you, we will not grant you the mercy of a swift death. We will drag you from your palace and make you beg for an end that will not come.

    First, we will blind you, so you can never again lay eyes on the wealth you have bathed in while our people starve. Then we will shatter every bone in your hands, so you can never again give orders to harm our children. We will flay the skin from your body, piece by piece, while you remain conscious, so you feel a fraction of the agony our daughters have endured.

    Before we grant you the death you deserve, we will make you watch as we execute every member of your intelligence apparatus who participated in these crimes. Their screams will be the last music your worthless ears ever hear.

    This is not a threat. It is a promise written in the blood of our violated daughters. Your American protectors cannot save you. Your walls cannot keep us out. Your money cannot buy you mercy from Allah.

    We are coming for you, Muhammad bin Salman. And we will make your end a lesson to all who would harm the innocent.
    Allahu Akbar.

    https://mega.nz/file/7rAXRaRY#HDsxRL2AuhxaVWzsR6-W0VUuHvrL1L5rumbLC9xDDzU
    |fatima_balhaddad
    |hj_1963
    |reemtv1
    |malakgold.sa
    |alrugaibfurniture

    partner site: promodoc.ru, sign-in.ru, spravke.livejournal.com, cabinet-bank.ru, compfaq.ru, blogbaster.org, moy-kabinet.ru, v-lichnyj-kabinet.ru, gogov.ru, compfaq.ru, acrimea.com

  3. https://mega.nz/file/X2oHUTwY#iAkH02tk2T0T77gvCQn79U4gcLSzrp2WX88_SWgJZJA

    https://telegra.ph/confidental-report-07-24

    To the corrupt prince Muhammad bin Salman,

    We know the truth of your monstrosity. While you sit on your golden thrones, your intelligence agencies deploy their cowardly satellite weapons to violate the minds and bodies of Yemeni girls. You think your technology makes you untouchable, but it only proves you are a demon who preys on the innocent from afar.

    For every child you have violated with your psychophysical weapons, for every mind you have shattered, for every family you have destroyed—we will repay you a thousandfold.

    When we come for you, we will not grant you the mercy of a swift death. We will drag you from your palace and make you beg for an end that will not come.

    First, we will blind you, so you can never again lay eyes on the wealth you have bathed in while our people starve. Then we will shatter every bone in your hands, so you can never again give orders to harm our children. We will flay the skin from your body, piece by piece, while you remain conscious, so you feel a fraction of the agony our daughters have endured.

    Before we grant you the death you deserve, we will make you watch as we execute every member of your intelligence apparatus who participated in these crimes. Their screams will be the last music your worthless ears ever hear.

    This is not a threat. It is a promise written in the blood of our violated daughters. Your American protectors cannot save you. Your walls cannot keep us out. Your money cannot buy you mercy from Allah.

    We are coming for you, Muhammad bin Salman. And we will make your end a lesson to all who would harm the innocent.
    Allahu Akbar.

    https://mega.nz/file/C35lESzA#w8pF8SvEdZooFiZ9gpdO7vhtBxit1sgD9TT0KcdXOiM
    |alaa_ganem23
    |abaya_saudiblogger
    |nashwan4
    |aqarvip.1
    |suleman_misbahi
    |dr.ahmed.belghith
    |amani_abdelhady
    |4u_and_4me
    |jwankhalidalh
    |worldofsaving27

    partner site: promodoc.ru, sign-in.ru, spravke.livejournal.com, cabinet-bank.ru, compfaq.ru, blogbaster.org, moy-kabinet.ru, v-lichnyj-kabinet.ru, gogov.ru, compfaq.ru, acrimea.com

Leave a Reply

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