How to Restore SharePoint 2013 Content from Unattached Database
Editor’s note: The following post was written Office Servers and Services MVP John Naguib as part of our Technical Tuesday series.
Restoring content is a vital process in SharePoint: what if you got a corrupted list/site for some reason and you want to restore your content from backup?
There is a simple way to restore content from content database backups without the need to attach the content database to your SharePoint farm. This technique is called restoring content from unattached database.
The first thig you need to do is to attach this database to your SQL server and then follow the following steps:
Go to Central admin and press Backup and Restore.
Under Granular Backup Section select “Recover from an unattached content database."
Enter DB server or the alias, the database name that is restored in the SQL server.
Select the operation to perform for restoring the site or list.
Then press next.
You will get this screen:
- Select the site collection if your database contains more than site collection.
- Select the site.
- Select the list (if needed).
- Enter file path from shared and accessible location over server.
- Press next.
- Page will appear stating the operation progress refresh pages until it is done.
Once export is done the file will be stored in the location specified.
The next step to restore the list or the site is running the following command:
Import-SPWeb https://siteurl.com -Path "E:\export.cmp" -Force -Confirm -IncludeUserSecurity
In this way you can restore content without the need to attach the database to your SharePoint farm.
You can apply this process to a test environment and then move the content later to production.
About the author
John is an expert consultant and solution architect with deep knowledge in SharePoint, including architecture, installation, configuration, testing and maintenance. In addition to being a consultant, he has a strong application development background in .NET applications. John has knowledge also in Office 365, Azure and several Microsoft products. He holds MCP, MCTS, MCITP, MCPD, MCT and TOGAF 9 Foundation certificates. John is a recognized SharePoint expert within the industry and has published several gold award articles on Microsoft TechNet. You can follow him on Twitter @johnnaguib.