Restoring an Individual Mailbox(s) Using Exchange 2010 (v1.0) September 2012
Contents 1.0 Restoring Exchange Data Using Backup Plus... 3 2.0 Using Microsoft Exchange 2010 Eseutil Tools To Perform SIR... 5 2.1 Bringing The Restored Database To A Clean Shutdown State With Eseutil... 5 2.2 Check The State Of The Log Files... 6 2.3 Clean Database Shutdown... 7 2.4 Check Database Shutdown State... 8 3.0 Creating Recover Database... 9 3.1 Mounting The Recovery Database... 9 3.2 Restoring Mailbox And Email Items From A Recovery Database... 10 4.0 Removing The Recovery Database... 12
1.0 Restoring Exchange Data Using Backup Plus Note: the server that you are creating the Recovery Database on must be an Exchange Server that holds the Mailbox Role. Section 1 describes the recovery process for the.edb and associated log files using Redstor Online Backup Plus. Open the client Select restore tab (My Computer>Restore) > From data location window select Exchange Stores and choose the relevant copy (based on backup date to restore) Select the restore path e.g. E:\Exchange_Restore Click Restore. The progress window displays the restore activity.
You can confirm the restore was successful from the summary information reports. (Reports>Backup/Restore Summary)
2.0 Using Microsoft Exchange 2010 Eseutil Tools To Perform SIR After restoring the Exchange data using the Backup Plus Client (see section 1) follow these procedures to create the Recovery Database and then restore a user s mailbox or emails. Depending on whether you are doing single or multiple mailbox restore you may have to run through this process for each edb restored. For example: db01.edb or db02.edb 2.1 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 from DOS as Administrator, specifying the path to the restored.edb file on your server. Run the eseutil commands from this directory: C:\Program Files\Microsoft\Exchange Server\V14\Bin> /mh - Database Name eseutil /mh E:\Exchange_Restore\Exchange server\mailbox Database 0311018874\File\Mailbox Database 0311018874.edb Take note of the Log Required field as you will need to refer to this before running the soft recovery eseutil /r. In the screen shot below we see that the following log files (1010-1028 (0x3f2-0x404)) are required.
2.2 Check the state of the log files Check the state of the log files using the 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. /ml - Log File Name eseutil /ml E:\Exchange_Restore\Exchange server\mailbox Database 0311018874\Logs\E00 The output below lists the logs in sequence and are all present, in the correct sequence and undamaged. This output shows ALL logs. We only require log files 0x3f2-0x404. Before running the soft recovery you will need to do the following for the log files that you have restored. Refer back to the output from the eseutil /mh command and look at the Log Required field. This states the log files required to replay against the edb to bring it into a Clean Shutdown state. The Checkpoint file will indicate which log is the 1st to be replayed against the edb and also the last. All other required files are not needed here so we create a temp folder within the restored log folder area and move the logs that are not required into the temp folder. To find out which logs you need to keep for replaying you will need to refer to the output from the eseutil /mh command (Log Required as highlighted in yellow above). In this example the following log files are required (1010-1028 (0x3f2-0x404)) to bring the edb into a "Clean Shutdown" state.
From the output of the eseutil /ml command below you can move all logs listed above E00000003F2.log into the temp folder as these are not required. Any subsequent logs after the required logs are ignored, in this case E0000000405.log. (See screenshot below with highlighted logs required for replay) Logs that are in the restored log folder and are in sequence, listed before the 1st log file required, cause an issue when using eseutil /r. 2.3 Clean Database Shutdown Now we can run ESEUtil in recovery mode to bring the database into a clean shutdown state. /r - recovery mode /s - location of the system files (Checkpoint file) (default: current directory) /l<path> - location of log files (default: current directory) /d<path> - location of database files (default: current directory) eseutil /r E06 /s E:\Exchange_Restore\Exchange_server\Mailbox Database 0311018874\Logs /l E:\Exchange_Restore\Exchange server\mailbox Database 0311018874\Logs /d E:\Exchange_Restore\Exchange server\mailbox Database 0311018874\File
2.4 Check Database Shutdown State Now run ESEUtil to check the database state again. eseutil /mh E:\Exchange_Restore\Exchange server\mailbox Database 0311018874\File\Mailbox Database 0311018874.edb findstr "State:" You can also run eseutil /mh to view all information including Log Required which should now be 0-0 Note: if the database is still in a dirty shutdown state you can try a repair using ESEUtil /p instead. Be aware that when running eseutil /p it will create a temp.edb on the C drive by default which could result in no free space left on C drive. To move the creation of the temp.edb file to another disk just add the /t switch as per below. eseutil /p E:\Exchange_Restore\Exchange server\mailbox Database 0311018874\File\Mailbox Database 0311018874.edb /t E:\EDB_Temp_location 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.
3.0 Creating Recover Database The next stage of the recovery process is creating the Recovery Database. Note: You cannot use a Recovery Database to recover public folder data. Launch the Exchange Management Shell and run as Administrator. 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) New-MailboxDatabase -Name RecoveryDB1 -Server EXCH2010-TEST - Recovery:$true -EdbFilePath "E:\Exchange_restore\Exchange server\mailbox Database 0311018874.edb" -LogFolderPath "E:\Exchange_Restore\Exchange server\mailbox Database 0311018874\Logs" 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. 3.1 Mounting the Recovery Database Use the following command with the appropriate database name to mount the database. Mount-Database RecoveryDB1 (You can look in Exchange Management Console to confirm that the RecoveryDB is mounted)
3.2 Restoring Mailbox and Email Items from a Recovery Database With the recovery database mounted we can now proceed with mailbox, folder and email restores. You can see the available items to restore by looking at the mailbox statistics for the recovery database. Get-MailboxStatistics -Database RecoveryDB1 or (RecoveryDB in this example) To restore all mailbox items into a sub-folder of the existing mailbox so that they can be inspected use the following command. Restore-Mailbox -Identity Administrator -RecoveryDatabase RecoveryDB - RecoveryMailbox "Administrator" -TargetFolder Restore Select Y to confirm
The restored items will now be visible in the mailbox under the Restore folder. You can then launch Outlook client or OWA and view the Restore Folder under the user s mailbox. 3.2.1 Additional Restore Options (Optional steps, for use in: section 3.2) If you want to restore the full mailbox then leave out the last parameter TargetFolder Restore-Mailbox -Identity "Administrator" -RecoveryDatabase RecoveryDB -RecoveryMailbox "Administrator" If you want to restore the full mailbox overwriting the existing mailbox Restore-Mailbox -Identity "Administrator" -RecoveryDatabase RecoveryDB To restore a selective email from mailbox Administrator with a subject containing the word work, with message body containing the word Meeting and with the message location either in the inbox or sent items folder and then placing the results into the mailbox Administrator under a folder called Test Email Recovery use the following command. Restore-Mailbox -Identity Administrator -RecoveryDatabase RecoveryDB -RecoveryMailbox "Administrator" -SubjectKeywords work ContentKeywords Meeting IncludeFolders \inbox,\"sent items" TargetFolder Test Email Recovery To do a bulk restore of all mailboxes in the Mailbox Database 0311018874 database that are also present in the Recovery database Get-Mailbox -Database Mailbox Database 0311018874 Restore-Mailbox -RecoveryDatabase RecoveryDB
4.0 Removing the Recovery Database Once the restore activity is complete the Recovery Database can be dismounted and removed. Dismount-database identity RecoveryDB1 Select Y to confirm (You can look in Exchange Management Console to confirm that the RecoveryDB is dismounted) Remove-mailboxdatabase identity RecoveryDB Select Y to confirm (You can look in Exchange Management Console to confirm that the RecoveryDB has been removed) You may then need to delete the edb and log files manually End of Document