DaveHope.co.uk

Exchange 2007 restore using NTBackup

Now that I’m well under way with my Exchange 2007 migration I figured it’d be a good time to test the new Exchange recovery process.

To cut a long story short, it’s a long process as most of the functionality is via Powershell rather than the Exchange Management Console.

Anyway, here’s a quick guide.

1. Create the recovery storage group
This just creates an empty storage group for the recovery database, nothing fancy going on here.

[PS] C:\>new-storagegroup -LogFolderPath F:\Backup\Restore\Logs -Name ExchangeRestore -SystemFolderPath F:\Backup\Restore\Data -Recovery
Name                      Server            Replicated        Recovery
----                      ------            ----------        --------
ExchangeRestore           IMM-CORE-EXCH01   None              True
[PS] C:\>

2. Create a new recovery mailbox database
This creates a new empty database for NTBackup to restore to.

[PS] C:\>new-mailboxdatabase -mailboxdatabasetorecover "Mailbox Database" -storagegroup ExchangeRestore -edbfilepath "F:\Backup\Restore\Data\Mailbox Database.edb"
Name                 Server          StorageGroup         Recovery
----                 ------          ------------         --------
Mailbox Database     IMM-CORE-EXCH01 ExchangeRestore      True
[PS] C:\>

3. Restore the mailbox database via NTBackup
Now restore the mailbox database via ntbackup, remembering to tick the “this is the last backup to restore” option. Tick the check box not to mount the store after the restore completes.

4. Mount the restored mailbox database

[PS] C:\>Mount-Database -Identity 'ExchangeRestore\Mailbox Database'
[PS] C:\>

5. Restore the mailbox to a folder in another mailbox
I prefer to redirect the mailbox restore elsewhere, just so that I can look through it and decide what I want to do with the restored data. Below I’m restoring my mailbox to an existing mailbox called ‘Restore’.

[PS] C:\>Restore-Mailbox -RSGMailbox 'Dave Hope' -RSGDatabase 'ExchangeRestore\Mailbox Database' -id 'Restore' -TargetFolder 'Restore'
[PS] C:\>

6. Dismount the recovered mailbox database
We should now be done with our recovered mailbox database, so we can dismount it ready for removal.

[PS] C:\>Dismount-database -Identity 'ExchangeRestore\Mailbox Database'
[PS] C:\>

7. Remove the mailbox database
This removes the mailbox database from the storage group – it doesn’t actually delete the files.

[PS] C:\>Remove-MailboxDatabase -Identity 'ExchangeRestore\Mailbox Database'
[PS] C:\>

8. Remove the storage group
Since we shouldn’t need out recovery storage group (at least, until next time) we can remove that too.

[PS] C:\>Remove-StorageGroup -Identity 'ExchangeRestore'
[PS] C:\>

There, all done! Good luck with your Exchange restore.

Comments

Leave a Reply