Archive

Archive for the ‘Exchange 2010’ Category

Exchange 2010 DB & Single Item recovery

December 7, 2011 2 comments
 
Restore your Exchange 2010 DB backup to a different location using your backup application,
Like in this example I am using Windows backup utility and restoring the backup in my backup drive (G)
Start Windows server backup utility.
Click on recover
Select the location of the backup and click on the next.
Select date of the backup
Select Application in recover type
Select Exchange in Application type.
Choose “Recover to another location ” and choose the location where you want to recover
Now click on the recover
Once done, check the location once for the path of your database.
Check the status of the restored database using below command.
H:\Program Files\Microsoft\Exchange Server\V14\Bin>eseutil.exe /mh “G:\Restore\E
_\Program Files\Microsoft\Exchange Server\V14\Mailbox\MDB01\MDB01.edb”
It will show you the result as below.
Now check the consistency of the log files using below command.
H:\Program Files\Microsoft\Exchange Server\V14\Bin>eseutil.exe /ml “G:\Restore\F
_\Program Files\Microsoft\Exchange Server\V14\Mailbox\MDB01\E01″
Now you need to make you Data Base in “Clean Shutdown” state to mount it.
Run the below command to replay all the logs to your DB
H:\Program Files\Microsoft\Exchange Server\V14\Bin>eseutil.exe /r “E01” /l “G:\Restore\F_\Program Files\Microsoft\Exchange Server\V14\Mailbox\MDB01” /d “G:\Restore\E_\Program Files\Microsoft\Exchange Server\V14\Mailbox\MDB01\MDB01.edb”
You will be received the error as “Operation terminated with error -1216 (JET_errAttachedDatabaseMismatch”
So run the same command with “/i” switch
Now check the consistency of the data base for the clean shutdown state
If it still in “Dirty Shutdown” state then run the “hard repair”
H:\Program Files\Microsoft\Exchange Server\V14\Bin>eseutil.exe /p “G:\Restore\E_\Program Files\Microsoft\Exchange Server\V14\Mailbox\MDB01\MDB01.edb”
You will be receive an error, click on ok
Now check the database.
Now it will show you in the clean shutdown state.

Create a “Recovery Data Base” using below command with this existing database and log files.
Run the below command in Exchange management shell
Here, I am using the same EDB & Log files which I recovered from backup.
New-MailboxDatabase -Recovery -Name “RDB01” -Server “EX01” -EdbFilePath “G:\Restore\E_\Program Files\Microsoft\Exchange Server\V14\Mailbox\MDB01\MDB01.edb” -LogFolderPath “G:\Restore\F_\Program Files\Microsoft\Exchange Server\V14\mailbox\MDB01”
Mount this Recovery Database, run the below command
Mount-Database -Identity “RDB01”
Now recover the mailbox which you want to recover.

Restore-Mailbox -Identity subodhuniyal -RecoveryDatabase “RDB01”

This will restore all the emails of the mailbox “subodhuniyal”
Advertisements
Categories: Exchange 2010
Noam's scripting blog

"Ready to use" scripts and scripting tips for system admins with detailed walkthroughs/explanations.