Upgrade SharePoint 2010 My Sites to SharePoint 2013 My Sites

Upgrading My Sites from SharePoint 2010 to SharePoint 2013 can be a challenge and some of the information found on the Microsoft site can be a little misleading.

I have put together a few steps that worked for me. The process includes upgrading the Managed Metadata and User Profile Service Applications along with the My Sites content databases.

Disclaimer: This posting is provided “AS IS” with no warranties. Please carry out the tasks below in your Development environment first. I suggest using Hyper V to take a snapshot of your farm first including the SQL Server before carrying out the upgrade.


Microsoft links to refer to
:

Upgrade My Sites: http://technet.microsoft.com/en-us/library/dn479424.aspx
Upgrade Service Apps: http://technet.microsoft.com/en-us/library/jj839719.aspx

The upgrade process is as follows
:

Step 1: Copy and restore the following databases from SharePoint 2010 SQL Server to your SharePoint 2013 SQL Server.

– ProfileDB
– SocialDB
– SyncDB
– MetadataDB
– WSS_Content_MySites

The WSS_Content_MySites is the database that holds all the My Sites in my SharePoint 2010 environment. The project I was working on had their My Sites and SharePoint Sites all in the one database so I had to use the Move-SPSite powershell command to move the sites to a dedicated WSS_Content_MySites database for My sites.


Move-SPSite -DestinationDatabase WSS_Content_MySites

Next if you have a setup account you use to run your queries in your farm, make sure this account has DBOwner rights on the database. This account can be the FARM account or a Setup account like the one you used to run the SharePoint installation.

Step 2: Upgrade the Managed Metadata Service Application, but first delete the existing Managed Metadata Service Application and User Profile Service Application in your SharePoint 2013 environment (if it exists), but ensure that both the Managed Metadata Service and the User Profile Service (not synchronization service) are started on the Application Server.

I have a Service Application Pool that I use for most of my Service Applications. If you want to create a separate service application pools for the Managed Metadata Service Application, then please make changes to the commands below to suit your needs.

On your Application Server, log in with your Setup account, open a Powershell command window in Administrator mode and run the following commands:


Get-SPServiceApplicationPool |ft name

$applicationPool = Get-SPServiceApplicationPool -Identity 'Service Application Pool Account'

$mms = New-SPMetadataServiceApplication -Name 'Managed Metadata Service Application' -ApplicationPool $applicationPool -DatabaseName 'MetadataDB'

New-SPMetadataServiceApplicationProxy -Name ‘Managed Metadata Service Application’ -ServiceApplication $mms –DefaultProxyGroup

IISReset /noforce

The above Powershell commands will create a new Managed Metadata Service and upgrade the MetadataDB database.

Now, delete this new Managed Metadata Service Application by selecting it under Service Applicatons in Central Administration and clicking the Delete button at the top of the page. DO NOT check the box to delete the upgraded database. We need this so leave the database as is, only delete the service application.

After you have deleted the service application, re-create it, but this time via Central Administration and in the Database box, give it a database name like MetadataDBRemoveMe for example.

Once the service application is created, we need to change the database and make sure that it uses the upgraded database. So, run the powershell command below to do this:


Set-SPMetadataServiceApplication -Identity "Managed Metadata Service Application" -DatabaseName MetadataDB

Then run IISReset /NoForce

Possible error: “The managed Metadata Service or Connection is currently not available. The Application Pool or Managed Metadata Web Service may not have been started. Please Contact your Administrator.”

Possible solution: Give the Service Application Pool Account DBOwner rights to the upgraded Metadata database in SQL Server. Also give the service application pool full control permissions to the Service Application in Central Administration.

Make sure there are no errors when you click the Managed Metadata Service Application under Service Applications in Central Administration. It is important that there are no errors, do not proceed to the next step if there are errors.

Step 3: Create a new My Site Web Application in Classic mode.


New-SPWebApplication -Name "MySite WebApp" -ApplicationPool "MySiteAppPool" -AuthenticationMethod "Kerberos" -ApplicationPoolAccount (Get-SPManagedAccount "Contoso\svc-sp2013DevAppPool") -Port 80 -URL "http://mysitesdevsp2013.contoso.com.au" -HostHeader "mysitesdevsp2013.contoso.com.au" -DatabaseName WSS_Content_MySitesRemoveMe

