Sunday 1 November 2015

Step-by-Step Migrate Files to SharePoint Online – Office 365 Import Service

This is a Step-by-Step tutorial to Migrate Files from File Share to SharePoint Online using the new Office 365 Import Service. Office 365 Import Service was launched by Microsoft initially to migrate PST files to Office 365 Exchange mailboxes. Recently, Microsoft extended the Import Service so users on On-premises can Import data into SharePoint Online and OneDrive for Business.
In this post, lets discuss the high-level step :
1. To begin with, you would need SharePoint Online Management Shell to connect to Office 365 and Azure services. Check out my post Connect to Office 365 using PowerShellto connect to your Office 365 site using PowerShell.
SharePoint Online Management Shell
After connecting to Office 365, my window will look like below.
Connect to Office 365
2. Now before you begin, make sure you have the Content ready that you need to upload. I have created a Shared folder “SharePointFileShare” with few files in my local machine’s C: drive.This folder needs to be shared so Azure tool can access it.
SharePoint Shared Folder
3. Next, Navigate to Office 365 admin center and then selectIMPORT .
4. On Import Page, choose plus (+) then select Upload data over network.
Upload files over the network
In the Wizard, click on Show Secure Key & Show URL and then Copy the key & URL.
Copy key and Copy URL to securely copy the storage account key and URL.
Copy the Key & URL and minimize the wizard window for now.
5. Next lets create a Package to Upload. A “package” comprises of content (binaries such as documents, images, attachments) and manifest xml files.
The basic process is as follows :
SharePoint Online Migration jobs
First, we will use New-SPOMigrationPackage cmdlet with parameters to create a package from fileshare.
Parameters explained:
Source : Source is a Shared fileshare on your machine where you have the files to upload or on On-prem SharePoint.
For e.g. C:\SharePointFileShare is Source in our case.
Output or Package path: Once you run the New-SPOMigrationPackage command you would create a SharePoint Online Package as an Output.
Parameter : IncludeFileSharePermissions is need if you want the permissions on the files to be reapplied automatically when they reach the cloud.
Run the following in SharePoint Online Management Shell to create the package.
New-SPOMigrationPackage -SourceFilesPath \\IshaPC\SharePointFileShare -OutputPackagePath C:\SPO_Package -IncludeFileSharePermissions -TargetWebUrl “YourSharePointSiteURL” -TargetDocumentLibraryPath “Documents” -NoAdLookup
Check the Package folder at C:\SPO_Package or whatever your location was.
New SPO Package
Note : If you are getting an error like “The LDAP server is unavailable.” error see here
6. Next, lets use the ConvertTo-SPOMigrationTargetedPackage to Convert the package we created in last step into the format that SPO will support for the job.
To do this, Run the following :
ConvertTo-SPOMigrationTargetedPackage -SourceFilesPath \\IshaPC\SharePointFileShare -SourcePackagePath C:\SPO_Package -OutputPackagePath C:\SPO_Package\targetedPackage -TargetWebUrl https://learningwayinstitute.sharepoint.com -TargetDocumentLibraryPath “Documents”
Enter the SharePoint Online Credentials.
Convert to SPO Package
Convert to SPO Package CMD
Check the Target Package once created.
Target Package is created
7. So once you have the package ready, lets use the Set-SPOMigrationPackageAzureSource to specify the Azure Source & key (copied in step #4) and upload the Azure Storage source to temporarily keep the files.
$azurelocations = Set-SPOMigrationPackageAzureSource -SourceFilesPath \\IshaPC\SharePointFileShare -SourcePackagePath C:\SPO_Package -AccountName AccountName-AccountKey “SecureKey” -PackageContainerName package
If successful, Verify that the files have been uploaded in Azure Storage.
8. You can check the files that are uploaded in Azure using Azure Storage Explorer. Go to the link and download the Azure Storage Explorer.
Installing Azure Storage Explorer
Add Account
Add Storage Account
Azure Storage SPO data
Note : Do not edit/delete/modify any tables/containers/blobs using Azure Storage Explorer or any other tool. Doing so may cause job failures that will be impossible to recover from.
9.Finally, now that the files have been uploaded, let’s just Create a job for Office 365 to import these files into the SharePoint Online library.
Scheduling a Job
Scheduling a Job for SPO
Now before proceeding, prepare a SharePoint Online Mapping file. Download the SPO Mapping file to fill-up your own entries.
SPO Mapping File
Upload the file in next screen of your wizard when ready.
SPO Upload Mapping File
Upload Mapping Confirmation
Finally, verify in the Office 365 admin center to see the status of the job.

0 comments:

Post a Comment