In my previous article we performed database backup using Windows Backup,and in this one we’ll restore database to folder c:\b
Because i backed up folders,not entire drive,i chose Files and folders
I selected mailboxdatabase folder
Click recover
Database and transaction log files are restored to same folder (c:\b)
Restoring to recovery database
A recovery database is a special mailbox database that allows mounting and extracting data from a restored mailbox database.
Database we just has restored is in dirty shutdown state (there are transactions that are await to be committed to the database).
We’ll use eseutil utility which is part of Exchange to bring database to clear shutdown mode (database is correctly detached-so we can mount this database file to recovery database)
PS C:\b> eseutil /mh '.\bigfirm_db01,on_bigfirm.edb'
/m displays headers of database files and transaction log files
/h – dump database header
To get Clean Shutdown,we must perform soft database recovery (transaction logs are replayed into an offline file backup copy of a database)
PS C:\b> eseutil /R E00 /l .\ /d .\
/R replays transaction log files or rolls them forward to restore a database to internal consistency or to bring an older copy of a database up to date-https://technet.microsoft.com/en-us/library/aa998075(v=exchg.65).aspx
/l path to log files
/d path to database file
Both log and database files are in same folder-c:\b,(I cd into that folder,that’s why .\ is used -current folder)
E00 logfile prefix (note that all log files start with E0)
Check database status,it should be in clean shutdown mode now
Now we can mount edb file to recovery database
Creating recovery database
Recovery database is created as any other mailbox database except we need to specify -recovery switch,
edb path is fedb file to database we recovered using Windows Backup and log files are in c:\b folder (also restored from backup)
[PS] C:\Windows\system32>New-MailboxDatabase -Server dc -Name recoverydatabase -Recovery -EdbFilePath 'C:\b\bigfirm_db01,on_bigfirm.edb' -LogFolderPath 'c:\b' [PS] C:\Windows\system32>Mount-Database recoverydatabase
Performing restore from recovery database
In this example we will recover emails from deleteditems folder from recovery database
[PS] C:\Windows\system32>New-MailboxRestoreRequest -SourceDatabase recoverydatabase -SourceStoreMailbox "don hall" -TargetMailbox "don hall" -IncludeFolders delete items