This article describes how to restore a MS Exchange previously backed up by R1Soft CDP.
{info:title=Tip}Exchange 2010 no longer includes the concept of storage groups. In earlier versions of Exchange, one or more Exchange store databases can be grouped into a storage group, which can then be managed as a unit. Because storage groups were removed from Exchange Server 2010, a *recovery database* can be used.
{info}
CDP provides the ability to take a snapshot of the Microsoft Exchange. Since CDP is using the VSS Exchange writer, it ensures data integrity and consistency during the backup operation.
----
{toc-zone:location=top|maxLevel=3|minLevel=3|type=flat|separator=pipe|style=border:1}
----
h3. 1. Using CDP to Restore Database Data and Log Files
In order to restore a database, follow the instructions below.
1. Click on "Recovery Points" in the Main Menu to open the "Recovery Points" window.
|| Standard Edition || Enterprise Edition || Advanced Edition ||
| !menu-recp-st.png! | !menu-recpoints.png! | !menurecoverypointadva.png!\\ |
2. In the "Recovery Points" list, from the horizontal menu select the Agent where MS Exchange is installed and the appropriate Disk Safe to restore from.
!select-agent-ds.png!
3. Then select a Recovery Point to restore from and click on the "Browse" icon in the "Actions" column for this Recovery Point.
!select-agent-ds-browse.png!
{info:title=Tip}To find a Recovery Point, you can use the Basic and Advanced List Filters. See [CDP3:Customizing the Recovery Points List].
{info}
4. The "Browse Recovery Point" window opens.
!browse-rec-p.png!
See also: [CDP3:Browsing Recovery Points].
5. Browse to locate the SQL check point file, data and log files (Enn.chk, .mdf & .ldf).
!rec-p-location.png!
Select the checkboxes next to the files and folders to restore.
!rec-p-select.png!
6. Once the files and folders are selected, click on "Restore Selected."
!restore-selected1.png!
7. The "Restore Files" window will open.
8. Select the Agent where the MS Exchange is installed.
Specify to restore the files to an alternate location as we are later going to attach them to an Exchange Recovery Group.
!restore-files1.png!
9. Click "Restore."
!restore-button.png!
10. You can view the Restore Task results in the "Task History."
!menu-taskhistory.png!
11. In the "Task History" list, find the Task you want to view the summary for and click it. The "Summary" tab located on the bottom area accumulates general information about the task.
!task-success.png!
----
h3. 2. Using Eseutil to Replay Log Files
Once the files have been restored, it is time to run *Eseutil* to get the data files into a clean shutdown state so that they can be attached to a recovery storage group, and have the log files played into the backup.
On the Exchange server where the files were restored, open up the command prompt and change the directory to the location where you restored the {{.chk}}, {{.edb}}, and {{.ldf}} files. Operating inside of the directory, where the data and log files exist, eliminates misspelling and incorrect paths, etc.
For example, the files were restored to the {{c:\test}} directory, but since the original files were located under
{{C:\Program Files\Microsoft\Exchange Server\Mailbox\First Storage Group}},
The restore directory path will be:
{{C:\test\Program Files\Microsoft\Exchange Server\Mailbox\First Storage Group}}.
From this directory run the following command:
{code}
Eseutil /R Enn /I /D
{code}
For example:
{code}
Eseutil /R E00 /I /D
{code}
!eseutil1.png!
For more information on using *Eseutil* and the different commands, see the following technet article:
[http://technet.microsoft.com/en-us/library/bb123479(EXCHG.80).aspx]
----
h3. 3. Restoring a Mailbox Using Exchange Management Shell
1. Find the Exchange server database ({{.edb}}) file you have just restored. In our example, we rename this file to "RecoveryDB.edb."
!mail-rename.png!
!mail-rename1.png!
2. Create a folder for log files.
!new-folder.png!
3. Now we are going to launch the Exchange Management Shell to restore the mailbox. Go to Start !arrow.png! (All) Programs !arrow.png! Microsoft Exchange Server 2010 Exchange Management Shell.
!exc-shell.png!
4. The Exchange Management Shell screen will open.
!shell04.png!
5. Use the {{New-MailboxDatabase}} command to create a mailbox database object in the database container in Active Directory. For detailed syntax and parameter information, see [http://msdn.microsoft.com/en-us/library/aa997976(v=EXCHG.140).aspx|http://msdn.microsoft.com/en-us/library/aa997976%28v=EXCHG.140%29.aspx]
In our example, we restore the {{C:\test\RecoveryDB.edb}} file using the following command:
{code}
New-MailboxDatabase -Recovery -Name RecoveryDB -Server XCHG -EdbFilePath C:\test\RecoveryDB.edb -LogFolderPath C:\test\logs
{code}
!shell01.png!
6. Mount the newly created database RecoveryDB using the {{Mount-Database}} command. For detailed syntax and parameter information, see [http://msdn.microsoft.com/en-us/library/aa998871(v=EXCHG.140).aspx]. In our example we use the following command:
{code}
Mount-Database "RecoveryDB"
{code}
!shell03.png!
7. Use the {{Get-MailboxStatistics}} command to obtain information about a mailbox, such as the size of the mailbox, the number of messages it contains, and the last time it was accessed. For detailed syntax and parameter information, see [http://msdn.microsoft.com/en-us/library/bb124612%28ru-ru,EXCHG.140%29.aspx].
!shell02.png!
8. Extract mailbox content from a restored database using the {{Restore-Mailbox}} command. The {{\-RecoveryDatabase}} parameter specifies the recovery database from which you are restoring the mailbox. In the following example, we restore a "MargeSimpson" mailbox. More parameters for {{Restore-Mailbox}} can be found here: [http://msdn.microsoft.com/en-us/library/bb125218.aspx]
{code}
Restore-Mailbox -Identity MargeSimpson -RecoveryDatabase RecoveryDB
{code}
!restore-mailbox.png!
9. Confirm your request to recover the mailbox content by clicking "Y."
{code}Are you sure you want to perform this action?
Recovering mailbox content from mailbox 'Marge Simpson' in the recovery database 'RDB' to the mailbox for 'Marge Simpson (MargeSimpson@simpson.si)'. This operation may take a long time to complete.
[Y] Yes [A] Yes to All [N] No [L] No to All [?] Help (default is "Y"):{code}
h4. More useful commands while restoring a user mailbox
1. To check the database user content, run the following command:
{code}Get-MailboxStatistics –Database "RecoveryDB"{code}
2. To check the state of the database, run the following command:
{code}eseutil /mh '.\Mailbox Database 0091898942.edb'{code}
3. Bulk restore for all mailboxes:
{code}Get-Mailbox -Database "SourceDB" | Restore-Mailbox -RecoveryDatabase "RecoveryDB"{code}
This command restores all mailboxes in the mailbox database SourceDB that are also present in the recovery database RecoveryDB.
{toc-zone}
{excerpt:hidden=true}Instructions on how to restore a MS Exchange 2010 previously backed up by CDP.{excerpt}
{info:title=Tip}Exchange 2010 no longer includes the concept of storage groups. In earlier versions of Exchange, one or more Exchange store databases can be grouped into a storage group, which can then be managed as a unit. Because storage groups were removed from Exchange Server 2010, a *recovery database* can be used.
{info}
CDP provides the ability to take a snapshot of the Microsoft Exchange. Since CDP is using the VSS Exchange writer, it ensures data integrity and consistency during the backup operation.
----
{toc-zone:location=top|maxLevel=3|minLevel=3|type=flat|separator=pipe|style=border:1}
----
h3. 1. Using CDP to Restore Database Data and Log Files
In order to restore a database, follow the instructions below.
1. Click on "Recovery Points" in the Main Menu to open the "Recovery Points" window.
|| Standard Edition || Enterprise Edition || Advanced Edition ||
| !menu-recp-st.png! | !menu-recpoints.png! | !menurecoverypointadva.png!\\ |
2. In the "Recovery Points" list, from the horizontal menu select the Agent where MS Exchange is installed and the appropriate Disk Safe to restore from.
!select-agent-ds.png!
3. Then select a Recovery Point to restore from and click on the "Browse" icon in the "Actions" column for this Recovery Point.
!select-agent-ds-browse.png!
{info:title=Tip}To find a Recovery Point, you can use the Basic and Advanced List Filters. See [CDP3:Customizing the Recovery Points List].
{info}
4. The "Browse Recovery Point" window opens.
!browse-rec-p.png!
See also: [CDP3:Browsing Recovery Points].
5. Browse to locate the SQL check point file, data and log files (Enn.chk, .mdf & .ldf).
!rec-p-location.png!
Select the checkboxes next to the files and folders to restore.
!rec-p-select.png!
6. Once the files and folders are selected, click on "Restore Selected."
!restore-selected1.png!
7. The "Restore Files" window will open.
8. Select the Agent where the MS Exchange is installed.
Specify to restore the files to an alternate location as we are later going to attach them to an Exchange Recovery Group.
!restore-files1.png!
9. Click "Restore."
!restore-button.png!
10. You can view the Restore Task results in the "Task History."
!menu-taskhistory.png!
11. In the "Task History" list, find the Task you want to view the summary for and click it. The "Summary" tab located on the bottom area accumulates general information about the task.
!task-success.png!
----
h3. 2. Using Eseutil to Replay Log Files
Once the files have been restored, it is time to run *Eseutil* to get the data files into a clean shutdown state so that they can be attached to a recovery storage group, and have the log files played into the backup.
On the Exchange server where the files were restored, open up the command prompt and change the directory to the location where you restored the {{.chk}}, {{.edb}}, and {{.ldf}} files. Operating inside of the directory, where the data and log files exist, eliminates misspelling and incorrect paths, etc.
For example, the files were restored to the {{c:\test}} directory, but since the original files were located under
{{C:\Program Files\Microsoft\Exchange Server\Mailbox\First Storage Group}},
The restore directory path will be:
{{C:\test\Program Files\Microsoft\Exchange Server\Mailbox\First Storage Group}}.
From this directory run the following command:
{code}
Eseutil /R Enn /I /D
{code}
For example:
{code}
Eseutil /R E00 /I /D
{code}
!eseutil1.png!
For more information on using *Eseutil* and the different commands, see the following technet article:
[http://technet.microsoft.com/en-us/library/bb123479(EXCHG.80).aspx]
----
h3. 3. Restoring a Mailbox Using Exchange Management Shell
1. Find the Exchange server database ({{.edb}}) file you have just restored. In our example, we rename this file to "RecoveryDB.edb."
!mail-rename.png!
!mail-rename1.png!
2. Create a folder for log files.
!new-folder.png!
3. Now we are going to launch the Exchange Management Shell to restore the mailbox. Go to Start !arrow.png! (All) Programs !arrow.png! Microsoft Exchange Server 2010 Exchange Management Shell.
!exc-shell.png!
4. The Exchange Management Shell screen will open.
!shell04.png!
5. Use the {{New-MailboxDatabase}} command to create a mailbox database object in the database container in Active Directory. For detailed syntax and parameter information, see [http://msdn.microsoft.com/en-us/library/aa997976(v=EXCHG.140).aspx|http://msdn.microsoft.com/en-us/library/aa997976%28v=EXCHG.140%29.aspx]
In our example, we restore the {{C:\test\RecoveryDB.edb}} file using the following command:
{code}
New-MailboxDatabase -Recovery -Name RecoveryDB -Server XCHG -EdbFilePath C:\test\RecoveryDB.edb -LogFolderPath C:\test\logs
{code}
!shell01.png!
6. Mount the newly created database RecoveryDB using the {{Mount-Database}} command. For detailed syntax and parameter information, see [http://msdn.microsoft.com/en-us/library/aa998871(v=EXCHG.140).aspx]. In our example we use the following command:
{code}
Mount-Database "RecoveryDB"
{code}
!shell03.png!
7. Use the {{Get-MailboxStatistics}} command to obtain information about a mailbox, such as the size of the mailbox, the number of messages it contains, and the last time it was accessed. For detailed syntax and parameter information, see [http://msdn.microsoft.com/en-us/library/bb124612%28ru-ru,EXCHG.140%29.aspx].
!shell02.png!
8. Extract mailbox content from a restored database using the {{Restore-Mailbox}} command. The {{\-RecoveryDatabase}} parameter specifies the recovery database from which you are restoring the mailbox. In the following example, we restore a "MargeSimpson" mailbox. More parameters for {{Restore-Mailbox}} can be found here: [http://msdn.microsoft.com/en-us/library/bb125218.aspx]
{code}
Restore-Mailbox -Identity MargeSimpson -RecoveryDatabase RecoveryDB
{code}
!restore-mailbox.png!
9. Confirm your request to recover the mailbox content by clicking "Y."
{code}Are you sure you want to perform this action?
Recovering mailbox content from mailbox 'Marge Simpson' in the recovery database 'RDB' to the mailbox for 'Marge Simpson (MargeSimpson@simpson.si)'. This operation may take a long time to complete.
[Y] Yes [A] Yes to All [N] No [L] No to All [?] Help (default is "Y"):{code}
h4. More useful commands while restoring a user mailbox
1. To check the database user content, run the following command:
{code}Get-MailboxStatistics –Database "RecoveryDB"{code}
2. To check the state of the database, run the following command:
{code}eseutil /mh '.\Mailbox Database 0091898942.edb'{code}
3. Bulk restore for all mailboxes:
{code}Get-Mailbox -Database "SourceDB" | Restore-Mailbox -RecoveryDatabase "RecoveryDB"{code}
This command restores all mailboxes in the mailbox database SourceDB that are also present in the recovery database RecoveryDB.
{toc-zone}
{excerpt:hidden=true}Instructions on how to restore a MS Exchange 2010 previously backed up by CDP.{excerpt}