Recovering public folder information in Exchange 2013
Published Aug 23 2013 02:01 PM 46K 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
Not applicable

Good one :)

Not applicable

Thank you, very thorough and easy to follow.

Not applicable

That is waaaay complex. Can we not just have a wizard or maybe even a window? This is running on an operating system still called "Windows" right? Why is Exchange 2013 so difficult to use now? It looks like Linux.

Not applicable

Good One Siddhessh :)

Not applicable

Good article BUT we live year 2013 and this the best Microsoft can provide to restore public folders! Almost like a joke but it isn't. Other vendors has provided GUI and item level restore for a long time ago for Exchange in general. And can you believe that Microsoft's own product System Center DPM can backup legacy public folders but can do only database level restore? It shouldn't be so hard.

Not applicable

If you want to make a windows product, then make a windows product that actually includes all the features and settings in a gui window. That's what windows product does. If we're all going to end up running power shell anyway just ditch windows and make exchange run on ubuntu adn be done with it. I like public folders can now be part of an availability group. however it is nuts the complexity and manual steps and coding we have to do now in 2013 which seem harder than we had to do in 2010 or 2007.

Exchange 2013 makes my job harder than exchange 2010.

Not applicable

Restoring any public folder should be an easy click of a button and some check boxes, not an "oh my hell, I need to delve into PS recuse commands with pipes and dumping things to TXT files mode again after I PS remote into my Exchange server".

Nice article. I'm assuming only the user who deleted the public folder would be able to recover the public folder via Outlook? Fantastic job.

Not applicable

Exchange Management Shell interface is not a new thing, it's been around since Exchange 2007 days. The biggest improvement, you can now perform Public Folder recovery using Recovery databases.

Not applicable

Bhalchandra, Windows is not a "new thing" either. it's been around a lot longer than Exchange and we install Exchange on top of this "Microsoft Windows" thing.

Not applicable

To recap. In 2007 we had the EMS which was good. In 2010 we have the EMS, the EAC, and a fully featured toolbox.  In 2013 we now just have the EAC and one tool left in the toolbox. Half the features are now missing from the Exchange UI and we are required to use command-line to configure our servers. We can't even get the default EAC to load without a certificate error right out of the box because it requires us to go into the command line and configure certificates.

This is a massive step-backward in functionality that only serves to assist with the cloud services. It's an absolute slap in the face to your onsite IT folks. If you are not going to write Windows applications, then please just port Exchange to FreeBSD or something else that will work even better with command lines than Windows does. Windows is for Windows applications. If you are not going to write Windows applications and Windows UI anymore, then stop shipping Exchange on Windows and put it on Unix where it belongs.

Not applicable

why "jerry" I thought the name was PFMBX2:)

also on the past retention time scenario looks like mess

lets say the user didn't tell you he deleted, you don't know who deleted what how do you find out? Auditing?

in the diagram there is two folders(maybe the intention was to show items) underneath "June reports" will these(if they are folders) get restored?

when will exchange "know" how to restore(from dumpster) the whole folder structure?

its a pain and the only reason why we restore from tape(because retention has the data but not the structure, so it blocks you from going backup less)

Not applicable

@itworkedinthelab,

Only users who has owner permissions will be able to delete the folder, other users wont and eventually why would user delete the folder unnecessarily unless it is not required :) and moreover we always have the dumpster settings in place where the folder

can always be recovered using the Shell or the owner can use the outlook to perform recovery.

if the folder is not present in the Hierarchy and if it needs to be restored, it has to be created and you can refer to the recovery method discussed in the blog.

also at this point of time we do not have auditing for the PF mailboxes. Please see #

technet.microsoft.com/.../jj552408(v=exchg.150).aspx

Not applicable

trust me they do(and they are owners) why? because they don't know  what they are doing sometimes:)

so basicly the easiest way to configure it from the getgo right now is(we are in migration design phases):

put retention to some decent amount like 90 days

use shell for easy recovery and also have script that audits the hierarchy just in case(to have on file what was where)

another small question:

I assume single item recovery is configurable for these public folder mailboxes right(eliminates the shift+delete possibility)?

Thanks

Not applicable

Thanks so much for this information :)

Not applicable

I would suggest this application to recover your outlook files. I personally tried and it worked like a charm

gallery.technet.microsoft.com/OST-Recovery-Recover-84522a9e

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