none
Migrate termstore to another farm without override

    Question

  • Hi,

    I would like to know if it's possible to migrate an existing termstore to another farm without overriding the target one.

    We have two different farm with their own termstore. I have tried to use this command to import the termstore in the other farm.

    $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
    

    It works but the problem is that this command override everything in the target termstore.

    I would like to merge both termstore instead of override it.

    Thank you.

    Alex

    Friday, March 10, 2017 3:11 PM

Answers

  • Hi Reshmee,

    Indeed, i test the PnP cmdlet on premise and it works.

    It's just a little bit different in term of syntax :

    Connect-PnPOnline –Url https://yoursite.sharepoint.com

    Export metadata : Export-PnPTaxonomy -Path c:\output.txt

    Import metadata : Import-PnPTaxonomy -Path c:\output.txt



    • Marked as answer by AlexDev62 Monday, March 13, 2017 8:08 PM
    Monday, March 13, 2017 8:07 PM

All replies

  • You can try to use to PnP PowerShell. Please refer to my blog post.

    https://wordpress.com/post/reshmeeauckloo.wordpress.com/5268

    To export the termstore, use

    Connect-SPOnline -Url <siteurl> -CurrentCredentials 
    Export-SPOTaxonomy -IncludeID -Path "C:\temp\Metadata\terms.txt"

    To import the termstore, use 

    Connect-SPOnline -Url <siteurl> -CurrentCredentials
    Import-SPOTaxonomy -Path "C:\temp\Metadata\terms.txt"

    Friday, March 10, 2017 3:57 PM
  • Sorry, i haven't precise that it's for SharePoint 2013 on-premise and not online, is it working for it ?

    Thank you.

    Alex

     
    Friday, March 10, 2017 4:21 PM
  • Hi Alex

    The PnP cmdlet works for SharePoint on-premise environment as well.

    Otherwise you can use the CSOM code to export and import metadata as shown in blog post 

    Export metadata

    https://cann0nf0dder.wordpress.com/2014/11/12/exporting-taxonomy-from-sharepoint-using-powershell/

    Import metadata

    https://cann0nf0dder.wordpress.com/2014/11/29/importing-taxonomy-to-sharepoint-using-powershell/

    Cheers

    Reshmee

    Monday, March 13, 2017 1:58 PM
  • Hi Reshmee,

    Indeed, i test the PnP cmdlet on premise and it works.

    It's just a little bit different in term of syntax :

    Connect-PnPOnline –Url https://yoursite.sharepoint.com

    Export metadata : Export-PnPTaxonomy -Path c:\output.txt

    Import metadata : Import-PnPTaxonomy -Path c:\output.txt



    • Marked as answer by AlexDev62 Monday, March 13, 2017 8:08 PM
    Monday, March 13, 2017 8:07 PM