How to Migrate SharePoint Site Collections Between Content Databases?
Published On - 06 Nov 2019
A SharePoint site collection includes all of your sites, lists, content, and templates, which makes it the most crucial part of your SharePoint environment. But there are certain circumstances in which you might need to migrate your site collection from one database to another. For instance, if a site collection outgrows the content database on which it resides, then you need to move it to a larger content database.
In this article, we will discuss how you can migrate a site collection from one database to another with PowerShell Commands. Also, we have provided an alternate solution to migrate SharePoint site collection from one content database to another.
Things to know before migrating Site Collection
Before beginning the migration, make sure that the following conditions are true:
A content database should already exist as a destination
The source and destination content database must be located on the same instance of SQL server
The source and destination content database must be attached to the same web application
Also, it is necessary to analyze the size of the source site collection because the auditing data is also copied while moving the site collection. If the auditing data is large, you can archive and trim the audit data using PowerShell.
To find the size of a site collection, run the below command in SharePoint Management Shell: $used = (Get-SPSiteAdministration -Identity <http://ServerName/Sites/SiteName>).DiskUsed
Moving Site Collection between Content Databases
To move the site collection, you need to use Move-SPSite command in PowerShell. Using this command, you can move a single site collection as well as multiple site collections to a new content database.
Moving single-site collection
To move a single SharePoint site collection, you need to have the following memberships – securityadmin fixed server role, db_owner fixed database role, and the administrator group.
Open SharePoint Management Shell and type the below command in PowerShell command prompt: Move-SPSite <http://ServerName/Sites/SiteName> -DestinationDatabase <DestinationContentDb>
Here, http://ServerName/Sites/SiteName is the name of a site collection, DestinationContentDb is the name of the destination content database.
Moving multiple site collections
You need to have the same memberships as mentioned above to move multiple site collections from one content database to another.
Open SharePoint Management Shell and type the below command in PowerShell command prompt: Get-SPSite -ContentDatabase <SourceContentDb> | Move-SPSite -DestinationDatabase <DestinationContentDb>
Here, SourceContentDb is the name of original content database and DestinationContentDb is the name of destination content database.
Using these commands, you can easily migrate site collection from one content database to another. However, there is another method to migrate site collection from one server to another – using backup and restore of SharePoint site collection.
Kernel SharePoint Migrator is an advanced utility that makes it easy for users to migrate between SharePoint versions. It comes with smart features that allow you migrate site collection between content databases. Using this utility, you can also migrate data from File System to SharePoint Server and OneDrive. Also, SharePoint Migration software offers a simple working process, which makes it easier for non-technical users to migrate their data.
Download and configure the software on your system.
Launch the tool, and the home screen will appear on your screen. Click Add New Source, and select SharePoint Server from the drop-down.
The Add New Site wizard will appear on your screen. In this section, give a name to the project, provide Site Address, user credentials, and then click Find Site Collection.
In the Find Site Collection wizard, provide the required details for SharePoint Site and click Next.
The Site Collection URLs will appear on the screen, select the required Site Collection, and click Finish. The source site will be added to the tool.
Note: Make sure you don’t add the same site as both Source and Destination. The tool prompts a message to add the same Server as both Source and Destination while adding SharePoint Server.
Similarly, you can add another SharePoint Server as a destination in the tool.
Once both source and destination SharePoint Server are added. Right-click on the Source Site Collection and select Copy.
Now, in the Destination section, right-click on the SharePoint Server and click Paste.
The SharePoint to SharePoint Migration dialogue box will appear on the screen. Here, you can add another SharePoint Site for Migration, else click Next.
In the next step, select Migrate as site collection and provide the details for destination SharePoint Server, and then click Next.
In the next step, give a Title to the migration process with a description, provide Site Collection URL, and then click Next.
Select the required copy options and click Next.
You can select whether you want to migrate permissions or not and then click Next.
Kernel SharePoint Migrator allows you to schedule the migration process or perform it immediately. You can make your selection accordingly, and then click Next.
The summary of the migration process will appear on the screen, verify the details, and click Next.
The tool will start migrating Site Collection from the source to the destination.
Once the process is complete, a migration summary will appear on the screen, click Finish to end the process.
That’s how you can easily migrate SharePoint Site Collection from one server to another with the help of Kernel SharePoint Migrator.
When site collections grow in size or when you want to combine multiple site collections, it becomes necessary to migrate site collection from one database to another. Here, we have discussed how you could migrate SharePoint Server Site Collection from one content database to another with the help of PowerShell commands. Also, we have discussed a useful SharePoint Migration tool – Kernel Migrator for SharePoint for migration of site collection from one content database to another.