Quick Search:

Why Migrate Data from File Server to SharePoint Online?

SharePoint Online
SharePoint Online

SharePoint Online utilizes modern protocols for sharing that are much superior to the structure of on-premises file servers. With SharePoint, users will find it more convenient to set up permissions and manage a great many files and documents. As an excellent service from Office, SharePoint just simplifies the collaboration between team members and improves work efficiency.

Specifically, the central admin console on SharePoint offers unprecedented organizational power for users to set up permissions for access and security. Meanwhile, users can enjoy great flexibility when accessing data on the web without consuming storage space on their computers. Moreover, many third-party services can be integrated to SharePoint for better functionality.

Due to the benefits above, it’s wise to start File Server to SharePoint migration. And in this article, we will illustrate how to accomplish this goal in 2 practical methods. If you are interested, keep reading further. 

How to Migrate Data from File Server to SharePoint Online

There are 2 feasible methods to move data from File Server to SharePoint Online and they both have virtues and weaknesses. You can think twice before choosing the best helper.

Way 1: Utilize PowerShell

Step 1: Go to the network on your File Explorer. For instance, you want to move the data on the Network to SharePoint Online. 

Network Server
Network Server

Step 2: And enable your PowerShell and copy the following content to SharePoint.

#Load SharePoint CSOM Assemblies

Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll"

#Function to migrate all Files and Folders from FileShare to SharePoint Online Function Migrate-FileShareToSPO() { param ( [Parameter(Mandatory=$true)] [string] $SiteURL, [Parameter(Mandatory=$true)] [string] $TargetLibraryName, [Parameter(Mandatory=$true)] [string] $SourceFolderPath )

#Setup Credentials to connect $Cred= Get-Credential $Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.Username, $Cred.Password)

#Setup the context $Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL) $Ctx.Credentials = $Credentials

#Get the Target Folder to Upload $Web = $Ctx.Web $Ctx.Load($Web) $List = $Web.Lists.GetByTitle($TargetLibraryName) $Ctx.Load($List) $TargetFolder = $List.RootFolder $Ctx.Load($TargetFolder) $Ctx.ExecuteQuery()

#Get All Files and Folders from the Source Get-ChildItem $SourceFolderPath -Recurse | ForEach-Object { If ($_.PSIsContainer -eq $True) #If its a Folder! { $TargetFolderRelativeURL = $TargetFolder.ServerRelativeURL+$_.FullName.Replace($SourceFolderPath,[string]::Empty).Replace("\","/") Write-host -f Yellow "Ensuring Folder '$TargetFolderRelativeURL' Exists..."

#Check Folder Exists

