17 April, 2013

Migrate managed metadata from one environment to another in SharePoint 2010

What will be the requirement?
Your user will be raising a ticket for to create a replica of the production site in development environment.

Quite easy - correct? You can easily implement this by using PowerShell but now the problem starts from here. If your site collection admin has created a term store in production site then you will not get those in development environment. Hmm- seems to be difficult now, isn’t it?

Reason: Managed metadata terms and term sets each have a unique guid and the guids don't match up

Nothing to worry about as we have a solution for that :)

Let me brief some details as local terms can be created by 2 ways:
-centrally i.e. @Central Administration Level
-Locally i.e. @site collection level

Let me talk about ‘Centrally’ first: There are some ways by which you can implement this.
-By using Export and Import
-By using Database method

Let’s discuss about the first method i.e. Export and Import

Export Example:
$mmsAppId= "e1c96163-7767-4497-8e92-51eb154f0c70"
$mmsproxy = Get-SPServiceApplicationProxy -Identity "4d4b3094-a9ad-4cee-99f4-392d489a1657"
Export-SPMetadataWebServicePartitionData -Identity $mmsAppId -ServiceProxy $mmsproxy -Path "E:\backups\SP2010_Backups\mms.bak"
You must be wondering as how to get this App ID Guid Placeholder and Proxy ID Guid Placeholder. It’s very easy-please refer the following steps:
How to get App ID Guid:
-Central Administration
-Application Management
-Manage Service Applications
-Managed Metadata Service Application
-refer the browser now and copy the guid which is after tsid=

How to get Proxy ID Guid:
-Open the PowerShell console
-execute this command-  Get-SPServiceApplicationProxy
-You will see a list of proxy id’s and you need to copy ID that belongs to managed metadata.

Follow the same process in Import also and get the guids. Obviously they will be different as they belongs to different farm i.e. target farm.
Import Example:
$mmsAppId= "d7b7b20c-aed1-4cag-ba6a-45baa9d6adf2"
$mmsproxy = Get-SPServiceApplicationProxy -Identity "df8606f1-cfca-4283-89db-9270e0a5adec"
Import-SPMetadataWebServicePartitionData -Identity $mmsAppId -ServiceProxy $mmsproxy -Path "\\SP2010_SQL\SP2010\mms.bak" –OverwriteExisting
Database approach:
-Backup the managed metadata database in your source farm
-Delete the MMS service in your target farm
-Restore the managed metadata database to your target farm
-Create a new MMS service in your target farm
-Ensure correct service accounts have full control of MMS

How to move local term stores?
We can easily move the local term stores by using the following tool:
Documentation is already provided on the above site only so I will not go much deeper in reference to this tool but it’s very easy and user friendly too.
If you have any queries/questions regarding the above mentioned information then please let me know, thank you.

5 comments:

  1. Very detail and step-by-step article! Thanks Amol.

    ReplyDelete
  2. Hi Amol thanks for the details
    im having situation where Production farm metadata term group are not matching with UAT Farm

    (seems in PROD new Metadata terms groups and terms set are created )

    What i need now is to restore only a 1 Group (TERM Group 1 ) from metadata term store and associate in to UAT taxonomy fields reconnect terms to a new term set as it is on PROD (it practically difficult reconnect all manually )

    My structure

    1 TERM Group

    1.1 Term set X

    1.2 Term set Y

    1.3 ….

    1.4 … ..

    Any help is highly appreciated.

    Txn

    ReplyDelete
    Replies
    1. Understood. I had my personal experience on this and used the following tool for such kind of situations.

      go with this- http://metadataexportsps.codeplex.com/

      Let me know in case of any queries, thank you

      Delete
  3. Devops is not a Tool.Devops Is a Practice, Methodology, Culture or process used in an Organization or Company for fast collaboration, integration and communication between Development and Operational Teams. In order to increase, automate the speed of productivity and delivery with reliability.
    python training in bangalore
    aws training in bangalore
    artificial intelligence training in bangalore
    data science training in bangalore
    machine learning training in bangalore
    hadoop training in bangalore
    devops training in bangalore
    iot training in bangalore

    ReplyDelete

Your feedback is always appreciated. I will try to reply to your queries as soon as possible- Amol Ghuge

Note: Only a member of this blog may post a comment.