As a SharePoint administrator, were you ever in the position of having to recover lost or deleted information from your SharePoint 2007 farm? This is something most SharePoint administrators have likely faced at least once. Most administrators resorted to building a completely separate recovery farm, where a recent backup of the production environment could be restored, exported, and then imported back into the production environment, or they used third-party tools to assist with recovery efforts.
SharePoint 2010 gives administrators a very handy feature right out of the box for recovering data, and best of all, it’s all done directly through Central Administration. This feature is known as the Unattached Database Recovery method. As the name suggests, it gives administrators the ability to recover data directly from a SharePoint content database that isn’t directly attached to the farm. In fact, the database can even live on a completely separate instance of SQL Server.
But what constitutes an unattached database, anyway?
Well, in SharePoint terms, it’s simply a database that contains SharePoint content. It could be a production database backup restored to a new database, a database left behind after removing its associated Web application, or even a database snapshot taken using SQL Server 2008 Enterprise Edition.
If you have current database backups (and you do right? Of course you do. You are a responsible SharePoint administrator!), you can use these to easily browse for and export content from Central Administration. From the Central Administration home page, you can click Backup and Restore, then click Recover data from an unattached content database. SharePoint will prompt you to provide the name of the database server and the name of the database (or snapshot), and ask if you would like to browse the content, export a site or list, or back up a site collection.
Generally, you will want to browse the database for the site or list you want and then export it. This recovery method allows for site collections, sub-sites and even individual lists to be recovered without ever having to leave the production farm.
The export process is all done within the GUI and is pretty straightforward, but to actually import the list or site back into the farm from the file generated during the export process, you’ll need to use the PowerShell cmdlet Import-SPWeb. You’ll be prompted for the few required parameters and, before you know it, the data will be written back into the production environment. Data recovery now takes a matter of minutes and can be accomplished using out-of-the-box tools.
Ryan Keller is a consultant with SharePoint911.