Skip to content

Bart's Hideout

SharePoint, Personal and other stuff I want to share

  • Bouwen
  • ☆ Kobe ☆
  • Bram
    • Foto-album
  • SharePoint
  • Slacking
  • Foto’s
    • Foto album – Bouw
    • Foto album – Allerlei
  • Contact
  • About
    • Privacy Policy
  • Administration

Migrate managed metadata between farms

Everybody loves working with managed metadata but one of the challenges you eventually will have to deal with, is the challenge of moving this managed metadata from one farm to another. You might want to put a copy of a production environment into the development environment. Or you have a so-called “test” environment which is used by users to fill content and then you have to move everything to production.

Sure, you can export your managed metadata and import it into your other farm but the problem is that each termset and term has a GUID and when you import that data into your new farm, new GUID’s will be assigned to them. If you move the rest of your content to your new farm, your managed metadata columns, which point to those termsets won’t work anymore in your new farm because the GUID of the termset it links to, has changed. You have to hook them up again to the correct termset. Furthermore, existing items which already have values in those fields also need to be hooked up again. The value looks the same, but the ID is not and when you open the properties of such an item, SharePoint will not be able to resolve that value against the term store.

So, how do you move your managed metadata and keep the ID’s? It’s actually quite easy using PowerShell.

Export data

$mmsApplication = Get-SPServiceApplication | ? {$_.TypeName -eq "Managed Metadata Service"}
$mmsProxy = Get-SPServiceApplicationProxy | ? {$_.TypeName -eq "Managed Metadata Service Connection"}
Export-SPMetadataWebServicePartitionData $mmsApplication.Id -ServiceProxy $mmsProxy -Path "\\server\share\mmsdata.cab"

Copy this file to a location which is accessible to the database server of your destination farm.
make sure that the service account which is used to run the Managed Metadata Service has the “BulkAdmin” server role in SQL Server. This is role is only needed for the import. You can remove it afterwards.

Import data

$mmsApplication = Get-SPServiceApplication | ? {$_.TypeName -eq "Managed Metadata Service"}
$mmsProxy = Get-SPServiceApplicationProxy | ? {$_.TypeName -eq "Managed Metadata Service Connection"}
Import-SPMetadataWebServicePartitionData $mmsApplication.Id -ServiceProxy $mmsProxy -Path "\\server\share\mmsdata.cab" -OverwriteExisting

When you compare the termsets and terms of both farms, you will see that the ID’s are the same. Now you can move your content and your managed metadata columns will be working just fine.

Share this:

  • Email
  • Tweet
  • More

Like this:

Like Loading...

Related

Published Saturday, 25 February, 2012
Categorized as SharePoint Tagged Managed Metadata, Migration, PowerShell, SharePoint 2010

By Bart

Bart is a certified SharePoint consultant / architect at CTG Belgium NV with a broad professional experience in IT, a background in software development with a specialisation in Microsoft products and technologies and a solid knowledge and experience in Microsoft SharePoint Products and Technologies. He started as a COBOL developer on a mainframe environment and grew into software development for Windows platforms. Participated in projects varying from migrations of existing applications to development of Web applications and Windows applications. Became fascinated by the SharePoint 2007 platform and strongly believed in the added business value of this platform. Is since then fully committed to SharePoint and focuses on SharePoint implementations, migrations, integrations, design and coaching. Stays on top of new developments within the SharePoint technology stack and related technologies.

View all of Bart's posts.

Post navigation

Previous post

Setting “Replicating Directory Changes” using PowerShell

Next post

Resetting a SharePoint List Filter WebPart

Social

  • View bart.kuppens’s profile on Facebook
  • View evilvjeken’s profile on Twitter
  • View bkuppens’s profile on LinkedIn
  • View bkuppens’s profile on GitHub

My Links

  • BIWUG
  • Microsoft 365 Roadmap
  • My PowerShell Repository
  • Nintex Community
  • Working @ CTG

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Recent Posts

  • List Lookup Control filtering in Nintex Forms not working
  • Being a consultant at CTG for 17,5 years…
  • The Importance of Completing Tasks in Workflows
  • Maintaining Nintex Workflow Progress Data
  • Cleaning Workflow History in SharePoint

Archives

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
Bart's Hideout
Proudly powered by WordPress.
loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.
%d bloggers like this: