Wednesday, May 13, 2015

Recovering deleted items from Public Folders in Exchange 2013



Exchange public folders by default store in Public Folder Mailboxes. So if you delete any item or content from the public folder, it directly goes to Dumpster where they are retained according to the retention settings. However, 14 days is the by default settings in Public Folder Dumpster.

So today I am exploring different recovery situation which arises with working on public folders in Exchange Server 2013.

Take scenario 1: Recovery of items deleted from public folder

If retention period is not passed yet, you can easily recover public folder deleted items using Microsoft Outlook. Open Microsoft Outlook and click Recover Deleted Items option under Folder menu. By clicking on the icon it will show you the new window which contains the list of deleted items. Now use the normal selection and Recover Selected Items functionality to recover those items.

Take Scenario 2: Recovery of items which have passed retention period

Once the retention period is over, the only recovery option is to restore the last complete backup for the database which hosts the related public folder content mailbox. You only need to run the below Powershell to complete the recovery once restore process is completed.

New-MailboxRestoreRequest –SourceDatabase "Enter here the name of Recovery database" –SourceStoreMailbox "mailbox containing affected public folder" –TargetMailbox "mailbox to which data is recovered" –AllowLegacyDNMismatch –IncludeFolders "name of concerned folder"

By running the above script, all your deleted mailbox data will be recovered to the concerned folder.

Public Folder recovery using Exchange Shell command

Public folder recovery using PowerShell is a quick way rather than using MS-Outlook. So take a case where you need to restore a deleted public folder to the root but you’re not the owner of that public folder. To do this, run the command-

Get-PublicFolder –Identity “\NON_IPM_SUBTREE” –Recurse | FL >C:\publicfolder.txt

It will create a text file publicfolder once the command is run. Now open this file and look for the public folder path. For example Folder1 is the deleted folder, so I will look for the Folder1 in the text file. It will look ahead Identify column.

Identify : \NON_IPM_SUBTREE\DUMPSTER_ROOT\f725f5b1-52ab-43df-83b4-2b3efa0a2ofd\ Folder1

Now open Exchange Management Shell and run the script-

Set-PublicFolder –Identity “\NON_IPM_SUBTREE\DUMPSTER_ROOT\<GUID>\Folder1” –Path “\” –Verbose

That’s it! Now open Microsoft Outlook and find the public folder which you want to recover.

Recovering Public Folder recovery which have passed retention period

Once retention period is over, it becomes a challenging task to recover a public folder which has been removed from dumpster. Again you will need to restore entire last backup to recover deleted public folder. Run the command once you have restored the database to the Recovery Database. 

New-MailboxRestoreRequest –SourceDatabase "Enter here the name of Recovery database" –SourceStoreMailbox "mailbox containing affected public folder" –TargetMailbox "mailbox to which data is recovered" –AllowLegacyDNMismatch –IncludeFolders "name of concerned folder"

Now before moving ahead, check few mandatory conditions-

1. The data which you are recovering through the process will not create folder automatically, so first you need to create ‘target’ folder in the target mailbox.
2. Also check that your Exchange Server Version (MSE 2013) is fully updated with Cumulative Update 2, so that there would be no chance of permission issue.

Let’s take an example, I have folder Office Data which cannot be recovered as it has been expired, so I need to recover it by restoring last backup.

First, I created Office Data target folder in the target public folder mailbox to which the data is being restored. Once the dataset has been restored, run the PowerShell-

New-PublicFolder –Mailbox “Mailbox name” –name “Office Data”

Now run the commands in a row-

New-MailboxRestoreRequest –SourceDatabase “Enter here the name of Recovery database” –SourceStoreMailbox “mailbox containing affected public folder” –TargetMailbox “target mailbox to which data is recovered” –AllowLegacyDNMismatch –IncludeFolders “name of concerned folder”
Get-MailboxrestoreRequest | Where { $_.Status –eq “Completed” }

Now run the command to confirm restore process is completed.

Get-MailboxRestoreRequestStatistics

Now open Microsoft Outlook to check all restored items. You can certainly see the recovered items item in public folder.

That’s it. However, there is also an alternate method to recover items from public folder if retention period is not over. Try a power Exchange database recovery tool to restore any types of item from public folder mailbox in Exchange 2013.

No comments:

Post a Comment