Using Virtual Drive for Exchange mailbox restore General information about Exchange databases and Exchange backups IASO Backup uses Microsoft VSS (Volume Shadow Copy) technology for backing up Exchange mailbox databases. For these purposes, Exchange server has a special built-in Exchange VSS writer that guarantees that the mailbox database being backed up will be in a consistent state. However, the writer puts the database in so-called dirty shutdown state which means that the database log files (usually named E00000xy.log) are required along with the database file (*.edb). The opposite term is clean shutdown state the database is fully functional as a single edb file and no log files are required. Putting database into clean shutdown state Exchange server installation includes a program called eseutil.exe (Extensible Storage Engine Utility) specially created to check the state or manipulate Exchange database and log files. There is a special command to check the state of the database file: eseutil /mh "<Path to EDB file>" It produces output in the following form where you can check out the state of the database: 1
Eseutil also provides a way to put the database from dirty shutdown state into clean shutdown state. It will copy the contents from log files into EDB file making the database independent from log files. Let s suppose here that Virtual Drive is mounted as B: volume: eseutil /r Exy /i /a /s "<Path to LOG folder>" /l "<Path to LOG folder>" /d "<Path to EDB folder>" Here, Exy is base log file name: it can be found out from database log files folder there should be a checkpoint file Exy.chk, its name is used as an input parameter in this command: After that, the log files are committed to the EDB file and it should be in a clean shutdown state. It may be verified with executing eseutil /mh once again: 2
Mailbox restore in Exchange 2007 In Exchange 2007, mailbox restore is done with the help of so called Recovery Storage Group. They are created via Exchange Troubleshooting Assistant (ExTrA.exe). Steps to do a mailbox restore in Exchange 2007: 1. Put the desired mailbox database on a B: drive into clean state with eseutil - see Putting database into clean shutdown state. Otherwise you won t be able to use it for mailbox restore. 2. Launch ExTrA (extra.exe from command prompt). 3. Click on Select task hyperlink 4. Select Database Recovery Management from the functions list: 5. Click on Next 6. Select Create a recovery storage group 3
7. Select a storage group the one that owns the database to be restored and click Next : 4
8. In Recovery database path specify a path to the EDB database on a B: drive and click Create the recovery storage group : 9. ExTrA will create a recovery storage group and show result screen specifying the errors occurred (if any). In case everything went fine select Go back to task center link 10. In the task center, select Mount or dismount databases in the recovery storage group : 5
11. On the next screen, check the database to be restored in the list of databases and click Mount selected database : 12. ExTrA will show results screen, click on Go back to task center hyperlink. 13. In the task center, select Merge or copy mailbox contents : 14. Click Gather merge information on the next screen 6
15. Select desired mailboxes and click Perform pre-merge tasks on the next screen 16. Exchange will restore selected mailboxes and present result screen. After that the database should be dismounted and recovery storage group removed. Mailbox restore in Exchange 2010 Unlike in Exchange 2007, in Exchange 2010 there is no concept of Recovery Storage Group. Mailbox restore is done with the help of Recovery Database. Steps to do a mailbox restore in Exchange 2010: 1. Put the desired mailbox database on a B: drive into clean state with eseutil - see Putting database into clean shutdown state. Otherwise you won t be able to use it for mailbox restore. 2. Launch Exchange Management Shell 3. To create a Recovery Database, use the following command: New-MailboxDatabase -Recovery Name <Recovery database name> -Server <Exchange server name> -EdbFilePath <Path to EDB file> -LogFolderPath <Path to log folder> The command will produce the following output: 7
4. Launch Exchange Management Console, go to Organization Configuration -> Mailbox -> Database Management, select recovery database that you ve just created and click Mount Database in popup menu: 5. Now go back to Exchange Management Shell. To get the list of all the mailboxes in the recovery database, use the following command: Get-MailboxStatistics -database <Recovery database name> It will show the list of the mailboxes in the recovery database: 8
6. To restore a single mailbox from the recovery database, use the following command: Restore-Mailbox <Mailbox name> -RecoveryDatabase <Recovery database name> It will prompt you for confirmation and produce the output like that: After mailbox restore is complete, the recovery database should be dismounted and removed from Exchange Management Console. For additional information, please check out MSDN article: http://technet.microsoft.com/enus/library/ee332351.aspx 9