Managed metadata terms and termsets each have a unique guid. If you take a backup of a site that is using managed metadata in some columns and restore this site into another environment, the guids don't match up. You will have to go through and re click each term and "wire it back up" so it's okay and doesn't show in red text.
The easiest way to MOVE the managed metadata service application from one environment to the other. That way you can ensure that the GUIDs of terms and termsets match.
Powershell for Export:
$mmsAppId= "App ID Guid Placeholder"
$mmsproxy = Get-SPServiceApplicationProxy -Identity "Proxy ID Guid Placeholder"
Export-SPMetadataWebServicePartitionData -Identity $mmsAppId -ServiceProxy $mmsproxy -Path "Path to save Exported file placeholder"
App ID Guid Placeholder:
Navigate to Central Admin > Application Management > Manage Service Applications > Managed Metadata Service Application
Copy the GUID from the browser.
Proxy ID Guid Placeholder:
Navigate to Central Admin > Application Management > Manage Service Applications > Managed Metadata Service Application Connection
Right click in the dialog and capture the appid
The Import Process:
Make sure that the exported backup file is copied physically into the server that hosts SQL Server and make sure that it is accessible from the WFE where the PowerShell script is executed. Otherwise copy the file into SQL server then use network shared path in the script.(For Ex: \\MyDBServer\Temp\MMS.bak)
Execute the below PowerShell commands.
$mmsAppId= "App ID Guid Placeholder"
$mmsproxy = Get-SPServiceApplicationProxy -Identity "Proxy ID Guid Placeholder"
Import-SPMetadataWebServicePartitionData -Identity $mmsAppId -ServiceProxy $mmsproxy -Path "Exported file’s path placeholder" -OverwriteExisting;
The easiest way to MOVE the managed metadata service application from one environment to the other. That way you can ensure that the GUIDs of terms and termsets match.
Powershell for Export:
$mmsAppId= "App ID Guid Placeholder"
$mmsproxy = Get-SPServiceApplicationProxy -Identity "Proxy ID Guid Placeholder"
Export-SPMetadataWebServicePartitionData -Identity $mmsAppId -ServiceProxy $mmsproxy -Path "Path to save Exported file placeholder"
App ID Guid Placeholder:
Navigate to Central Admin > Application Management > Manage Service Applications > Managed Metadata Service Application
Copy the GUID from the browser.
Proxy ID Guid Placeholder:
Navigate to Central Admin > Application Management > Manage Service Applications > Managed Metadata Service Application Connection
Right click in the dialog and capture the appid
The Import Process:
Make sure that the exported backup file is copied physically into the server that hosts SQL Server and make sure that it is accessible from the WFE where the PowerShell script is executed. Otherwise copy the file into SQL server then use network shared path in the script.(For Ex: \\MyDBServer\Temp\MMS.bak)
Execute the below PowerShell commands.
$mmsAppId= "App ID Guid Placeholder"
$mmsproxy = Get-SPServiceApplicationProxy -Identity "Proxy ID Guid Placeholder"
Import-SPMetadataWebServicePartitionData -Identity $mmsAppId -ServiceProxy $mmsproxy -Path "Exported file’s path placeholder" -OverwriteExisting;
Comments
Post a Comment