Subscribe to RSS Feed

Exchange 2007 Recovery Storage Group With NTBACKUP

Exchange 2007 Recovery Storage Group : utilizing power shell

Microsoft introduced the Recovery Storage Group with Exchange 2003 which added some nice recovery functionality; we no longer needed a recovery AD forest to restore items to mailboxes or a single mailbox. Exchange 2007 has kept this feature however has drastically changed the interface and added the ability to use power shell for recovery.

For this article I am going to focus on using power shell only to recover mailboxes and messages to a mailbox. One big change is that even when a RSG is created you will not see it with the gui (EMC) and it can only been see via power shell.

First let’s start by logging onto a mailbox and seeing the content

As you can see we have 3 new messages in Jodie’s mailbox

Now we can use NTBackup to backup our Exchange servers database

1. Launch NTBackup from the system tools


2. Select next on the backup/restore wizard

3. Choose the radius button to backup files and settings

4. Select the radius button “Let me choose what to backup”

5. I am only going to backup the first storage group since that is the location of mymailboxes

6. Specify the location of the backup (D:\backup)

7. Click finish to start the backup

Here we can see our backup file has been created.

http://3.bp.blogspot.com/_jG-efUpJ7Oc/Rz-DfxauECI/AAAAAAAAARU/NMgVJ31ChQA/s320/back8.jpg

Now that we have a current backup I am going to delete the messages from Jodie’s mailbox so that we can then use a recovery storage group to recover the data .

Lets create a new RSG and take a look in the gui and then the command line.

To create an RSG we use the new-storagegroup commad but add the -Recover switch

new-storagegroup -Server vmmbx1 -LogFolderPath d:\rsg\logs -Name ExchangeGenie

-SystemFolderPath d:\rsg\data -Recovery

now that we have created our RSG let see if we get any info from EMC

As you can see the RSG does not show up

but if we do a get-storgegroup fl our new RSG will be shown

notice the recovery option is set to true

Now that we have created an RSG we need to add the database we want to recover

new-mailboxdatabase -mailboxdatabasetorecover “Mailbox Database” -storagegroup Vmmbx1\ExchangeGenie -edbfilepath “D:\RSG\Data\mailbox database.edb”

We do not need to set this database can be overwritten since that is enabled by default.

Now that we have created our RSG and added the appropriate database to the RSG we now have to restore the data from backup.

1. Launch NTBackup

2. Click Next

3. Select the backup we want to restore

4. input a temp location for the patch file and Check “Last Restore”

**since this is a full backup and no other logs are to be restored the last restore check box is marked”***

5. Click Next to start the restore

6. Click close after the restore completes

You can see we now have data restored to our recovery database location.

Now that the data has been restored from our backup we need to mount the recovery database

mount-database -identity ‘vmmbx1\exchangegenie\mailbox database’

Now that we have created our RSG, added a recovery database, and restored our data from backup we can now recover data to our users mailbox.

I will perform 3 different recoveries

1. Merge data back into a users mailbox

2. Merge data back into a sub folder in the users mailbox

3. Merge data to another users mailbox into a subfolder

Merge Data back to the original location

The following command will merge the data from our recovery database back to the original live mailbox.

Restore-Mailbox -id ‘Jodie Bartos’ -RSGDatabase ‘ExchangeGenie\Mailbox Database’

You can see that all our messages have been brought back to the original location

http://4.bp.blogspot.com/_jG-efUpJ7Oc/Rz-MsBauEPI/AAAAAAAAAS8/dlR1NEaODDc/s320/restoredtoinbox.jpg

Merge data into a sub folder in a users mailbox

Restore-Mailbox -RSGMailbox ‘Jodie Bartos’ -RSGDatabase ‘ExchangeGenie\Mailbox Database’ -id ‘Jodie.Bartos’ -targetfolder ‘RestoredMail’

You can see we have a new folder called RestoredMail which has a copy of the user inbox

Merge data to another users mailbox into a subfolder

Restore-Mailbox -RSGMailbo ‘Jodie Bartos’ -RSGDatabase ‘ExchangeGenie\Mailbox Database’ -id ‘Brian.Tirch’-targetfolder ‘JodiesMbx’

You can see my mailbox now has a subfolder called JodiesMbx with a copy of all her data

There are a number of recovery options that I did not mention in this blog i.e datarate,keywords, etc… that allow a more flexable recovery

After we completed our recover we need to remove the RSG, this is an item that you should not keep unless you are utilizing it.

First we need to dismount the database

Dismount-database -identity ‘vmmbx1\exchangegenie\mailbox database’

Now that we have dismounted the database we need to remove it

Remove-MailboxDatabase -identity ‘vmmbx1\ExchangeGenie\Mailbox Database’

**Note this will not delete the files from the drive, you must manually delete the restored database ***

The last step we need to remove the Recovery Storage Group

Remove-StorageGroup -identity ‘Vmmbx1\ExchangeGenie’

To validate our RSG is gone we need to use the Get-StorageGroup command

Leave a Reply