Exchange 2010 database recovery
This article outline’s the steps to restore an exchange database in Exchange 2010, christened Recovery Database for DAG.
1. Create 2 folders:
- Database –> D:\Recovery\Database
- Transaction Logs –> D:\Recovery\Logs
2. Now restore the database which is to be recovered and the subsequent logs exactly to the above location
3. Now follow steps 1-7 mentioned in the article and make the database in a clean shutdown :
Exchange Database Recovery – Using eseutil commands: http://msexchangeguru.com/2009/07/12/exchange-database-recovery-using-eseutil-commands
4. Once the database is in clean shutdown state, rename the original database file to “RecoverDB.edb”.
NOTE: Don’t copy the logs since ESEUTIL /R replayed them into the EDB and the database does not require any more logs to make it clean shutdown.
5. Use the Exchange management Shell to create a recovery database.
This example creates the Recovery Store “RecoverDB” on the server MSXGuru-Exch using the defined path for the database file and transaction logs folder.
New-MailboxDatabase -Recovery -Name RecoverDB -Server MSXGuru-Exch -EDBFilePath D:\Recovery\Database\RecoverDB.edb -LogFolderPath D:\Recovery\Logs
Important: If you have EMC Console open, you will need to restart it to see the newly created Recovery mailbox Store “RecoverDB“ under the Organization Configuration–> Mailbox –>Database Management and its state will be dismounted.
6. Now Right click on the newly created recovery Store and mount it.
7. Now open Shell and type the command as shown:
Get-MailboxStatistics -Database RecoverDB
This will show the list of mailboxes in that database.
8. This is the cmdlet to recover entire mailbox content for the mailbox UserA
Restore-Mailbox -Identity UserA -RecoveryDatabase RecoverDB
This will take time depending on the size of the mailbox.
9. This is the cmdlet to restore UserB mailbox content into UserA mailbox under the RecoverTest folder.
Restore-Mailbox –Identity UserA –RecoveryDatabase RecoverDB –RecoveryMailbox UserB –TargetFolder RecoverTest
10. This is the cmdlet to restore all mailboxes in the database mbx1 which are also present in the RecoverDB database. For every mailbox it will ask you to confirm the action, we do have an option “Yes to All”
Get-Mailbox –Database mbx1 | Restore-Mailbox –RecoveryDatabase RecoverDB
More to come on this!!!