Quick Guide: How to recover a mailbox data using Recovery Database – Exchange 2010

  1. Restore the EDB and Log files from Backup.
  2. Check the database status using ESEUTIL utility

Command : Eseutil /mh “Recovered database path”

  1. If the Database is in dirty shutdown then check if the required logs files are ok

Command : Eseutil /ml “<log folder path\baselog”

Ex: eseutil /ml “X:\SRV01-DB04\_restoredLogs\e04”

  1. If the above command show all log files are ok, the perform the soft recovery
  2. Command to perform the soft recovery

Command: Eseutil /r <base log file)> /l “<restored Log folder path> /d “<database path>

Ex: Eseutil /r e04 /l ” X:\SRV01-DB04\_restoredLogs” /d ” X:\SRV01-DB04\SRV01-DB04.edb”

  1. After performing the soft recovery, check the database status again by running the command given in step 2
  2. If the database status is in “Clean Shutdown” and log required shows 0-0, then we can go ahead and create the recovery database.
  3. Command to create recovery database

New-mailboxdatabase –recovery –name <RDB-name> -server <server name on which RDB has to be created> -edbfilepath <recovered DB path> -logfolderpath <recovered log folder path>

Ex: New-mailboxdatabase -recovery -name RDB-SRV01DB04  -server SRV01 -edbfilepath ” X:\SRV01-DB04\SRV01-DB04.edb” -logfolderpath “” X:\SRV01-DB04\_restoredLogs”

  1. The above command will create the Recovery database and will give below warning

WARNING: Recovery database ‘<RDB name>’ was created using existing file <EDB file path>. The database must be brought into a clean shutdown state before it can be mounted.

And it will show the RDB is created.

  1. As we have already brought the database in clean shutdown state in step 7, we can mount the RDB now.
  2. Command to mount the RDB: mount-database <RDBname>

Ex: Mount-Database RDB-SRV01DB04

  1. If database is successfully mounted, then we can get the list of all the mailboxes in the RDB by using below command

Command: Get-MailboxStatistics -Database <RDB name>|sort displayname

Ex: Get-MailboxStatistics -Database RDB-SRV01DB04  | sort displayname

  1. If the user whose data we are trying to restore is listed there then we can merge the data to user mailbox directly or restore the data to an alternate mailbox and export the data in a PST and provide to user.
  2. If the user is not listed by using the command in step 12, we can also check “soft deleted” mailboxes in RDB

Command:  Get-MailboxStatistics -Database <RDB Name>|?{ $_.DisconnectReason -eq “SoftDeleted” }|sort displayname

Ex: Get-MailboxStatistics -Database RDB-SRV01DB04 |?{ $_.DisconnectReason -eq “SoftDeleted” }|sort displayname

  1. If the user whose data we are trying to restore is listed there then we can merge the data to user mailbox directly or restore the data to an alternate mailbox and export the data in a PST and provide to user.
  2. Command to restore the data from disconnected or softdeleted mailbox to an alternate mailbox

Command: New-MailboxRestoreRequest  -name <RESTORE NAME> -SourceDatabase <RDBname> -SourceStoreMailbox ‘User display name’ -TargetMailbox “mailbox restore” -TargetRootFolder Restore_useralias -AllowLegacyDNMismatch

 

Parameters used in the previous command:

  1. –Sourcemailbox – we need to provide the user display name which we gathered in step 12/14
  2. –Targetmailbox – this should be the name of a mailbox to which we will restore the user data
  3. –Targetroot folder – this is an important switch which creates a separate folder in the target mailbox under which user data will be restored.
  4. –AllowlegacyDNMismatch – if we are restoring the user mailbox to an alternate mailbox, this switch will allow overriding of verifying the legacyExchangeDN of the source and target mailbox.
  5. Once we run the command in step 16, a restore request will be queued. We can check the progress of restore by using below command

Get-mailboxrestorerequest

  1. Once the restore process is complete, we can open the restore mailbox in outlook and export the data from restored folder to PST.
  2. On confirmation from user, recovery database can be removed and corresponding EDB and log files can be deleted.