File Server Home Directories to OneDrive for Business Migration Guide

Introduction

This Migration Guide provides the procedures to be followed for migrating home directories from Windows File Servers to OneDrive for Business.

This strategy is only recommended when migrating a small number of home directories. When migrating a larger number of home directories, PowerShell scripts and a CSV file can automate the process. Refer to File Server Home Directories to OneDrive for Business Migration Guide, using PowerShell for step-by-step instructions, and to obtain the scripts and CSV file.

Note that OneDrive data may not be accessible for a few days after migration, due to OneDrive's crawling and indexing process. We suggest having your users log in immediately after migration, but warn them that their data may not be available immediately. For this reason, it may be best to complete the migration on a Friday so the indexing can happen over the weekend.

First migration?

We’ve created a guide on scoping, planning, and managing the migration process for your use. If this is your first migration, we recommend reading this guide carefully.

MigrationWiz

MigrationWiz is a migration tool, not a syncing tool. If changes are made at the source after migration, they will not sync to the destination, nor will changes made at the destination sync to the source. We do not have “live” monitoring of changes (as with a sync agent) and we cannot handle scenarios such as conflict resolution without user interaction.

MigrationWiz supports the capability to share migration projects across a Workgroup. When the Project Sharing feature is turned on, all Agents besides those who are Inactive can view all migrations projects. 

We are not able to support migrations with two-factor or multifactor authentication. 

Prepare the Azure Environment

  1. Estimate Azure storage costs. This step is optional but is useful in providing the customer with upfront storage costs ahead of time.
  2. Buy an Azure subscription, or use the free one-month trial ( this option is only viable if you are performing a very small migration).
  3. Create an Azure storage account. We recommend that you create an Azure Storage Account in the same Microsoft data center as the Destination Office 365 tenant. 
    • Visit ​https://portal.az​ure.com​ 
    • Click Storage accounts
    • Click Storage Create
    • Select the subscription in which you want to create the new storage account.
    • Select your Resource group.​ Create new if one doesn't exist.
    • Enter a name for your storage account.​
    • Choose your datacenter Location.
    • Choose Standard performance
    • In the Replication field, select Locally Redundant Storage (LRS).
    • Click Review.
    • Click Create
    • Once the deployment shows as complete, click on Go to resource
    • Select Access keys under "Security + Networking"
    • Copy the Storage account name and the key 1.  You will use this when running UploaderWiz and within the migration project.

You do not need to create any Azure containers for this migration. Separate containers are created on a per-home directory basis as they are uploaded. During migration, MigrationWiz will create two separate metadata files (with the extensions: -directory.metadata and -files.metadata), which will be added to each container. These are used during migration by MigrationWiz, to build the folder structure in OneDrive for Business and to migrate the permissions. They should not be deleted until after the migration.

Prepare Destination Microsoft 365 Environment

Set up the permissions which will be used for the migration

  1. Ensure you are signed in as a Global Admin.
  2. Go to MigrationWiz-SharePoint-FullControl and consent to the app access when prompted.
  3. Create new Security Group named “MigrationWiz” on the Microsoft 365 Admin Portal.
  4. Add the service account being used for the migration project as a member of this security group

You will also want to make sure that you create the users within the destination tenant and pre-provision OneDrive for those users. 

If migrating to a GCC High tenant, the above steps will not work.  Instead, use the following steps.

  1. Ensure that the service account has a license which includes OneDrive
  2. Give the account Global Admin permissions.  If that is not possible, you can instead grant it Site Collection Admin permissions on the OneDrives that you want to migrate to.
  3. Authorize the MigrationWiz-SharePoint-Delegated app within the tenant
  4. Within the project, add OneDriveProImportEnvironment=AzureUSGovernment to the support section of the project's Advanced Options

Upload Files to Azure

