Monday, July 20, 2009

Exchange 2007 Restore with DPM and PowerShell

 

Set-up Overview

This post shows how to recover a mailbox using DPM and Powershell commands

For the examples in this post we use the following set-up

  • Exchange 2007 CCR cluster: EXc01
  • Storage group to recover from: SG01
  • Mailbox to recover from: MBXStore01
  • User to recover: Matthijs
  • User to recover mail to: Manager
  • Disk for recovery storage group: E:\
  • Name recovery storage group: Recovery Storage Group

High-level steps for a recovery

  • Create recovery storage group;
  • Restore data to Recovery Storage Group;
  • Copy/merge mail to target mailbox;
  • Remove Recovery Storage Group.

Restore to recovery Storage Group

Task description

Example

  • If you do not have an existing Recovery Storage Group, create one by using the new-storagegroup cmdlet in Exchange Management Shell.
  • Logon to the Active node of the Exchange cluster
  • Start the exchange management shell
  • Create a Recovery Storage Group (RSG) by running the following Exchange Management Shell cmdlet: [PS] new-storagegroup -Server [servername] -LogFolderPath [log file path] -Name “Recovery Storage Group” -SystemFolderPath [database directory] Recovery

new-storagegroup -Server exc01 -LogFolderPath E:\RSG -Name “Recovery Storage Group” -SystemFolderPath E:\RSG -Recovery

  • Add a recovery database to the RSG by running the following Exchange Management Shell cmdlet: [PS] new-mailboxdatabase -mailboxdatabasetorecover [database_name] -storagegroup [Server_name\RSG_name] -edbfilepath [database_path]

This creates a mailbox on exchangeserver1\RSG\DB11. The .edb file name must be the same as the .edb file name for the mailbox you are recovering.

new-mailboxdatabase -mailboxdatabasetorecover exc01\SG01\MBXStore01 -storagegroup "exc01\Recovery Storage Group" -edbfilepath E:\RSG\MBXStore01.edb

  • Logon to the DPM server
  • start DPM administrative console
  • Select the recovery TAB
 
  • On the left side of the window select the Exchange cluster for which you want to perform a system state restore
  • Expand the domain name, expand the cluster name
  • Expand All protected data Exchange data
  • Select the storagegroup that contains the mailbox to restore
image
  • In the middle of the window
  • (lower screen) First select the mailbox store and select the users mailbox
  • (Uper screen)select the data and additionally the time of the mailbox to restore.
  • In the right side of the click recover
image
  • The recovery wizard start
  • Check the selected settings and click next
  • In the Select recover type window, select Recover the mailbox to an Exchange Server and click Next
image
  • In the specify destination type:
  • Exchange server: [Exchange mailbox cluster] EXC01
  • Storage group name: Recovery Storage Group
  • Database name: [RSG_databasename] mbxstore01
  • In the specify recovery options window, leave all settings default and click Next
  • In the summary window, check all settings and click recover
  • In the Recover status window, check the status and click close
image
     

Restore mailbox content to other mailbox

Task description

Example

  • Logon to the exchange cluster again
  • Open the Exchange management Shell
 
  • Restore the content of a mailbox to another mailbox in a special folder
  • Start by running the following Exchange Management Shell cmdlet: restore-mailbox -RSGMailbox [mailbox in RSG*] -rsgdatabase [RSG_Name\Mailbox_database_name] –baditemlimit 10-id [target_mailbox*] -Targetfolder [target_folder]

*Use the display name

restore-mailbox -RSGMailbox "Matthijs" -rsgdatabase "Recovery storage group\MBXstore01" –baditemlimit 10 -id "manager” -Targetfolder "restore van Matthijs 20090704"

  • The confirmation question will be displayed. Check the action described and Click Y

Confirm

Are you sure you want to perform this action?

Recovering mailbox content from the mailbox 'Vreeken, Matthijs' in the recovery

database 'EXC01\Recovery Storage

  • The mailbox restore is in progress
 
  • The results are displayed
 
  • In outlook there is a new folder created with the content of the restored mailbox
 

Restore lost mail to original mail box merge

Task description

Example

  • Logon to the exchange cluster again
  • Open the Exchange management Shell
 
  • Restore the content of a mailbox to another mailbox in a special folder
  • Start by running the following Exchange Management Shell cmdlet: restore-mailbox -id [mailbox in RSG*] -rsgdatabase [RSG_Name\Mailbox_database_name] –baditemlimit 10

*Use the display name

restore-mailbox -id "’matthijs" -rsgdatabase "Recovery storage group\MBXstore01" -baditemlimit 10

  • The confirmation question will be displayed. Check the action described and Click Y
 
  • The mail restore is in progress
 
  • The results are displayed
 
  • In outlook there is a new folder created with the content of the restored mailbox
 

Other useful restore command:

Restore only emails received/send between specify data:
Restore-mailbox _RSGMailbox <Mailbox_name_In_RSG> –RSGDatabase <RSG_Name>\<Mailbox_DatabaseName> –ID <Mailbox_Name_To_restore> –TargetFolder <Folder_Name> –StartDate <Start_date> –EndDate <EndDate>


Remove recovery storage group

Task description

Example

  • Logon to the exchange cluster again
  • Open the Exchange management Shell
 
  • Dismount the database with the command: dismount-database -identity "[server_name\RSG_Name\Mailbox_database_name]”

dismount-database -identity "exc01\Recovery Storage Group\MBXstore01"

  • The confirmation question will be displayed. Check the action described and Click Y
 
  • Remove the mailbox from the Recovery Storage Group with the command: Remove-mailboxdatabase –identity <server_name\RSG_name\Database_name>

Remove-mailboxdatabase -identity "exc01\recovery storage group\MBXstore01"

  • The confirmation question will be displayed. Check the action described and Click Y
 
  • The move the Recovery Storage group with the following command: remove-storagegroup –identity <server_name\RSG_name>

remove-storagegroup –identity “exc01\recovery storage group”

  • The confirmation question will be displayed. Check the action described and Click Y
 
  • The recovery storage group has been removed from exchange.
 
  • Now remove the files from the Recovery Storage Group directory

E:\RSG\*.*

No comments:

Post a Comment