Views:

Migrating Documents from Box using ShareGate PowerShell

Overview

Unlike other providers, Box does not have the concept of a shared drive or centralized location such as a site. Instead, Box relies on per-account stored files and a "shared with me" mechanism where files are shared and accessible via shared folders for other Box accounts. Often what we find in these circumstances is that a single user holds the majority of files that are then shared with others. The best path forward is to run a full organizational scan and this will help identify where your files reside.

Migration Strategies

There are several approaches and strategies for migrations in general. Different scenarios will call for different approaches and more than one approach can be used at the same time.

Staging

Staging migrations use a temporary holding area for content on the destination platform. This may be useful when a rapid switch to a different platform is required. In this approach, all data are moved to a temporary staging area, data owners are identified and assigned, and then consulted for final file destination for the second migration hop.

Gradual

Gradual migrations move data over a period of time. Work with each owner to identify data to transfer and their destinations, move data, and provide support for usage in the destination.

Cut-over

To perform a cut-over migration, schedule a date with the customer ahead of time. Make sure to investigate total size of the migration to verify it can be completed in a reasonable amount of time. Note that Box frequently throttles migrations, reducing transfer speeds. Perform a test migration to a temporary destination to validate your assumptions.

Prior to the migration, communicate with customers about the destinations where they will find their files after they are transferred.

Schedule migrations to start on Friday so they can run over the weekend. Mark original Box locations as read-only or disable user sign-ins to prevent data from being modified in the legacy Box locations.

Cut-over with Delta

A Cut-over with Delta migration (sometimes called "top-up") is well suited for larger file sets. It allows you to transfer bulk of data first, then schedule a cut-over and perform a top-up of changed files just before the cut-over. This is the preferred migration strategy for large migrations when it's not feasible to transfer all data without disrupting productivity. Note that you must educate users not to reorganize files once the migration effort begins, otherwise the changed file structure will create conflicts and confusion in the destination.

ShareGate & PowerShell

ShareGate does not provide a user interface for migrating from Box, so we need to use ShareGate PowerShell. The steps below assuming ShareGate is installed on the PC/Server where you run the commands.

PowerShell Script

This script can be saved to a file for easier execution. You can also run multiple migrations at the same time - just replace appropriate variables with correct values.

The script below will perform a cut-over or initial migration if performing cut-over with delta. To perform delta migrations, you will need to set copysettings from ShareGate. Please review ShareGate documentation for details. If no top-up migration is necessary, you do not need to run any further scripts.

#Connect to Box in Admin mode. Email should be of a Box admin
$box = connect-box -email box-admin@company.com -Admin

#connect to destination SharePoint site.
$dest = connect-site -url https://company.sharepoint.com/sites/box-destination -browser

#set terminal display name for easier tracking of multiple migration windows 
$host.ui.RawUI.WindowTitle = $useremail

#Box owner user email 
$useremail = "email goes here"

#SharePoint destination list name
$destList = get-list -Name $useremail -site $dest

#begin import. Note that progress isn't displayed here, but can be viewed in ShareGate main software's Tasks screen
import-boxdocument -box $box -useremail $useremail -destinationlist $destList