SharePoint 2010 Unattached Content Database Recovery: Not Recovery, Just Export

June 25, 2010

When SharePoint 2010 early sneak preview was first published by the product team, one of the big wow’s were the new granular content restore capabilities, available right there in Central Administration. While this is certainly an improvement compared to earlier version of SharePoint, I still cannot call this functionality “granular content restore”. Let’s walk through the steps required to restore a document from database backup with these new capabilities.

How to Restore from Unattached Content Database, Step by Step

1. Find the backup file that contains that document you need. You’ll need to know document original location so that you can match that to the content database. You will also need to find out when the document was corrupted or deleted, so that you grab the backup file from the right date. When you have all this information you can find the reuqired backup file (or probably request it from your SQL DBA or Backup operators).

2. Restore content database to a temporary location. Backup file is not enough, to use the unattached content database recovery you need the database mounted on a SQL server. This can be the same SQL instance used by SharePoint, or a different SQL box. If you restore into the same SQL instance make sure you (or your SQL DBA’s) use a different name for the restored database and don’t override the production content! Note the name of the SQL Server instance and the name of the database copy.

3. Go to SharePoint Central Administration, navigate to Backup and Restore and click the “Recover data from an unattached content database” link under Granular Backup.

4. Type the SQL Instance and temporary database names and specify what you want to do. Note that none of the available options actually allows you to restore a document, you can either create a backup of site collection or export a site or list. If you only need a single document, you’ll need to export the library in order to get it.

5. Select site collection, site and list to export. In this step you also specify the name for the export file and the export options, such as whether security and versions should be included in the export. You are ready to start the export.

Congratulations, you have completed the Unattached Content Database Recovery now! Wait, did you actually need that document? All you have is the export.cmp file, where to look next? There is no import available in the Central Administration UI. So what do you do next?

6. Start the SharePoint Management Shell, which is PowerShell with Microsoft.SharePoint.PowerShell snap-in already loaded. Then use the Import-SPWeb cmdlet to import the library. It is important to understand you cannot restore list or library under a different name. If a document library with the same name already exists in the destination site, import will merge contents and by default create new document versions where possible.

7. Finally, browse to the imported library and get the document you just restored. Once this is done, you can safely delete the imported document library from SharePoint, and delete the temporary database from SQL server.

Pros and Contras of Unattached Content Database Recovery

If you ever had to perform granular content restore via a recovery farm in SharePoint 2003 or SharePoint 2007, you can see the process is not very different with 2010. The big step forward is that there is no need to maintain the recovery farm for SharePoint 2010 and you don’t have to attach the temporary database to the farm. You also have the UI to do the export via Central Administration.

However, that’s where improvements end and all the limitations remain:

  • You have to know exactly which backup contains the requested data, there is no search available. If you make a mistake, it is not until the very last step in the process that you find out the document you looked for is missing after the import and you have to start it all over.
  • You must use higlhy privileged account to perfrom all operations in both SQL and SharePoint, which might not be possible in some environments. Sometimes in a large organization it would take 3 different people to perform the task.
  • There is no single UI to perform the operation from the first to the last step. You have to use SQL backup management tools, SharePoint Central Administration and PowerShell, which obviously increases time to restore.
  • Granularity is limitied. You can restore a site collection, a site or a list/library.
  • Finally, all inherited limitations of SharePoint export and import apply when restoring sites and lists from unattached content database.
Technorati Tags:
Advertisements

13 Responses to “SharePoint 2010 Unattached Content Database Recovery: Not Recovery, Just Export”

  1. Vanathi Says:

    Hi

    Very useful post. Really good for those who are exploring 2010. May i know whether any other third party tool improves the recovery in such cases? I’m not sure whether the third party tools also need such steps.

    Regards
    Vanathi


  2. Vanathi,

    Yes, it is possible that you can restore content quicker with 3rd party tools. There’re many on the market, I work for a company that actually develops one – Quest Recovery Manager for SharePoint.

    Ilia

  3. Jake Whistle Says:

    Hi, Very helpful post and blog. Just stumbled upon your blog while looking at 2010 options – thanks again.

    Cheers,

    Jake


  4. Jake, great if this helped you understand how the granular restore works in 2010.

    Ilia

  5. David Warnor Says:

    Hello Vanathi,

    You can try stellar Phoenix SharePoint Recovery.


  6. […] may be entirely possible that I am doing the backup restore process incorrectly. I tried following these instructions, but received the error at Step 4. This entry was posted in sharepoint and tagged […]

  7. Anax Says:

    Very very useful post. Thank you so much for this information.

  8. Bob e Says:

    This is wonderful, thanks you just saved my butt :)

  9. Balazs Says:

    Thank you!
    This article is a life saver..

  10. MartinM Says:

    Thank you!
    This post is time saver..

  11. Denis Says:

    This worked well, thank you!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: