First off, note that I am not doing this recovery because of any actual problem, I'm just testing it. I'm running Exchange 2010 on Server 2008 R2, and using Windows Server Backup to a remote file share for the backups. I have to assume I'm doing something wrong because all of the documentation I've found hasn't helped me.
I back up the 2 separate volumes that I store database files and log files on. I use Windows Server Backup to restore a given EDB file and it's corresponding log files to an alternate location. Normally I would assume I can then create a new recovery database, specifying the location of these restored files, and I could then mount it to try to restore specific mail. However, it always gives me errors because it's in a "Dirty Shutdown" state. Running eseutil /mh shows me this state. From what I've found online, it seems as though this state should only appear if there is a genuine corruption. The backups are supposed to be Exchange-aware, so I would imagine this should not be the state the database is in after recovery. I've tried to go through the whole repair process suggested when there's corruption, but this always destroys all the data I need.
Am I doing something wrong with the backup, or something with the restore? Should the database be in this "Dirty Shutdown" state after restoring?
Please take a look at THIS article, at the bottom it states that a DB backed up and restored to an alternate location using Windows Backup will be flagged as dirty.
Bringing the Database into a Clean Shutdown State To bring the database to a clean shutdown state, run following command from the log file folder: Eseutil /R E00 /I /dX:\Restore\F_\MDB1
open a command prompt and browse to the logs folder, from there run the above command.
After that check whether you have a clean state db and all emails.
I haven't experimented alot but done a few test restores and it has been the case for me too even restoring with BESR 2010.
hope that helps
Another good article : http://www.simple-talk.com/sysadmin/exchange/exchange-server-log-file-replay/
Use following method to fix dirty shutdown error:
1. Take Backup of all the edb, stm files, as well as log files.
2. Make ensure that there is 110% of empty disk space.
3. Check for Database Consistency using following command: eseutil /mh
4. As you said database is in – “Dirty Shutdown” you should first try the “Soft Repair” - eseutil /r:
[eseutil /r "prefix" /l /d ]
Again Check DB Consistency, if it is in clean state, mount the database
But, if soft repair didn’t work, then run hard repair
(Eseutil /p “location of mailbox database.edb”)
5. Now defragment the DB using eseutil /d command
6. Run following command: [isinteg -s "servername" –fix –test - alltests]
7. Check again DB Consistency & it must show “clean shutdown” as the status.
Hope with above steps, you will resolve your issue. You can also check this reference for more details.