SharePoint 2010′s New Granular Content Restore Capability

In a previous post, I documented some of the exciting new functionality that PowerShell provides for backing up a SharePoint 2010 farm. Now, let’s look at the other side of the coin – restoring.

Restoration is usually needed in one of three basic scenarios:

  1. A user has deleted or messed up some critical content.
  2. An administrator has had a configuration mishap.
  3. A natural / man-made disaster or hardware failure has completely taken down the farm.

The way you would go about recovering from each of these scenarios would be very different. In this post, I’ll address the first – Content Deletion. I’ll do a follow-up post to address the admin-level mishaps and recovery from a true disaster.

For now, let’s pretend that some well-meaning power user has been trying to clean up the Logos library in our root site to eliminate redundancy and recover some space within our quota. However, they have inadvertently deleted the logo used as our site image – and in a quest to be thorough they’ve deleted it from both Recycle Bins before they noticed the problem.

We can now use the Central Admin site to look for a content database backup that predates the deletion, and then restore the content at as small of a scale as possible.

  1. Go to Start > Administrative Tools > SharePoint 4.0 Central Administration, and then click the Backup and Restore link on the left.
  2. Click on the ‘Restore from a backup‘ link in the top section of the page, select the appropriate backup from the list, and click Next.
    (If you don’t see your backup listed, try changing the Backup Directory Location entry and clicking the Refresh button.)
  3. Drill down through the hierarchy displayed to find the content database you need, and check to box to select it. Then click Next.
  4. Select New configuration, and enter either a new directory name, database name, or server name. Then click the Start Restore button.
  5. The timer service will now schedule and immediately run a job that asks the back-end SQL server to restore the old database without overwriting the live one. The time it takes will obviously vary according to the size of the database and the concurrent activity on the SQL server. The Job Status page will likely eventually show an error related to attaching the database to the Web Application. That’s not a problem – we didn’t want the old database to be attached anyway.
    (Note: You cannot restore over an existing database. You must either specify a new name / server or delete the previous database.)
  6. Return to the Backup and Restore page via the left-hand navigation pane, and click the Recover data from an unattached content database link in the bottom section.
  7. Enter the Database Server and Database Name, choose to Export site or list, and then click Next.
  8. Select the relevant Site Collection, Site, and List, enter a Filename (and path), and versions that you need. Then click Start Export.
  9. The Job Status screen will hopefully show a Succeeded message, and tell you that the cmp file is ready to be imported using PowerShell.
  10. Go to Start > Administrative Tools > SharePoint 4.0 Management Console, and type the following command:
    Import-SPWeb –Identity http://yourportalURL –Path filenameandpathtocmpfile –Updateversions 3

    This one felt a bit disconcerting to me at first, but we have to understand how the cmp file and the import command work. Notice the command is Import-SPWeb, not SPList. This is why it only asks us for the web application identity instead of the web or list identity. The cmp file we exported earlier contains the path all the way to the list and what’s available for importing (the contents of a single list in this example). Therefore, when the import command goes to read the cmp file, it is willing to import anything it contains – but only finds the items in the Logos library. The –Updateversions 3 parameter allows us to only restore items that don’t exist in the live library, ignoring the items that already exist. (For a complete explanation of the Import-SPWeb cmdlet, its parameters, and its usage, see its topic in the online SharePoint 2010 PowerShell Reference forum.)

Related Posts

080912_0319_HowtoAddthe1.png 080912_0319_HowtoAddthe2.png 080912_0319_HowtoAddthe3.png 080912_0319_HowtoAddthe4.png 080912_0319_HowtoAddthe5.png 080912_0319_HowtoAddthe6.png 080912_0319_HowtoAddthe7.png 080912_0319_HowtoAddthe8.png 080912_0319_HowtoAddthe9.png 080912_0319_HowtoAddthe10.png 080912_0319_HowtoAddthe11.png 080912_0319_HowtoAddthe12.png

How to Add the Meeting Workspace Button in the Outlook 2010 Ribbon to Create a Meeting Workspace

image.png image_thumb.png image.png image_thumb.png image.png image_thumb.png image.png image_thumb.png image.png image_thumb.png image.png image_thumb.png image.png image_thumb.png image.png image_thumb.png image.png image_thumb.png image.png image_thumb.png wlEmoticon-smile.png image.png image_thumb.png image.png image_thumb.png image.png image_thumb.png image.png image_thumb.png image.png image_thumb.png image.png image_thumb.png image.png image_thumb.png image.png image_thumb.png

How to Scale Out a SharePoint 2010 Farm From Two-Tier to Three-Tier By Adding A Dedicated Application Server

image.png image_thumb.png SharePointDropDownFilter.png

SharePoint 2010 Tutorial Video: Drop-Down Filters

Loading SharePoint Dlls into Reflector

Leave a Reply