Recovering public folder information in Exchange 2013
Published Aug 23 2013 02:01 PM 46.1K Views

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.

Recovering items deleted from public folders

  • With the public folder now being in a mailbox, we will follow the method for recovering the deleted items as we have been following earlier for recovering items from Dumpster with “regular” mailboxes
  • Recover deleted items for public folders is enabled by default from Outlook 2007 onwards, which is the minimum client required for Microsoft Exchange 2013.
  • Items or content deleted go directly to the Dumpster where they are retained as per the retention settings set on the public folder or the default settings are inherited.

To understand this let’s take an example:

A user who deletes the content from a specific folder will see the following message:

image

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.

image

How to recover items which are past retention period?

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)

Using Outlook to recover deleted public folders

Outlook Clients make the job of recovering deleted public folders easy. The following things are necessary for the successful recovery of public folders:

  • The user recovering the public folder should have the Owner permissions on the public folder being recovered.
  • Public folder should be within the deleted items retention period.
  • If the folder being recovered is a root folder, the user should also have owner permissions at the Root level.
  • If the recovered public folder is a Child folder of another folder, the user should also have the Owner permissions on the Parent folder.

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.

image

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:

  • When public folders are recovered using Outlook client, you will need to rename them to their original name once they are recovered.
  • Any root public folder which is recovered using Outlook will be restored to the Primary Public Folder mailbox. If you you need to move the Public folder to the original secondary mailbox, you can do so using the command:

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:

  • It might be easier to use Exchange Management Shell preferably in scenarios where you need to recover the deleted Child public folders or deleted parent public folder which also has the child folders (see below)
  • Any Root public folder which is deleted and recovered using the Outlook client should have their original permissions retained. If the root public folder recovered also had child public folders, then the permissions of child folders will be replaced and inherited from the parent public folder.

Using Exchange Management Shell to recover deleted public folders

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:

image

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

image

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.

How to recover folders which are past deleted items retention period?

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:

  • For recovery of any public folder mailbox data, we should have “target” folders created in the target mailbox. In other words, the data that you are trying to recover will not create the folder structure automatically (at this time)
  • Make sure that the Microsoft Exchange 2013 Server is updated with Cumulative Update 2 to avoid any permissions issues as discussed in the blog post (Exchange 2013 RTM CU2 (712.22) Issue - Public Folder Permissions Loss after PF Mailbox Move)

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.

20130823-153526

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”

image

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”

image

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” }

image

To confirm the restore is completed, run the command Get-MailboxRestoreRequestStatistics and check the value of ItemsTransferred

image

Now, in Outlook the affected folder should have all restored items:

image

You should see the recovered items along with the new items in the folder.

For more information check:

Conclusion

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

15 Comments
Version history
Last update:
‎Jul 01 2019 04:14 PM
Updated by: