Recover content from an unattached content database (SharePoint Server 2010)
Applies to: SharePoint Server 2010, SharePoint Foundation 2010
You can restore or copy content, such as sites, site collections, lists, or document libraries, from a content database without having to attach the content database to the farm.
Important
The SharePoint 2010 Service Pack 1 (SP1) upgrade process alters the schema of all content databases. Because of these changes, you might need to take additional steps to restore a backup that you made before the farm was upgraded to SP1 to the farm after it is upgraded to SP1. For more information about doing this, see Restore pre-SP1 backups to an SP1 farm (SharePoint Server 2010).
Use Windows PowerShell to recover content from an unattached content database in SharePoint
You can recover content from an unattached content database by using Windows PowerShell.
To recover content from an unattached content database by using Windows PowerShell
Verify that you meet the following minimum requirements: See Add-SPShellAdmin.
On the Start menu, click All Programs.
Click Microsoft SharePoint 2010 Products.
Click SharePoint 2010 Management Shell.
At the Windows PowerShell command prompt, type the following command:
Get-SPContentDatabase -ConnectAsUnattachedDatabase -DatabaseName <DatabaseName> -DatabaseServer <DatabaseServer>
Where:
<DatabaseName> is the name of the unattached database from which you want to recover content.
<DatabaseServer> is the name of the database server that hosts the unattached database from which you want to recover content.
For more information, see Get-SPContentDatabase.
Note
We recommend that you use Windows PowerShell when performing command-line administrative tasks. The Stsadm command-line tool has been deprecated, but is included to support compatibility with previous product versions.
Use Central Administration to recover content from an unattached content database in SharePoint
You can recover content from an unattached content database by using Central Administration.
To recover content from an unattached content database by using Central Administration
Verify that the user account that is performing this procedure is a member of the Farm Administrators group and is a member of the db_owner fixed database role.
In Central Administration, on the Home page, click Backup and Restore.
On the Backup and Restore page, in the Granular Backup section, click Recover data from an unattached content database.
On the Unattached Content Database Data Recovery page, type the database server name in the Database Server text box and type the database name in the Database Name text box.
Select the database authentication method that you want to use.
Select the Browse content option, and then click Next.
Click Start Restore.
On the Browse content page, select the site collection, site, and or list that you want to restore, select the Backup site collection or Export site or list option, and then click Next.
Complete the process to restore the content. For more information about using the Backup site collection option, see Back up a site collection in SharePoint Server 2010. For more information about using the Export site or list option, see Export a site, list, or document library in SharePoint Server 2010.