Recover content from an unattached content database (SharePoint Foundation 2010)

 

Applies to: 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 Foundation 2010).

Use Windows PowerShell to recover content from an unattached content database

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

  1. Verify that you meet the following minimum requirements: See Add-SPShellAdmin.

  2. On the Start menu, click All Programs.

  3. Click Microsoft SharePoint 2010 Products.

  4. Click SharePoint 2010 Management Shell.

  5. 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

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

  1. 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.

  2. In Central Administration, on the Home page, click Backup and Restore.

  3. On the Backup and Restore page, in the Granular Backup section, click Recover data from an unattached content database.

  4. 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.

  5. Select the database authentication method that you want to use.

  6. Select the Browse content option, and then click Next.

    Click Start Restore.

  7. 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 (SharePoint Foundation 2010). For more information about using the Export site or list option, see Export a site, list, or document library (SharePoint Foundation 2010).