In this posting we document our experience in one of our SharePoint projects. The task is moving data / taxonomies from Managed Metadata Services SharePoint 2010 to SharePoint 2013. The objective is to retain the data, hierarchy, and the ID (Guid) of each term, termset, and group.
Because this task is involving two different SharePoint versions, the export import requires upgrading database of Managed Metadata Service application. This can be done by performing backup of the source database, restoring backup file to destination SharePoint 2013′s database server, and then creating a new Managed Metadata Service Application using the restored database.
The following image shows Managed Metadata Services in the source SharePoint farm.
Here is the step by step on how to export import Managed Metadata Service from SharePoint 2010 to SharePoint 2013:
Backup Managed Metadata Service Database in SharePoint 2010
We can use SQL Server Management Studio to backup SharePoint 2010 Managed Metadata Service database. Our database name is SP14_MetaData.
Restore Managed Metadata Service Database to SharePoint 2013
Copy backup file to SharePoint 2013 database server. In our case, we use the same database server, so we actually didn’t copy it anywhere, just restore it to a new database. We name it SP15_MetaData14.
Create (Upgrade) A New Managed Metadata Service Application
Now login to SharePoint 2013 server and open SharePoint Management Shell. First, we have to know application pools used by SharePoint service application, by typing the following command on the shell:
From the result displayed above, we’re pretty sure that the application pool used by majority of our SharePoint service applications is “SharePoint Hosted Services”. Now type the following PowerShell command to get its instance into a variable:
$applicationPool = Get-SPServiceApplicationPool -Identity 'SharePoint Hosted Services'
Then we create our new Managed Metadata Service application by using the application we’ve saved to $applicationPool, and pointing to the database we restored earlier. Use the following PowerShell command:
$mms = New-SPMetadataServiceApplication -Name 'MMS 14_15' -ApplicationPool $applicationPool -DatabaseName 'SP15_MetaData14'
We named our new service application as MMS 14_15 to differentiate with existing Managed Metadata Service Application we’ve provisioned earlier. Then we created its proxy with the following PowerShell command:
New-SPMetadataServiceApplicationProxy -Name 'MMS 14_15 Proxy' -ServiceApplication $mms -DefaultProxyGroup
After completing the PowerShell command, perform IIS Reset.
Test The New Managed Metadata Service Application in SharePoint 2013
Login to SharePoint 2013 Central Administrator, open “Manage Service Applications”. Open the new MMS 14_15 service application. Now, you should see all metadata terms, termsets, and groups have been successfully migrated from SharePoint 2010 to SharePoint 2013.
You can check the Guid of each term using IE Developer Tool or Firebug (if you use Firefox) to examine each node. Compare them with corresponding node in SharePoit 2010 MMS. They should match.