Do not create the My Site Host site collection after creating the Web Application above.

Create a new My Sites User Policy (See Technet documentation regarding creation My Sites for SharePoint 2013 for details)

Don’t try to configure Self-Service site creation as there is no root site collection.

Step 4: Create a new User Profile Service Application.

Run the following Powershell scripts in Administrator mode as you did above:


Get-SPServiceApplicationPool |ft name

$applicationPool = Get-SPServiceApplicationPool -Identity 'Service Application Pool Account'

$upa = New-SPProfileServiceApplication -Name 'User Profile Service Application' -ApplicationPool $applicationPool -ProfileDBName 'ProfileDB' -SocialDBName 'SocialDB' -ProfileSyncDBName 'SyncDB'

New-SPProfileServiceApplicationProxy -Name ‘User Profile Service Application’ -ServiceApplication $upa -DefaultProxyGroup

IISReset /noforce

Next, delete this newly created User Profile Service Application, but do not check the box to delete the database too. We need these upgraded databases so leave them intact.

Create a new User Profile Service Application but for the database names, enter the name for the upgraded databases instead.

Once the new User Profile Service Application is created, select it under Central Administration > Service Applications > click the Administrators tab and add the FARM account and Service Application Pool account.

Also add the FARM account to the local Administrators group on the Application server that will run the User Profile Synchronization Service.

Start the Synchronization service on the Application Server, it will ask you to enter the FARM account password, enter it and wait. This will take some time, it needs to start the ForeFront Identity Manager Service and ForeFront Identity Synchronization Service. So be patient, minimum 10 minutes.

Step 5: Once the Synchronisation Service starts successfully, you need to upgrade the My Sites web application by testing and mounting the restored database from SharePoint 2010. You then need to convert it to Claims authentication.

Make sure you have copied the My Sites Content database across to your new SQL Server and restored it. Ensure that the Setup account has DBOwner rights on the database.

Remove the default database from the My Sites Web Application via Central Administration first.

Then run the following Powershell command to test the restored database with the My Sites Web Application.


Test-SPContentDatabase -name WSS_Content_MySites -webapplication http://mysitesdevsp2013.contoso.com.au

Make sure there are no errors and that they do not block the upgrade of the database.

Then run a Mount-SPContent Database like below:


Mount-SPContentDatabase "WSS_Content_MySites" -WebApplication “http://mysitesdevsp2013.contoso.com.au”

The upgrade should complete successfully.

Next convert the My Sites Web Application to Claims by running the following command:


Convert-SPWebApplication -Identity "http://mysitesdevsp2013.contoso.com.au" -To Claims -RetainPermissions -Force

You now need to create the My Sites host for the My Sites Web Application. So, in Central Administration, create a new Site Collection for the My Sites Web Application and select the My Sites template under Enterprise. Also, make sure that you have selected the root of the web application – ‘/’.

Step 6:

Configure Staff profile photo by editing the Manage User Properties, select Picture and then edit, add a new mapping and select thumbnail photo

Under Central Administration > Service Applications > User Profile Service Application, click ‘Setup My Sites’ and add the My Site Host Location.

Start full profile sync and make sure it completes with no errors.

Once the user synchronization has finished, open the SharePoint 2013 Management Shell as the Farm account svc-SP2013DevFarm and run the following command

$mySitesUrl=”http://mysitesdevsp2013.contoso.com.au” (Enter)
$mySitesHost=Get-SPSite –Identity $mySitesUrl (Enter)
Update-SPProfilePhotoStore –MySiteHostLocation $mySitesHost –CreateThumbnailsForImportedPhotos $true (Enter)

This completes the upgrade of My Sites from SharePoint 2010 to SharePoint 2013. Go to your SharePoint 2013 site and click the Newsfeed link at the top of the page. This will start the process of provisioning a new My Site for your account. Once done, you should receive an email from your SharePoint Farm notifying you of the set up. You will then find all your old files on your SkyDrive page.

If you have any questions or need help with your upgrade, post a message below and I will be happy to assist.

Cheers.

Derek

Derek Halstead is a SharePoint consultant as well as the founder and principal of CertifiedSolutionsAustralia.com and CoolWriteups.com. He has 16 years of experience in the IT industry, with over ten years focused on Microsoft SharePoint. He can be reached by using the Contact Me link in the top menu.
Back to Top