Try { #Get Source Folder's metadata $CreatedDate= [DateTime]$_.CreationTime $ModifiedDate =  [DateTime]$_.LastWriteTime

$Folder = $Web.GetFolderByServerRelativeUrl($TargetFolderRelativeURL) $Ctx.Load($Folder) $Ctx.ExecuteQuery()

#Write-host -f Green "Folder Already Exists!"} Catch { #Create New Sub-Folder $Folder=$Web.Folders.Add($TargetFolderRelativeURL) $Ctx.ExecuteQuery() Write-host -f Green "Created Folder at "$TargetFolderRelativeURL

#Set Metadata of the Folder $FolderProperties = $Folder.ListItemAllFields $FolderProperties["Created"] = $CreatedDate $FolderProperties["Modified"] = $ModifiedDate $FolderProperties.Update() $Ctx.ExecuteQuery() } } Else #If its a File { $TargetFileURL = $TargetFolder.ServerRelativeURL + $_.DirectoryName.Replace($SourceFolderPath,[string]::Empty).Replace("\","/") +"/"+$_.Name          $SourceFilePath = $_.FullName

Write-host -f Yellow "Uploading File '$_' to URL "$TargetFileURL #Get the file from disk $FileStream = ([System.IO.FileInfo] (Get-Item $SourceFilePath)).OpenRead()

#Upload the File to SharePoint Library's Folder $FileCreationInfo = New-Object Microsoft.SharePoint.Client.FileCreationInformation $FileCreationInfo.Overwrite = $true $FileCreationInfo.ContentStream = $FileStream $FileCreationInfo.URL = $TargetFileURL $FileUploaded = $TargetFolder.Files.Add($FileCreationInfo)

$Ctx.ExecuteQuery()  #Close file stream $FileStream.Close()

#Update Metadata of the File $FileProperties = $FileUploaded.ListItemAllFields $FileProperties["Created"] = [datetime]$_.CreationTime $FileProperties["Modified"] =[datetime]$_.LastWriteTime $FileProperties.Update() $Ctx.ExecuteQuery() Write-host "File '$TargetFileURL' Uploaded Successfully!" -ForegroundColor Green } } }

#Set parameter values $SiteURL="https://Crescent.sharepoint.com/sites/marketing"$TargetLibraryName="Documents"$SourceFolderPath="\\Cre-LT575\Salaudeen\Project Documents"

#Call the function to Upload All files & folders from network Fileshare to SharePoint Online Migrate-FileShareToSPO -SiteURL $SiteURL -SourceFolderPath $SourceFolderPath -TargetLibraryName $TargetLibraryName

Step 3: Then the PowerShell script will upload all data from the network to your SharePoint Online document library. 

Powershell Upload
Powershell Upload

Way 2: Migrate Data from File Server to SharePoint Online

If you are frustrated about the first method, then you can take advantage of another service to achieve the goal. Simply, you can download the data from file server and then upload it to SharePoint via a third-party service – MultCloud. In case you don’t know how to download files and folders from a File Server, you can visit that hyperlink.

MultCloud is a brilliant and popular cloud file manager that allows users to manage multiple cloud drives, such as Google Drive, Google Photos, OneDrive, Dropbox, Flickr, MEGA, Amazon S3, NAS, SharePoint, Wasabi, and so on. It enables users to perform the same features that they can perform on the official website of each cloud. For instance:

  • Users are allowed to upload files to SharePoint, share a document on Google Drive, and sync Google Photos to a PC.
  • Users are able to manage different cloud storage services in only one place with only one login. In this way, they don’t need to shift cloud accounts frequently.

So, how to migrate data from File Server to SharePoint Online via MultCloud? Follow the operations in the following content.

Tip: Before beginning, you have to make sure you’ve downloaded the data from File Server to your local computer. Then, you can refer to the steps below.

Step 1: Register an account of MultCloud by your email. Or, you can use the Facebook account or Google account to sign in directly.

Sign Up
Sign Up

Step 2: Now, head to Add Cloud. And you will view what cloud services MultCloud supports in total. Then, hit SharePoint to add and grant MultCloud permission.

Add SharePoint
Add SharePoint

Step 3: Next, jump to SharePoint > Communication Site > Documents. And Upload File to SharePoint. Or you can drag and drop what you’ve downloaded from File Server to MultCloud. 

Upload to SharePoint
Upload to SharePoint

This is how to transfer files from File Server to SharePoint Online via MultCloud. Anyway, if you are tired of programming codes, you can try this method.

What other features MultCloud can offer you?

Thankfully, MultCloud doesn’t just offer such basic features. Instead, it allows users to perform many professional features when they want to migrate data between cloud drives, including transferring, syncing, and backing up.

These advanced features are of great importance when users want to move files from SharePoint to another cloud, such as OneDrive, Google Drive, Dropbox, etc. MultCloud can move data between cloud drives directly and quickly. For example, if you plan to transfer an S3 bucket to another account, the Cloud Transfer feature of MultCloud can help you.

In the End

So, you’ve learned 2 effective methods to migrate data from File Server to SharePoint Online. And what is the best way to migrate file server to SharePoint Online for you? Then you can try the method. Anyway, if you turn to MultCloud, it will reduce the burden and improves efficiency when you are struggling with managing multiple cloud accounts and services.

You May Also Like

How do I move everything out of Dropbox to OneDrive? This article will present you with 3 solutions, so you can choose the best way to automatically transfer your important files. Also, you can migrate from Dropbox to Microsoft 365 with the method mentioned in this post.

Do you find a way to merge OneDrive personal and business easily? Here, an easiest way provided in this article will help you greatly. In the way, you just perform 2 steps to combine OneDrive personal and business.

How to migrate data from OneDrive to OneDrive or OneDrive for Business? Here in this article, you'll learn the easiest way to transfer files, documents, photos, videos, etc. between your OneDrive accounts.

MultCloud Logo

Add and manage 30+ popular clouds in one platform.

  • Cloud Transfer

    Migrate files across different cloud drives without manually downloading and re-uploading.

  • Cloud Sync

    Sync two clouds or directories in two different cloud drives via one-way or two-way sync.

  • Cloud Backup

    Backup one cloud data to another cloud for an extra protection and easy recovery.

Sign up Free
New Release

Email to Cloud Migration

Migrate or save Gmails to 30 popular cloud drives as PDF, even including any attachments.