We are having an issue with importing managed-metadata from our live environment into the test environment (Sharepoint 2010 Standard).

We are using this code to import the managed-metadata:

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

enter image description here

We always get the error timeout expired after 30-40 seconds.

Can anybody help to increase the timeout value?

Where can we increase this value?

Is there a chance to increase it?

Thanks for any help!

  • Is given information in below answer helps you? Feel free to ask me, if you still do have a problem – Hardik May 9 '16 at 13:50
  • Thanks for your feedback. I'm checking another way currently. I'll let you know, when I have a result. – dns_nx May 10 '16 at 12:06

There are a few approaches to backup/restore managed metadata between environments.

OOB, SharePoint 2010 allows for ONLY importing managed metadata in CSV format. You are required to use Powershell / Object Model to build the csv file. Here is a script that can do it. 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. Paul Culmsee did a good job of explaining the same with nice screenshots here. This is quite hectic especially if there is a lot of data.

You can follow below mentioned link for complete description

SharePoint 2010 - How to Backup/Restore Managed Metadata from one farm/environment to another?


I've found a way to migrate the Managed Metadata into our test farm. It does not solve my timeout issue in Powershell, but the data got transferred with same term guids. Maybe someone needs to do the same.

1) Make a backup of your Managed Metadata by creating a SQL dump of the Managed Metadata database and transfer this dump file to your SQL system of the test farm.

2) Then create a database on your SQL system of your test farm with the same name as in the productive farm. Restore the dump file into the new created database.

3) After this procedure, you need to switch to the new created database in your test farm. Open SharePoint Management Shell:

Set-SPMetadataServiceApplication -DatabaseName "Managed Metadata Service_02fbb3bf94ed40e8a04fcd5c46088e64" -Identity "Managed Metadata Service"

Replace Databasename with your new created database name.

4) Then make a backup of your SiteCollection via SharePoint Management Shell of your productive farm:

Backup-SPSite -Identity http://yourSiteCollectionUrl -NoSiteLock -Path "\\share\path\backup.bak"

5) Switch to your test farm and restore the SiteCollection:

Restore-SPSite -Path "\\share\path\backup.bak" -Identity http://yourSiteCollectionUrlOnTestFarm -Force

6) The last step is to add the SiteCollection Id to the SiteCollectionAccessIds of the Term Store Groups:

$site = get-spsite http://yourSiteCollectionUrlOnTestFarm
$s = new-object Microsoft.SharePoint.Taxonomy.TaxonomySession($site)
$ts = $s.DefaultSiteCollectionTermStore
$gr = $ts.Groups["YourManagedMetadataGroupName"]

if ($gr.SiteCollectionAccessIds.Contains($site.ID) -eq $false) {
    Write-Host Add SiteId



After these steps, your Managed Metadata should exactly be the same on your test farm as on your productive system.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.