Restore a Site Collection
Follow these steps:
- Recover the site collection content from an unattached content database.
- Select the Backup site collection option, and click the Next button.
- Select the site collection and provide the file location for the backup package.
- Select Overwrite existing file.
- Click the Start Backup button to begin the backup.
- The site collection is backed up to a file.
- $database = Get-SPContentDatabase -ConnectAsUnattachedDatabase -DatabaseName xxxx -DatabaseServer xxxx
- ConnectAsUnattachedDatabase: Specifies that only unattached databases in the farm are returned.
- DatabaseName: Specifies the name of the content database.
- DatabaseServer: Specifies the name of the host server for the content database specified in the DatabaseName parameter.
- For more information, see the article from Microsoft.
- Backup-SPSite -Identity xxxx -Path xxxx
- Identity: Specifies the URL or GUID of the site collection to be backed up.
- Path: Specifies the full path of the backup file (Example, C:\backup\sitecollection.bak).
- For more information, see the article from Microsoft.
- Click SharePoint Management Shell to launch the console.
- Use PowerShell commands to restore the site collection.
- Identity: Specifies the URL location to which the Site Collection is restored. (For example, http://www.contoso.com)
- Path: Specifies a valid path of the backup location.(For example, C:\backup\sitecollection.bak)
- For more information, see the article from Microsoft.
- Note:Restoring a site collection to its original location will fail. You can perform the following steps:
- New-SPContentDatabase -Name xxxx -DatabaseServer xxxx -WebApplication xxxx
- Name: Specifies the new content database to create within the farm.
- DatabaseServer: Specifies the name of the host server for the content database specified in the Name parameter.
- WebApplication: Attaches the content database to the specified SharePoint Web application.
- Restore-SPSite -Identity xxxx -Path xxxx -GradualDelete -DatabaseServer xxxx -DatabaseName xxxx
- Identity: Specifies the URL location to which the Site Collection is restored. (For example, http://www.contoso.com)
- Path: Specifies a valid path of the backup location.(Example, C:\backup\sitecollection.bak)
- GradualDelete: Specifies that the site collection being overwritten with the Force parameter should be gradually deleted over time by a timer job, instead of deleting all at once. It reduces the impact on SharePoint 2010 Products and SQL Server performance.
- DatabaseName: Specifies the SQL Server content database where the site collection data will be stored.
- DatabaseServer: Specifies the name of the SQL Server containing the content database specified by the DatabaseName parameter.
From Central Administration
Use PowerShell commands
Restore-SPSite -Identity xxxx -Path xxxx