We were working on an un-install of software that is intergrated into Exchange. We un-install the software and the mailbox folders that we need had been moved. The only option we had was to restore the Exchange 2010 Mailbox.
The first step is to find your backups. You need the following file extenstions: edb, log, and chk. These files are normally stored in the c:Program FilesMicrosoftExchange ServerV14MailboxMailbox Database XXXXXXXX.
Restore these files to a common directory.
c:Restore
Bringing the Restored Database to a Clean Shutdown State with ESEUtil
The restored database file will be in a state known as “dirty shutdown”. You can confirm this by running the following ESEUtil command, specifying the path to the restored .edb file on your server.
[PS] D:>eseutil /mh 'D:RecoveryD_DataEX201Mailbox Database EX2 01.edb Extensible Storage Engine Utilities for Microsoft(R) Exchange Server Version 14.01 Copyright (C) Microsoft Corporation. All Rights Reserved. Initiating FILE DUMP mode... Database: D:RecoveryD_DataEX201Mailbox Database EX2 01.edb DATABASE HEADER: Checksum Information: Expected Checksum: 0x1d0abd9b Actual Checksum: 0x1d0abd9b Fields: File Type: Database Checksum: 0x1d0abd9b Format ulMagic: 0x89abcdef Engine ulMagic: 0x89abcdef Format ulVersion: 0x620,17 Engine ulVersion: 0x620,17 Created ulVersion: 0x620,17 DB Signature: Create time:12/03/2010 21:20:08 Rand:715244149 Computer: cbDbPage: 32768 dbtime: 21550 (0x542e) State: Dirty Shutdown Log Required: 143-143 (0x8f-0x8f)
Next check the state of the log files with the following ESEUtil command, specifying the path to the restored log files. Note the end of the path is the log file prefix, in this case “E00″.
[PS] D:>eseutil /ml D:RecoveryE_LogsEX201E00 Extensible Storage Engine Utilities for Microsoft(R) Exchange Server Version 14.01 Copyright (C) Microsoft Corporation. All Rights Reserved. Initiating FILE DUMP mode... Verifying log files... Base name: E00 Log file: D:RecoveryE_LogsEX201E000000007B.log - OK Log file: D:RecoveryE_LogsEX201E000000007C.log - OK Log file: D:RecoveryE_LogsEX201E000000007D.log - OK Log file: D:RecoveryE_LogsEX201E000000007E.log - OK Log file: D:RecoveryE_LogsEX201E000000007F.log - OK Log file: D:RecoveryE_LogsEX201E0000000080.log - OK Log file: D:RecoveryE_LogsEX201E0000000081.log - OK Log file: D:RecoveryE_LogsEX201E0000000082.log - OK Log file: D:RecoveryE_LogsEX201E0000000083.log - OK Log file: D:RecoveryE_LogsEX201E0000000084.log - OK Log file: D:RecoveryE_LogsEX201E0000000085.log - OK Log file: D:RecoveryE_LogsEX201E0000000086.log - OK Log file: D:RecoveryE_LogsEX201E0000000087.log - OK Log file: D:RecoveryE_LogsEX201E0000000088.log - OK Log file: D:RecoveryE_LogsEX201E0000000089.log - OK Log file: D:RecoveryE_LogsEX201E000000008A.log - OK Log file: D:RecoveryE_LogsEX201E000000008B.log - OK Log file: D:RecoveryE_LogsEX201E000000008C.log - OK Log file: D:RecoveryE_LogsEX201E000000008D.log - OK Log file: D:RecoveryE_LogsEX201E000000008E.log - OK Log file: D:RecoveryE_LogsEX201E000000008F.log - OK Log file: D:RecoveryE_LogsEX201E0000000090.log - OK No damaged log files were found. Operation completed successfully in 0.922 seconds.
Now we can run ESEUtil in recovery mode to bring the database into a clean shutdown state.
[PS] D:>eseutil /r E00 /i /l D:RecoveryE_LogsEX201 /d 'D:RecoveryD_DataEX201Mailbox Database EX2 01.edb' Extensible Storage Engine Utilities for Microsoft(R) Exchange Server Version 14.01 Copyright (C) Microsoft Corporation. All Rights Reserved. Initiating RECOVERY mode... Logfile base name: E00 Log files: D:RecoveryE_LogsEX201 System files: Database Directory: D:RecoveryD_DataEX201Mailbox Database EX2 01.edb Performing soft recovery... Restore Status (% complete) 0 10 20 30 40 50 60 70 80 90 100 |----|----|----|----|----|----|----|----|----|----| ................................................... Operation completed successfully in 0.985 seconds.
Now run ESEUtil to check the database state again.
[PS] D:>eseutil /mh 'D:RecoveryD_DataEX201Mailbox Database EX2 01.edb' | findstr "State:" State: Clean Shutdown
Note: if the database is still in a dirty shutdown state you can try a repair using ESEUtil /p instead.
[PS] D:>eseutil /p 'D:RecoveryD_DataEX201Mailbox Database EX2 01.edb' Extensible Storage Engine Utilities for Microsoft(R) Exchange Server Version 14.01 Copyright (C) Microsoft Corporation. All Rights Reserved. Initiating REPAIR mode... Database: .Mailbox Database EX2 01.edb Temp. Database: TEMPREPAIR1492.EDB Checking database integrity. The database is not up-to-date. This operation may find that this database is corrupt because data from the log files has yet to be placed in the database. To ensure the database is up-to-date please use the 'Recovery' operation. Scanning Status (% complete) 0 10 20 30 40 50 60 70 80 90 100 |----|----|----|----|----|----|----|----|----|----| ................................................... Integrity check successful. Note: It is recommended that you immediately perform a full backup of this database. If you restore a backup made before the repair, the database will be rolled back to the state it was in at the time of that backup. Operation completed successfully in 3.547 seconds.
Creating an Exchange Server 2010 Recovery Database
The next stage of the recovery process is creating the Recovery Database. Launch the Exchange Management Shell. Run the New-MailboxDatabase cmdlet with the following parameters:
- -Recovery:$true (specifies that the database will be a Recovery Database)
- -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)
In this example the following command is run.
[PS] D:>New-MailboxDatabase RecoveryDB -Server EX2 -Recovery:$true -EdbFilePath 'D:RecoveryD_DataEX201Mailbox Database EX2 01.edb' -LogFolderPath 'D:RecoveryE_LogsEX201-RecoveryDB' WARNING: Recovery database 'RecoveryDB' was created using existing file D:RecoveryD_DataEX201Mailbox Database EX2 01.edb. The database must be brought into a clean shutdown state before it can be mounted. Name Server Recovery ReplicationType ---- ------ -------- --------------- RecoveryDB EX2 True None
Note the warning about the database not being in a clean shutdown state. Since we’ve already brought the database to a clean shutdown state we can now mount the recovery database.
[PS] D:>Mount-Database RecoveryDB
Restoring Mailbox Items from a Recovery Database
With the recovery database mounted we can now proceed with mailbox item restores. You can see the available items to restore by looking at the mailbox statistics for the recovery database.
[PS] D:>Get-MailboxStatistics -Database RecoveryDB DisplayName ItemCount StorageLimitStatus ----------- --------- ------------------ Alex Heyne 11 BelowLimit SystemMailbox{f13446dd... 1 BelowLimit
To restore all mailbox items into a sub-folder of the existing mailbox so that they can be inspected use the following command.
[PS] D:>Restore-Mailbox -Identity "Alex Heyne" -RecoveryDatabase RecoveryDB -RecoveryMailbox "Alex Heyne" -TargetFolder Restore Confirm Are you sure you want to perform this action? Recovering mailbox content from mailbox 'Alex Heyne' in the recovery database 'RecoveryDB' to the mailbox for 'Alex Heyne (Alex.Heyne@exchangeserverpro.net)'. This operation may take a long time to complete. [Y] Yes [A] Yes to All [N] No [L] No to All [?] Help (default is "Y"): y
The restored items will now be visible in the mailbox.
From OWA you can move the folder/files to where they are needed.
Part of the post was taken from Exchangeserverpro.com @ http://exchangeserverpro.com/restore-individual-mailbox-exchange-2010/