Recovering Public Folders After Accidental Deletion (Part 1: Recovery Process)
Published 02/06 courtesy of MS Exchange TeamOverview
This two-part blog series will outline some of the recovery options available to administrators in the event that one or more public folders are accidentally deleted from the environment. The first part will explain the options, while the second part will outline the architectural aspects of public folders that drive the options.
Introduction
In older versions of Exchange, mailbox and mailbox database recovery was a long, complicated process involving backups, recovery servers, and changes to Active Directory. Successive versions of the product have introduced more and more functionality around recovery (recovery storage groups/databases, database replication, etc.), and were now at the point where restoring a mailbox is a seemingly trivial operation, and restoring a mailbox database is almost unheard of. But mailboxes arent the only data stored on Mailbox servers in Exchange Server 2010, and the procedure for restoring public folders and public folder databases differs greatly from the mailbox procedure.
Review of Recovery Options
The first two recovery options are detailed either in TechNet or elsewhere on the Exchange team blog site, so Ill simply list them here and then move on to the real purpose of this blog. The recovery options for public folders and public folder databases in Exchange Server 2010 are as follows, from the easiest to the most complex:
- Recover deleted folders via Outlook (detailed in http://technet.microsoft.com/en-us/magazine/dd553036.aspx).
Note: Exchange Server 2010 Service Pack 2 fixes an issue where users were unable to use Outlook to recover deleted public folders. This is another reason to upgrade your Exchange Server 2010 systems to SP2 at the earliest opportunity.
- Recover deleted folders via ExFolders (http://blogs.technet.com/b/Exchange/archive/2009/12/04/3408943.aspx).
- Recover folders via public folder database restore.
The first option is the easiest and most obvious - if an end user accidentally deletes a folder, he or she should be able to undelete that folder using Outlook. Failing that, an administrator should be able to use ExFolders to recover that folder. But what if these options wont work in your situation? What if the end user didnt realize he or she deleted the folder, and a month has passed? Or what if your organization has changed the retention settings for deleted public folders, and essentially eliminated the dumpster? How do you recover public folders in this case?
Recovery Options
At the heart of public folder recovery is a painful truth: you cant delete a public folder from the organization and recover it by simply restoring an older version of a public folder database. If you restore a public folder database from backup and place it back into production, you’ll see the public folders only until the server receives replication messages. Because the public folder hierarchy – the list of all folders in the environment – no longer includes the folders which were deleted, the target server has copies of folders which, from Exchange’s perspective, don’t exist. As soon as that public folder database receives a hierarchy update, it will see that those public folders aren’t present in the hierarchy, and the store will delete the public folder again. Since you can’t edit the hierarchy via the Public Folder Management Console (or even via adsiedit.msc), you cant manually add that public folder back in. So, given this limitation, how do we recover that public folder?
Consider the following points:
- If you dont replicate every folder to every database, you would need to delete all current databases and then recover from backup any database that contains unique content. This only works if you have recent backups, of course, and would also require that you export any content generated since that backup, since you’re going to delete all of the existing databases. The deletion is necessary because if a restored public folder store receives hierarchy replication from one of the existing public folder stores, the whole exercise is for naught.
- If you do replicate all folders to all stores in the environment, you can delete all stores and just restore one database, then replicate the content from that database out to the other servers. Again, this depends on all databases having duplicate content, and you must delete all existing databases before restoring the one from backup.
- You can restore a backup of the public folder database to an isolated Exchange environment, connect to the public folder database with Outlook, export all content to a series of PSTs, create new folders in the production environment with the same names as the deleted folders, and then import all of the content. This is obviously a somewhat manual process, and most administrators arent going to want to do this.
Recommended Recovery Procedure
Thankfully there is a much easier process which can be performed in-place and with a minimum of fuss.
- Select one of the existing public folder servers in the environment. [Using an existing server simplifies the process a bit.] You will isolate this system from its replication partners, so choose a system that doesn’t serve as the source for a lot of content which needs to be replicated.
- Using Registry Editor, set the value of the Replication registry key (HKEY_LOCAL_MACHINESystemCurrentControlSetServicesMSExchangeIS<servername>Public- <GUID of Public Store>) to 0 (zero).
Note: You may need to create this DWORD key if it doesn’t already exist. Further information on the Replication registry key is available in the article, “Replication does not occur for one Exchange server in the organization” (http://support.microsoft.com/kb/812294). This registry key also applies to Exchange Server 2007 and 2010.
- Restore the public folder database in place using your normal restoration procedure.
- Using an Outlook client, log onto a mailbox which uses the restored public folder database as its default public folder store (this is necessary in order to see the restored folders). If you don’t have a mailbox database which uses that public folder database as its default, either create a new mailbox database (recommended) or change an existing mailbox database to use the newly-restored public folder database.
- If necessary, click the Folders icon at bottom left of the Navigation screen, and then expand the public folders node.
- Copy each of the folders you wish to restore to another location within the public folder hierarchy. If you’re restoring an entire hierarchy, you can simply Ctrl-click and drag the root folder to make new copies of all subfolders. Although the new folders will have similar names to the originals, the underlying folder IDs (FIDs) are different.
- Once you’ve created copies of all of the folders, verify that the replica lists include all desired targets (and reconfigure as appropriate).
- At this point, it’s now safe to reintroduce that server into the production environment. To do so, dismount the public folder database, delete the Replication registry key (or set it to 1), and then remount the database.
- As soon as hierarchy is replicated to the server, the original folders will once again disappear, but the copies of the folders will be replicated to all replication partners.
You may need to add mail-enabled public folders back into distribution groups, as their SMTP addresses will likely be different from those on the original folders. End users will also need to recreate public folder favorites in Outlook.
Summary
Recovering from accidental public folder deletion can be difficult, especially if you don’t take hierarchy replication into account. By restoring into an isolated environment, and then cloning the folders to be restored, you can work around this limitation and restore the missing content. In the next blog entry, I’ll explain the underlying architecture of public folders (including replication, change numbers, and the replication state table) to show why these steps are so necessary.
John Rodriguez
Principal Premier Field Engineer
Microsoft Premier Support
Recent SharePoint Questions
- BIS and Exchange
- Exchange 2007 MAPI log
- Forwarding e-mail
- Accessing my work email from home?
- What’s on the horizon?
- What’s been the assessment of Exchange by industry analysts?
- What was added to Exchange Server 2007 that made it different from its predecessors?
- What was added to Exchange Server 2003 that made it different from its predecessors?
- What versions of Exchange are being used today?
- When does it make sense to only provide Web access to Exchange?
more sharepoint questions
More Articles By
Uncovering the new RPC Client Access Service in Exchange 2010 (Part 3)
The new RPC Client Access service included with Exchange 2010. Read more
Exchange ActiveSync and iPhone OS 3.1
Many Exchange Server customers have reported issues logging on to Exchange using iPhone devices older than iPhone 3GS. iPhones support Exchange ActiveSync (EAS), the same protocol supported by Windows Mobile…
AppRiver Exchange Hosting - Voted MSExchange.org Readers Choice Award Winner - Exchange Hosting
AppRiver Exchange Hosting was selected the winner in the Exchange Hosting Category of the MSExchange.org Readers Choice Awards. Intermedia Hosted Exchange and Apptix Exchange Hosting were first runner-up and second…
More Articles Under "Blogs"
The Elusive Kingston SSDNow 40 Gb Solid State Drive
Ive been waiting for the Kingston SSDNow V Series 40 Gb solid state drive (SNV125-S2/40GB).NewEgg.coms ShellShocker deal of the day— $84.99 (after a 20 dollar rebate), and free shipping. Unfortunately,…
Exchange Server 2010 Released
Microsoft announced the release of Exchange Server 2010 today at Microsoft TechEd 2009 in Berlin. The release marks the first version of Exchange Server designed for the cloud, and provides…
Windows 2008 R2 Support Coming for Exchange 2007
Exchange 2007 will be supported on Windows Server 2008 R2, Kevin Allison, GM Exchange Customer Experience, posted on the Exchange team blog today. With the general availability of Exchange 2010…
Most Viewed Content
- Uncovering the new RPC Client Access Service in Exchange 2010…
- Exchange ActiveSync and iPhone OS 3.1
- AppRiver Exchange Hosting - Voted MSExchange.org Readers Choice Award Winner…
- Address Lists in Exchange 2007 (Part 4)
- SmarterTools and Microsoft Patent Licensing Agreement Extends Exchange ActiveSync Reach…

