Wednesday, 18 March 2015

How to Configure Recovery Storage Groups in Exchange Server 2007

Recovery Storage Group is a nice tool which was first seen in the Exchange Server 2003. Exchange Server 2007 has kept this feature but with significantly changed the interface. Instead of configuring RCG from the GUI, Exchange Server 2007 supports only configuring RCG from the PowerShell.
Let's first check user's inbox having few messages in his account. 
As you can see we have lots of messages in Joseph's mailbox
Now let us run NTBackup utility to backup Exchange Server database:-

 4. Select the option 'Let me choose what to backup'.
 
5. Expand the Server name, then Microsoft Information store and then highlight First Storage Group or any other group that users belongs to. Select the Mailbox database on the right side.

6. Specify the location of the backup (in our case, C:\backup) and enter any name of this back up. And click Next.

 
7. Click Finish to start the backup
8. Once back up is done, you will see the .bkf file in the back up location.
  
We have a current backup now, let us delete messages from Joseph's mailbox so that we can then use a recovery storage group to recover the data.
 
Let's create a new Recovery Storage Group from the command line.
To create an RSG we use the new-storagegroup commad and add the -Recover switch
 
 
new-storagegroup -Server vmmbx1 -LogFolderPath d:\rsg\logs -Name ExchangeGenie
-SystemFolderPath d:\rsg\data Recovery

Run the get-storgegroup command to check the available storage groups.
Run the get-storgegroup| fl command for details report of storage groups
 Notice the recovery option has been 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

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 utility from the System Tools.
2. Click Next
3. Select the Restore files and settings option.
4. Select the backup we want to restore (created above)
.

5.Enter a temporary location for the log and patch files and Check “Last Restore Set option. 
**since this is a full backup and no other logs are to be restored the last restore check box is marked***
6. Click Next to start the restore and once Restore has been complete, click on Finish tab.

7. Restore Progress window will display if restore was successful or not.
 
We can now see the 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 user's 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

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



Merge data into a sub folder in a users mailbox
Restore-Mailbox -RSGMailbox ‘Joseph -RSGDatabase ‘ExchangeGenie\Mailbox Database’ -id ‘Josephs’ -targetfolder ‘RestoredMail’


Merge data to another users mailbox into a subfolderRestore-Mailbox -RSGMailbo ‘Joseph -RSGDatabase ‘ExchangeGenie\Mailbox Database’ -id ‘Brian.Tirch’-targetfolder ‘JosephsMbx’

No comments:

Post a Comment