For a second part of the series, please go here.
In Microsoft Exchange 2013, Public Folders were re-engineered using mailbox infrastructure to take advantage of the existing high availability and storage technologies of the mailbox database. Public folder architecture uses specially designed mailboxes to store both the public folder hierarchy and the content. This also means that there’s no longer a public folder database. High availability for the public folder mailboxes is provided by a database availability group (DAG). To learn more about the general architecture about the public folders please visit the blog post: Public folders in the new Office.
We are currently seeing that customers have started using and taking the advantage of the new public folders feature in Microsoft Exchange 2013. Since the public folders have been re-designed, it becomes very important to plan for recovery of deleted data as well.
This blog post we will be exploring various recovery scenarios that can occur with public folders in Microsoft Exchange 2013.
To understand this let’s take an example:
A user who deletes the content from a specific folder will see the following message:
To then recover that data, user just needs to click on the Recover Deleted Items option in Outlook which will pop up a new window and will list the items to be recovered. From there, use the usual selection and Recover Selected Items functionality.
If you need to recover the items from a public folder where deleted items have passed the retention period the only option is to restore from the last full good backup for the database which hosts the associated public folder content mailbox. This behavior is similar to the recovery of contents in normal mailboxes.
You will have to restore the database files to a Recovery Database. Once the restore is complete you will have to use the below command to complete the recovery.
New-MailboxRestoreRequest –SourceDatabase “Name of Recovery database” –SourceStoreMailbox “mailbox containing affected public folder” –TargetMailbox “mailbox to which data is recovered” –AllowLegacyDNMismatch –IncludeFolders “name of affected folder”
The missing data will be recovered to the affected public folder.
Note: Make sure that the Microsoft Exchange 2013 Server is updated with Cumulative Update 2 (Ref: Exchange 2013 RTM CU2 (712.22) Issue - Public Folder Permissions Loss after PF Mailbox Move)
Outlook Clients make the job of recovering deleted public folders easy. The following things are necessary for the successful recovery of public folders:
Moving further let’s consider a scenario where you need to recover a root public folder which was deleted.Let’s say the permissions need to be granted to the user who wants to recover the root public folder.
In Exchange Admin Center (EAC) assign the permissions to the relevant user who wants to recover the public folder and click on save button and exit out.
Once the Root permissions have been assigned to the required user, the user can recover the public folder using the regular Outlook recover Deleted Items functionality. Once the folder is recovered, remove the permissions for the user that you added at the root level, if so desired.
A few things to note:
New-PublicFolderMoveRequest -Folders \<Folder name> -TargetMailbox "Target mailbox name"
For more information visit: New-PublicFolderMoveRequest
If the root public folders also had the Child folders which were recovered, you might need to also move the child public folder to the Secondary mailbox explicitly. Moving the root public folder to another mailbox will not change the content mailbox for the respective child folders. In order to move the branch of public folders to respective content mailboxes use a script named .\Move-PublicFolderBranch.PS1
Things to note:
While recovering public folders using Outlook is one of recovery options, we still have Exchange Management Shell which will help us in recovery scenarios and can make the job easier. Let’s say you need to restore a public folder to the root path or you are not the owner of the public folder which was deleted and you need to recover it.
You run the command:
Get-PublicFolder –Identity “\NON_IPM_SUBTREE” –Recurse | FL >C:\pf2.txt
Once the command is run it will create a text file. You need to open it and find the affected public folder path.
Let’s say I have a folder named “Test-3” which is deleted. I will search for the required folder in the text file:
Now open the Exchange Management Shell and run the following command, to recover the folder:
Set-PublicFolder –Identity “\NON_IPM_SUBTREE\DUMPSTER_ROOT\<GUID>\Test-3” –Path “\” –Verbose
That is all! You can now open Outlook and access the public folder which you just recovered. The contents along with the permissions will be restored.
You can use the same process to also restore any deleted child public folder or entire branch of public folders which are deleted. Simply restore the Root folder and all of its content (including any child folders) will be restored with it.
Note: It’s not necessary to restore the Child public folder to its own Parent folder. It can also be restored to the root public folder hierarchy by specifying the desired path.
Recovering public folders within retention period is very easy, but recovering public folders which have been deleted from dumpster is more challenging. You need to restore a last full good backup for the affected public folder.
Similarly to recovering items past retention period, once you restore the database to a Recovery database you need to run a Shell command to restore the contents to the affected public folder.
There are certain pre-requisites for this recovery method:
Let’s walk through a scenario to understand this more clearly.
You have a folder named June Reports which has expired and cannot be recovered from deleted items, and therefore needs to be recovered from backup
In order to recover the deleted June Reports folder from the restored database, we need to have a folder with a name of “June Reports” in the target public folder mailbox to which the data is being restored. This is a limitation of the restore process at this time.
So, to walk through specific steps:
We need to recover a root public folder named June Reports. I have last full good backup with me which has the required data. Restore the database to a Recovery Database. Once the database has been restored you will have to perform the following steps:
Create a new public folder with name “June Reports” in a public folder content mailbox if it does not exists. If it exists, then you can skip this step.
New-PublicFolder –Mailbox “Content Mailbox name” –name “June Reports”
Next you will run the command:
New-MailboxRestoreRequest –SourceDatabase “Name of Recovery database” –SourceStoreMailbox “recovered mailbox containing affected public folder” –TargetMailbox “target mailbox to which data is recovered” –AllowLegacyDNMismatch –IncludeFolders “name of affected folder”
After that completes, you can run the below command to check if the command was successfully in restoring the contents:
Get-MailboxrestoreRequest | Where { $_.Status –eq “Completed” }
To confirm the restore is completed, run the command Get-MailboxRestoreRequestStatistics and check the value of ItemsTransferred
Now, in Outlook the affected folder should have all restored items:
You should see the recovered items along with the new items in the folder.
For more information check:
In the above blog post I tried to shed some light on how to recover the contents from public folders when they are deleted and have also discussed the scenarios where we need to recover the entire public folder. I plan to continue posting other public folder recovery scenarios in additional blog posts (Part 2 can be found here).
I would like to Thank Ben Winzenz, Bill Long, Charlotte Raymundo, Nino Bilic and Bhalchandra Atre for their help in reviewing this blog post!
Siddhesh Dalvi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.