Copy Document Library to Another SharePoint Site: Easy Methods & Best Practices!
In collaboration and document management, SharePoint is one of the most preferred services for storing and sharing data within organizations. Due to several reasons like migration, consolidation, etc, users need to copy document library to another SharePoint site. However, there is no guide available online with accurate steps and solutions to move document library from one site to another efficiently. That’s why, after thorough research on this query and understanding the users’ pain points, we are here to explain to you the SharePoint Online migration best practices, step-by-step instructions, and the methods available.
By the end of this discussion, we ensure that you have all the answers related to the same. Time to get started!
What is SharePoint Document Library?
A Document library is a type of list used to store large data including Word documents, Excel spreadsheets, PowerPoint presentations, etc, and share within the organization efficiently. This is the centralized location where all the users across the organization can work on the same file, from any location via an internet connection. Additionally, it provides several features like version control, adding custom metadata to documents (like categories or dates), enabling encryption to safeguard data from unauthorized access, and many more.
Why Copy Document Library to Another SharePoint Site?
Document Library is the essential part of SharePoint to save data, but in various scenarios, users want to move document library from one site to another. Understanding them will help you choose the best method for moving document libraries in SharePoint. Some of them are as follows:
- As your company grows, you need to reorganize content into different sites for improved management.
- When moving from one site to another due to changes in the company’s department structure or SharePoint site setup.
- Sometimes, copying document libraries to another site is done for archiving or disaster recovery purposes.
- Moving documents to a shared team site to allow other departments to access important resources.
How to Move Document Library from One Site to Another?
Now, it’s time to learn the techniques to copy document library to another SharePoint site. For the same, we researched and tested several methods, and among them, we will discuss the most appropriate and 100% secure solutions below:
Method 1). Using the SharePoint UI (User Interface)
This is a straightforward and free method, you just need to use the Move or Copy feature of SharePoint, and you can easily copy data to another document library. To do so, the steps are as follows:
Copy Library:
- Navigate to the source SharePoint library.
- Select the library or desired items.
- Click the “Copy to” button.
- Choose the destination location.
- Confirm by clicking “Copy here“.
Move Library:
- Navigate to the source SharePoint library.
- Select the library or desired items.
- Click the “Move to” button.
- Choose the destination location.
- Hit “Move here” to move document library from one site to another.
Remember, selecting and moving multiple files with this technique is easy, but it takes more time. Additionally, you can’t schedule this procedure for off-peak hours as you have to handle this manually. If your priority is maintaining folder hierarchy throughout the procedure, then this technique is not recommended to move SharePoint list from one site to another. For the same, you can opt for the below-mentioned automated solution.
Method 2). Leverage a Cutting-Edge Solution to Copy Document Library to Another SharePoint Site
The SoftwarePro SharePoint Migration Tool allows users to easily transfer documents, lists, and other data from one SharePoint site to another. Moreover, it preserves the file structure, metadata, and version history during the task. Unlike manual methods, it provides batch migration, date filter, delta migration, and many other advanced features to move document library from one site to another in minimum time. It provides a clean and self-explanatory UI so that any user can perform the migration without any technical expertise. Before any commitment, users can see it, by downloading it for free from the below button.
If you are satisfied with its working, then purchase the full version of this solution and gain more benefits. We tried this credible utility and compared it with other solutions, and we found this solution is the best among them because of its cost-effectiveness and advanced features. So, it is highly recommended to consider this, if you want to make your task seamless.
Steps to Move Document Library from One Site to Another
After purchasing this follow the stepwise instructions to copy document library to another SharePoint site:
Step 1. Choose the source and target platforms as Microsoft 365 as shown in the below screenshot.
Step 2. Afterward, scroll down and select the Sites option in which two options are available i.e. Document Library, and Generic List. Choose both of them or any of them.
Step 3. Leverage the Date Filter option for selective migration (if needed).
Step 4. Now, enter the required credentials for both source and destination i.e. Admin Email & Application ID. Click Validate.
Step 5. Three options are available to add users from the source account i.e. Fetch Users, Import Users, and Download Template.
Step 6. After the validation hit the Start Migration button to proceed with the transition.
That’s all! Within six steps any user can move document library from one site to another simultaneously.
Method 3). Copy Document Library to Another SharePoint Site Via PowerShell
PowerShell is another automated solution that can make the process efficient for technical users. This method can be used for large data migration. Remember, to follow and run each cmdlet carefully as one mistake can vanish the data permanently. So, it is better to take a backup of the data first and then move to the migration with this method.
# Open PowerShell as an administrator and run the following command to import CSOM
Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\20\ISAPI\Microsoft.SharePoint.Client.dll"
Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\20\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" Function Copy-AllFilesWithMetadata { param ( [Parameter(Mandatory=$true)] [Microsoft.SharePoint.Client.Folder] $SourceFolder, [Parameter(Mandatory=$true)] [Microsoft.SharePoint.Client.Folder] $TargetFolder ) Try { # Fetch Files from the source folder to copy document library to another SharePoint site $SourceFilesColl = $SourceFolder.Files $SourceFolder.Context.Load($SourceFilesColl) $SourceFolder.Context.ExecuteQuery() # Iterate through each file and transfer Foreach($SourceFile in $SourceFilesColl) { # Retrieve the source file $FileInfo = [Microsoft.SharePoint.Client.File]::OpenBinaryDirect($SourceFolder.Context, $SourceFile.ServerRelativeUrl) # Move document library from one site to another $TargetFileURL = $TargetFolder.ServerRelativeUrl+"/"+$SourceFile.Name [Microsoft.SharePoint.Client.File]::SaveBinaryDirect($TargetFolder.Context, $TargetFileURL, $FileInfo.Stream,$True) # Transfer metadata values $SourceListItem = $SourceFile.ListItemAllFields $SourceFolder.Context.Load($SourceListItem) $SourceFolder.Context.ExecuteQuery() # Obtain the newly created file $TargetFile = $TargetFolder.Context.Web.GetFileByServerRelativeUrl($TargetFileURL) $TargetListItem = $TargetFile.ListItemAllFields # Apply metadata values from the source $Author =$TargetFolder.Context.web.EnsureUser($SourceListItem["Author"].Email) $TargetListItem["Author"] = $Author $Editor =$TargetFolder.Context.web.EnsureUser($SourceListItem["Editor"].Email) $TargetListItem["Editor"] = $Editor $TargetListItem["Created"] = $SourceListItem["Created"] $TargetListItem["Modified"] = $SourceListItem["Modified"] $TargetListItem.Update() $TargetFolder.Context.ExecuteQuery() Write-host -f Green "Copied File '$($SourceFile.ServerRelativeUrl)' to '$TargetFileURL'" } # Handle subfolders $SubFolders = $SourceFolder.Folders $SourceFolder.Context.Load($SubFolders) $SourceFolder.Context.ExecuteQuery() Foreach($SubFolder in $SubFolders) { If($SubFolder.Name -ne "Forms") { # Set up a target folder to copy document library to another SharePoint site $TargetFolderURL = $SubFolder.ServerRelativeUrl -replace $SourceLibrary.RootFolder.ServerRelativeUrl, $TargetLibrary.RootFolder.ServerRelativeUrl Try { $Folder=$TargetFolder.Context.web.GetFolderByServerRelativeUrl($TargetFolderURL) $TargetFolder.Context.load($Folder) $TargetFolder.Context.ExecuteQuery() } catch { # Generate folder if(!$Folder.Exists) { $TargetFolderURL $Folder=$TargetFolder.Context.web.Folders.Add($TargetFolderURL) $TargetFolder.Context.Load($Folder) $TargetFolder.Context.ExecuteQuery() Write-host "Folder Added:"$SubFolder.Name -f Yellow } } # Invoke the function recursively Copy-AllFilesWithMetadata -SourceFolder $SubFolder -TargetFolder $Folder } } } Catch { write-host -f Red "Error Copying File!" $_.Exception.Message } } # Define parameter values $SourceSiteURL="https://crescent.sharepoint.com/sites/sales" $TargetSiteURL="https://crescent.sharepoint.com/sites/Ops" $SourceLibraryName="Shared Documents" $TargetLibraryName="Documents" # Configure credentials for connection $Cred= Get-Credential $Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.Username, $Cred.Password) # Establish contexts $SourceCtx = New-Object Microsoft.SharePoint.Client.ClientContext($SourceSiteURL) $SourceCtx.Credentials = $Credentials $TargetCtx = New-Object Microsoft.SharePoint.Client.ClientContext($TargetSiteURL) $TargetCtx.Credentials = $Credentials # Identify source and target libraries $SourceLibrary = $SourceCtx.Web.Lists.GetByTitle($SourceLibraryName) $SourceCtx.Load($SourceLibrary) $SourceCtx.Load($SourceLibrary.RootFolder) $TargetLibrary = $TargetCtx.Web.Lists.GetByTitle($TargetLibraryName) $TargetCtx.Load($TargetLibrary) $TargetCtx.Load($TargetLibrary.RootFolder) $TargetCtx.ExecuteQuery() # Execute the function to move document library from one site to another Copy-AllFilesWithMetadata -SourceFolder $SourceLibrary.RootFolder -TargetFolder $TargetLibrary.RootFolder
Related article: Transfer OneDrive for Business to Another Account
Method 4). Use SharePoint’s In-built “Save As” Option
Within SharePoint, you may see the “Save As” option many times. But do you use it? If not, then this is the time to leverage this. Follow the below instructions to copy document library to another SharePoint site by using the same:
- Step 1: Within the source document library, select the files to transfer.
- Step 2: Use the “Save As” option to save these items locally. The files will be downloaded in .zip format.
- Step 3: Now, navigate to the target SharePoint site and library and upload the saved files or folders to the destination.
Method 5). Move Document Library from One Site to Another Using SharePoint Modern Experience
The Modern SharePoint Experience will easily migrate data between SharePoint sites. Additionally, it allows users to copy and move document library data without requiring any external service. Here are the steps to do so:
- Open the document library in the source site to move.
- Click the Gear icon, and select Site Contents from the dropdown menu.
- Click the three dots next to the library you want to copy or move.
- In the “Copy To” dialog, enter the destination site URL and select the target document library.
- Click Copy to transfer the library.
Method 6). Use Admin Center to Copy Document Library to Another SharePoint Site
The SharePoint Admin Center is mainly used for managing and configuring SharePoint Online settings, but at this time we use this to move document library from one site to another by following these steps:
- Open the Destination SharePoint site and then hit the New button from the Site homepage.
- Choose the option of Document Library.
- Select the “From Existing Library” option from the opened window.
- Now, open the SharePoint site from where the document library is to be copied. Choose Document Library and then hit Next.
- Choose a Document Library to use as a template for the new document library.
- Provide the name and description for the new Document Library and hit Create.
Method 7). Using Save as Template Option
By saving a library as a template, users can preserve its structure and settings, which makes it easy to replicate the library in other SharePoint sites. The steps to copy document library to another SharePoint site are as follows:
- Open the document library and go to Library Settings.
- Select Save Document Library as Template, name it, include content, and click OK.
- Download the template from Site Settings.
- Go to the destination site’s Settings and upload the template with a name and description.
- Open Site Contents, select Apps and choose the uploaded template to create the library.
- Go to the library’s Settings to configure permissions, metadata, and other settings.
- If the library is empty, manually copy the required files.
Method 8). Use OneDrive Sync to Move Document Library from One Site to Another
Many users don’t know that SharePoint stores its data within OneDrive. By syncing the OneDrive, we can copy the document library data to the SharePoint site.
Steps to move the SharePoint data:
- Sync with OneDrive and access the synced files.
- Select and copy the files to transfer, then paste them into the target SharePoint document library.
That’s it! This method seems easy, but it is not. Many users found this complicated so, that’s why we are considering doing this task with some files first, if successfully migrated, then proceed with the entire data.
Now you have learned all eight solutions to copy document library to another SharePoint site, and all are tried and tested by our experts, so you won’t face any issues throughout the task. You can opt for any of them which suits you and your organization best. Still, if you have any confusion about which is best among them, then read the next section.
Manual vs Automated Solution – A Detailed Comparison!
For those who are confused about which solution is best among all of the eight we mentioned to move document library from one site to another, this infographic will help clarify the benefits and limitations of each:
Best Practices for Copying Document Libraries!
To ensure the hassle-free transition, it is important to follow the best practices mentioned below:
- Select the specific libraries, documents, and folders for transferring.
- Clean or delete the unwanted data before copying to minimize the time of the migration.
- Verify the required permissions for both the source and destination platforms are set to avoid disruption during the migration.
- Ensure that you have a reliable backup of all your data, because there is a huge risk of data loss during the transition if done manually.
- Before moving to the entire data migration, start with the small set of data. This helps users to address issues in advance before the actual migration.
- For large data migration consider the automated tool, as manual methods are not practical to bulk copy document library to another SharePoint site.
- Monitor the entire task and verify the metadata is preserved. However, if you are opting for an automated solution, then skip this step because that solution automatically takes care of it.
- After the transition, check if the permissions are correctly synced. If not, then you have to manually set the permissions on the new site.
Bottom Lines!
Copying a document library to another SharePoint site is a straightforward task, but it requires careful planning and reliable solutions. To achieve the desired results, opting for the best method is the key to copy document library to another SharePoint site hassle-free. Here, we discussed eight different and tested solutions so user can consider any of them according to their needs. Additionally, following the best practices is essential to move document library from one site to another seamlessly. We hope after reading this article you won’t need to go anywhere because all the things you need to know about the query are covered in this guide.