My environment is Exchange 2007. I had a user whose exchange folders all dissapeared, we tried to restore it from Veeam and it gave some error about a Domain Controller or something like that which after speaking with Veeam they told us we couldn’t restore it using their methods. I ended up going with the Exchange Recovery Group Method found here.

http://technet.microsoft.com/en-us/library/aa997694.aspx

A helpful discussion about this is located here:

http://www.experts-exchange.com/Software/Server_Software/Email_Servers/Exchange/Q_24860312.html

First I created a separate disk on the exchange server because I didn’t have enough space on the hard drive that my exchange install was located on (it was a VM so I just added a 200gb drive to it) I assigned F:\ to it.

I restored the EDB and log files from my backup to “F:\First Storage Group” initially. I copy these later into the RSG

Some helpful commands before you start to see what your databases are named and what storage groups you have setup. If you’re not used to using the powershell these commands will help you out.


[PS] C:\Windows\system32>get-mailboxdatabase

Name Server StorageGroup Recovery
—- —— ———— ——–
Mailbox Database FLEMAIL First Storage Group False
Mailbox Database FLEMAIL Recovery121013 True

[PS] C:\Windows\system32>get-storagegroup
Name Server Replicated Recovery
—- —— ———- ——–
Second Storage Group FLEMAIL None False
First Storage Group FLEMAIL None False
Recovery121013 FLEMAIL None True

If you look above, I called my recovery group ”Recovery121013” which I created in the steps below. My database is just the default of exchange called “Mailbox Database” if you’re wondering why there are 2, one is my current live exchange database and the other one is the one i created in the steps below which is why it already says recovery. My email server is called “FLEMAIL”

So to wrap it up here’s the parameters I’m going to enter into the commands below:

<Server_Name> = FLEMAIL
<path_to_logfiles> = F:\First Storage Group
<RSG_Name> = Recovery121013
<Database_Path> = F:\First Storage Group\RSG
<database_name> = Mailbox Database

Here are the steps I used to create the recovery group and database and then restore the mailbox:

  • First Create the RSG

Here’s the command syntax

new-storagegroup -Server <Server_Name> -LogFolderPath <path_to_Logfiles> -Name <RSG_Name> -SystemFolderPath <Database_Path> -Recovery

Here’s the command I ran. I’m basically creating the Recovery Storage Group in a folder called RSG. The Recovery Storage Group is called Recovery121013

new-storagegroup -Server FLEMAIL -LogFolderPath "F:\First Storage Group\RSG" -Name "Recovery121013" -SystemFolderPath "F:\First Storage Group\RSG" –Recovery

  • Now I copy my “Mailbox Database.EDB” file and all the log files into the RSG folder that it just created, located in “F:\First Storage Group”
  • Now I add a recovery database called “Mailbox Database” to the RSG using the following command

Here’s the command syntax:

new-mailboxdatabase -mailboxdatabasetorecover <Database_Name> -storagegroup <Server_Name>\<RSG_Name> -EDBFilePath <Database_Path>

Here’s the command I ran:

new-mailboxdatabase -mailboxdatabasetorecover "Mailbox Database" -storagegroup FLEMAIL\Recovery121013 -EDBFilePath "F:\First Storage Group\RSG\Mailbox Database.edb"

  • The next step was to check to see if the database was in a clean shutdown state. I ran this command to check to see if it was and it was dirty so I had to clean it up.

eseutil -mh "F:\First Storage Group\RSG\Mailbox Database.edb"

  • Since it was in a dirty state I had to run the eseutil on it:

eseutil /r E00 /l "F:\First Storage Group\RSG" /d "F:\First Storage Group\RSG"

  • Now you set your recovery databases to allow overwriting

Heres the syntax of the command:

set-mailboxdatabase -identity <Server_Name>\<RSG_Name>\<Database_Name> -AllowFileRestore:$True

Here’s the command I ran:

set-mailboxdatabase -identity "FLEMAIL\Recovery121013\Mailbox Database" -AllowFileRestore:$True

  • Now that you have a clean recovery database, you can mount it

Here’s the syntax of the command:

mount-database -identity <Server_Name>\<RSG_Name>\<Database_Name>

Here’s the command I ran:

mount-database -identity "FLEMAIL\Recovery121013\Mailbox Database"

  • Next I create a user called in the “live” exchange called “john smith temp” and restore the mailbox there. You can actually restore it to the original mailbox or whereever you would like (see link at the beginning of this article for different options), for my purposes I used a temporary mailbox. It basically created a folder called “John Smith Temp” with all the users data within the mailbox by the same name.

NOTE: I ended up getting this error message: “Error occurred in the step: Moving messages. This mailbox exceeded the maximum number of corrupted items specified for this move mailbox operation” so i had to add the BadItemLimit flag to the end of the command. I put 1000 just in case. After this it restored correctly

Here’s the syntax:

Restore-Mailbox -RSGMailbox 'John Smith' -RSGDatabase 'RSG\Mailbox Database' -id 'Allison Brown' -TargetFolder 'JSmith Email'

Restore-Mailbox -RSGMailbox 'John Smith' -RSGDatabase 'Recovery121013\Mailbox Database' -id 'John Smith Temp' -TargetFolder 'JsmithTemp Email' –BadItemLimit 1000

I haven’t removed anything yet, but I believe these are the commands to remove the database and RSG after your done with it. Please do more research on this as I have not completed it

Remove-MailboxDatabase -identity FLEMAIL\"Recovery Storage Group"\"Mailbox Database"

Remove-Storagegroup -identity FLEMAIL\"Recovery Storage Group"