Introduction to Sharegate and Sharepoint My Sites Migration

I recently had the opportunity to design and implement two Sharepoint migrations.  One was from Sharepoint 3.0 to Office 365 and the other was Sharepoint 2003 to Sharepoint 2013.

For the original project (WSS 3.0 – O365), we originally chose the Dell Sharepoint Migration Suite, however, I encountered a lot of issues with it, mainly the fact that I was having difficulty migrating data because it was very inconsistent, some of it was there and some of it was missing.

In the end, I opted to use a tool called “Sharegate” and I had such good experience with it, that I wanted to write a whole post dedicated to it.  Sharegate’s main feature is the Migrating Tool, but it does include a Sharepoint Management application that can report on anything that you could think of in a customer’s environment.  Need a report for files a certain size?  Got that.  Need a report to audit site collection permissions?  Got that too  Need a report to list the content of every site collection and subsites?  Check that one off too.  It even has a nice tool to find obsolete permissions in your environment and automatically clean them up in preparation to a migration.  Sweet!

The migration interface is pretty easy to use, you just connect to the source Central Admin (or Site Collection or Subsite) and then connect to the destination Central Admin or Sharepoint Administrator in Office 365’s case.  You can then drag and drop the content to be copied and choose to overwrite or merge any differences.  This process can be done with Sharepoint, OneDrive and even Google Drive.  I also love the fact that you can run a pre-migration check report and be able to resolve any issues beforehand, so as to have the smoothest possible run.

Where I think this application excels the most, is the ease of use and how easy it is to map user and group permissions for content you are migrating for which a user is no longer active at your organization.  I was also able to script out the migration to save time and make sure any errors due to configuration of the migration minimized.

For those interested in my Sharegate Migration Powershell Script and how to use it for your My Sites migrations, follow these steps:

  1. Map your users and groups in the Sharegate Migration Tool, if you have no users, I would map the unresolved users and groups at the very least.
  2. In Sharegate, you should have the option to export this list into a SGUM file.
  3. Create a CSV file with the following headers, SourceURL, DestinationURL and sAMAccountName.  Populate these fields accordingly.  My CSV and Powershell was tailored specifically to migrate My Sites which is why you see the sAMAccountName field, which should be populated with the username of the person’s My Site who you are migrating.
  4. Put the CSV and SGUM file into the same folder as the below Powershell and run it.  I like to run it in the Powershell ISE.  The script will create a report for each user that it migrates.
#Import the Sharegate Powershell module.
Import-Module Sharegate

#Import CSV file with 3 columns; SourceURL, DestinationURL, sAMAccountName 
$table = Import-Csv -Path "C:\Script\SP2013-MySites-Restart.csv"
 
#Import user and group mappings from GUI exported file
$usermappings = Import-UserAndGroupMapping -Path "C:\Script\UserAndGroupMappings.sgum"

#Uncomment for incremental copy settings and uncomment copysettings parameter in line 22 "Copy-Site"
$copysettings = New-CopySettings -OnContentItemExists IncrementalUpdate

#Loop through each row in the CSV file
ForEach ($row in $table)
{
 #Set variables based on CSV columns
 $srcSite = Connect-Site -Url $row.SourceURL
 $dstSite = Connect-Site -Url $row.DestinationURL
 $username = $row.sAMAccountName

 #Copy site and capture migration results
 $result = Copy-Site -Site $srcSite -DestinationSite $dstSite -MappingSettings $usermappings -Merge -Subsites -InsaneMode -CopySettings $copysettings
 
 #Export results to Excel workbook
 Export-Report $result -Overwrite -Path C:\Script\MySites-Results\$username.xlsx
}
Advertisements

2 thoughts on “Introduction to Sharegate and Sharepoint My Sites Migration

  1. Mark Vogt

    GREAT post, but I have some questions:
    1. HOW did you pre-create all the “destination” mysite site collections before you ran your script? and
    2. HOW did the account under which you ran your script gain access to the SOURCE MySite site collections (you have to be a site collection admin in both the sourceURL and the destinationURL in order to use Sharegate’s Copy-Site cmdlet)?

    Feel free to reply me both here and via mark.vogt@emtecinc.com
    Cheerio,
    -MV

    Reply
    1. rcheing Post author

      Hi Mark, great question! The beauty of Sharegate is that you don’t have to pre-create the My Site collections in order to migrate the content. Their Powershell cmdlet will create the site collection if it doesn’t already exist. For the account used to gain access to both Source and Destination environments, you are correct, you need an account that is a Site Collection Admin in both sides.

      What I did was deployed a separate SP2013 infrastructure but re-used all the legacy SP Admin accounts in the new environment. In this way, the accounts used were still the same accounts the client was already accustomed to use and I was able to use that one account to do the migration.

      Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s