Steps are performed from a file server, or a computer joined to the domain, when logged in with the domain admin account, with local admin rights to the machine. This process utilizes UploaderWiz. Our guides contain information on running, configuring, and troubleshooting UploaderWiz. 

  1. (Optional, but recommended) Set the file share migration batch to read-only access by user and inform the users that a migration is occurring and that their file shares are now read-only. This will prevent the user from adding files to these file shares during the migration.
  2. You can restrict users to read-only access to their Home Directories through the Active Directory Users and Computers console on the AD controller, or via PowerShell. Prerequisites:
      1. Create a CSV file containing all the usernames (SAMAccountName).
      2. Install the required AD module on the machine that you're running the script from.
      3. Example script: 

    Import-Module 'ActiveDirectory'
    import-csv E:\usersname.csv | foreach-object{
    $homeDrive = (Get-ADUser -Identity $_.name -Properties homedirectory).homedirectory #Query AD for the HomeDirectory attribute
    $ACL = Get-Acl $homeDrive
    $ACL.setAccessRule((New-Object System.Security.AccessControl.FileSystemAccessRule($_.name, "Read", "ContainerInherit,ObjectInherit", "none", "allow")))
    Set-Acl $homeDrive $ACL
    }

  3. From the command prompt, running as administrator, from the directory that UploaderWiz was extracted into, run the following command (replace the x's with your own information):
    UploaderWiz.exe -accesskey "xxxxxxxx" -secretkey "xxxxxxxxxxxxxxxxxxxxxxx" -type azureblobs -rootpath "xxxxxxxx" -homedrive true   
    Note: if you are performing these steps from a domain-joined computer, a network drive needs to be mapped from the domain-joined computer to the file server (e.g. x;\File Server).
  • The AccessKey will be the name of the storage account
  • The SecretKey will be the access key for the storage account
  • The RootPath will be the path to the files that you want to migrate 

The parameter -homedrive true creates separate blob containers for each file share, under your top-level Azure blob container.  For example, if you have folders called User1 and User2 under C:\Users and you set the rootpath parameter to "c:\Users" then a container named "User1" and another named "User2" would be created in the Azure storage account and the files within those folders uploaded to each.

MigrationWiz Steps

Create a Document Project

This first project is the baseline project, from which all other projects will be cloned. We recommend that you call this "baseline", for easy reference.

  1. Log in to MigrationWiz.
  2. Click the Go to My Projects button.
  3. Click the Create Project button.
  4. Select the Document project type. 
  5. Click Next Step.
  6. Enter a Project name and select a Customer.
  7. Click Next Step.
  8. Create a New endpoint, selecting Azure File System as the type
    1. Enter the storage account name and access key.  This will match the account name and access key that you used in the UploaderWiz command
    2. click on Add
  9. Click Next Step
  10. Create a new destination endpoint, selecting OneDrive for Business as the endpoint type
    1. Enter the username and password for the service account that was created for the migration
    2. For the Migration Type, leave it as the default unless migrating to a GCC High tenant, if that's the case, select that option
    3. For the Azure storage account, select the Use Microsoft Provided Azure Storage option.  If you would prefer to use your own Azure storage, you can enter a storage account and access key here.  Please note that this would be a separate Azure storage from what was set up when uploading the files from your source environment.
    4. Click on Add
  11. Click on Save and Go To Summary
  12. Click on Save Project

Add Advanced & Support Options

These options are added to the support section of the project's Advanced Options.  You can access this by clicking on Edit Project and selecting Advanced Options  To create new lines, simply click on the + button that you see when viewing that page.

  • ShrinkFoldersMaxLength=300  This option shrinks file path names to prevent issues during the migration. 
  • RenameConflictingFiles=1  This prevents errors due to files with duplicate names.
  • InitializationTimeout=8  This increases the initialization timeout window to eight hours.  This allows for larger migrations to complete the initialization phase without timing out.
  • If migrating to a GCC High tenant, also add UseDelegatePermission=1.  If you are also not using a Global Admin with the GCC High tenant, also add ForceOneDriveNonGlobalAdminAuthImport=1

There are no spaces on either side of the "=" sign, and the entries are case-sensitive, so pay special attention to the capital letters in the commands above.

Clone the project

  1. Click the Edit Project button
  2. Select Clone Project from the drop-down list
  3. Enter the name for the new Project (each new project should be named after the file share name)
  4. Click the Clone Project button.
  5. Important: Repeat this process to create one MigrationWiz project per file share.  You should end up with one project corresponding to each Home Directory within your source environment

Add Items

For each MigrationWiz project, add the OneDrive for Business account to migrate home directory files into. (Select Add/Quick Add and enter the login name of OneDrive for Business account within the Destination field labeled Email Address.).  This needs to be the UPN for the user in question or you could see errors occur when trying to migrate

Container Name

In each cloned MigrationWiz project, set the container name that the files for that user were uploaded to.  This is done from the Source/Destination tab of the project's Advanced Options under the Source: File System/Container Name field.  By default this is set to "migrationwiz" but it must be changed or the migration will fail  This must be set to match the name of the Azure container that was created on your Azure subscription when the home directories were uploaded in the previous step, under the "Prepare Source File Server Environment" section of this guide.

Run Verify Credentials

  1. Open the Project containing items you wish to validate​.
  2. Select the line item within the project by checking the box next to it.
  3. Click on the Start button in your dashboard.
  4. Select Verify Credentials from the drop-down list.

Once complete, the results of the verification will be shown in the Status section.​ 

Start migration

  1. Select the users
  2. Click the Start button from the top
  3. Select Full Migration
  4. Click Start Migration

Run Retry Errors

If the migration completed successfully, but there were errors, this will attempt those failed items again.

  1. Select the users
  2. Click the Start button from the top
  3. Select Retry Errors
  4. Click Start Migration

If the errors persist, click on the error count to bring up a list of the errors seen.  This can be useful in helping to determine why the items are failing so appropriate action can be taken.  If assistance is needed investigating issues, please contact Support.

Post-Migration Steps

  1. Remove access to the Source home directories.
  2. Provide training on OneDrive For Business.
  3. Decommission file server. Perform this step only after migrating all data from the file server, such as file shares, and you are absolutely certain that you will not be returning to the file server.
  4. Delete all the Azure blob containers that were created during the upload to Azure. This will prevent incurring post-migration Azure costs for these containers. Be careful to only delete the containers created by UploaderWiz; these will be names that match the home directories and have a create date from the date of the upload.

 

 

Was this article helpful?
1 out of 1 found this helpful