This SharePoint 2013 tutorial explains on backup and restore content database SharePoint 2013. What are the different approaches for backup and restore in SharePoint 2013? How we can backup and restore content database SharePoint 2013 from SharePoint 2013 central administration.
Backup and Restore content database SharePoint 2013
Backup and Restore content database SharePoint 2013 is a very important concept every SharePoint administrator should know in SharePoint technology.
In SharePoint 2013, we can perform this backup restore in 3 ways:
- SharePoint Central Administrator
- PowerShell scripts
- SQL Server Management Studio
Here we will discuss how we can take Backup and Restore content database SharePoint 2013 from SharePoint 2013 Central Administration approach.
Our objective is to back up and restore the web application on the same FARM. You might be wondering why should we do the backup and restore on the same FARM???
Think about this scenario when we are configuring any application services/change of authentication on a web application and if the behavior is adverse than expected we should be able to restore the old environment.
Backup content database SharePoint 2013
The first step is to take the back of the desired web application.
- Log on to SharePoint 2013 central administration with a FARM administrator account
- Click on “Backup and Restore” option as shown in the screenshot
- Select “Perform a backup” option from “Farm Backup and Restore” zone.
Select the required web application to be backed up and click on the Next button.
- Ensure that backup web application is selected as the desired
- Select Full / Differential as per the need
- Provide the backup to create the backup files
Note: This path must be a universal notation like \\servername\foldername
- Click on “Start Backup”
- SharePoint shows who requested this backup
- It shows the name of the web application the content DB is currently associated with
- Back directory path which we provided as part of step-2
- All the custom & Generic solutions deployed in the source web application
- Since we have initiated the backup job it is showing as A backup or restore is in currently in progress
Once the backup job completes you can see the status as “No backup or restore in progress”.
Restore Content Database SharePoint 2013
Now that we have completed the backup we will now see the steps to restore the web application from backup files in SharePoint 2013.
- Log on to SharePoint 2013 Central administration with FARM administrator account
- Select “Backup and Restore”
- Click on “Restore from a backup” in Farm Backup and Restore Zone.
- Provide the backup path till you see the backup folder and .xml file
- Click on refresh to see the backfile details
- Click on radio button and click on “Next”
Click on the checkbox of the desired content DB to be restored and say “Next”
- Click on Same configuration option as we are restoring on the same server
- Provide the FARM admin login details
- Click on start restore
Move site collection to another content database SharePoint
Now, let us see how to move site collections to other content databases in SharePoint 2013/2016.
There might have a situation where we need to move site collections to different content databases.
Suppose the content database grows very large in size (More than 100 GB), then we need to move the site collection to the different content databases in SharePoint.
We can move the site collection to another content database by using PowerShell commands in SharePoint.
But before moving we need to make sure:
- The destination content database must already exist.
- The source content database and destination content database must be located on the same instance of SQL Server.
- The source content database and destination content database must be attached to the same web application.
PowerShell command to Move Site Collections to other content databases in SharePoint
Below is the PowerShell command to move a single site collection to another content database in SharePoint 2013/2016.
First Open SharePoint 2013 Management Shell and then run the below command.
Move-SPSite <http://SiteURL> -DestinationDatabase <DestinationContentDataBaseName>
Here <http://SiteURL> is the name of the SharePoint site collection.
<DestinationContentDataBaseName> is the name of the destination content database.
PowerShell command to move multiple site collections to another content database in SharePoint
Below is the PowerShell command to move multiple site collections to SharePoint 2013.
Get-SPSite -ContentDatabase <SourceContentDb> | Move-SPSite -DestinationDatabase <DestinationContentDb>
Here <SourceContentDb> is the name of the original content database.
<DestinationContentDb> is the name of the destination content database.
You may like the following SharePoint tutorials:
- SharePoint 2010 to SharePoint 2013/2016/2019 Migration Steps (Database attach method)
- The database engine instance you selected is not valid for this edition of reporting services
- Shrink SharePoint config database transaction log files
- Cannot connect to the configuration database error in SharePoint
- Site content and structure missing SharePoint Online
- How to get all SharePoint users and groups using PowerShell
- Configure Excel Service Application in SharePoint
- How to get SharePoint features using PowerShell
Hope this helps happy administration in SharePoint 2013 and get to know how to do backup and Restore content database sharepoint 2013/2016.
I am Krishna.Vandanapu a SharePoint architect working in IT from last 13+ years, I worked in SharePoint 2007, 2010, 2013, 2016 and Office 365. I have extensive hands on experience in customizing SharePoint sites from end to end. Expertise in SharePoint migration tools like Sharegate, Doc Ave and Metalogix. Migrated SharePoint sites from SharePoint 2007 to 2010 and 2010 to 2013 several times seamlessly. Implementing CSOM with Microsoft best practices. Spent quality time in configuring SharePoint application services like User Profile, Search, Managed Meta data services etc. Now exploring SharePoint Framework and SharePoint 2019