Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I did a full backup from production. and kicked of a restore to a dev farm. Everything went smoothly except the managed metadata piece. How do I go by fixing this so I dont get this?

here is the error from the error log

[11/20/2012 11:12:22 AM] FatalError: Object Metadata Service Application failed in event OnPostRestore. For more information, see the spbackup.log or sprestore.log file located in the backup directory.
    InvalidCastException: Unable to cast object of type 'Microsoft.SharePoint.Taxonomy.MetadataWebServiceApplication' to type 'Microsoft.SharePoint.Administration.SPDatabaseServiceInstance'.
[11/20/2012 11:12:22 AM] Debug:    at Microsoft.SharePoint.Administration.SPDatabase.GenerateConnectionStringFromComponents()
   at Microsoft.SharePoint.Administration.SPDatabase.get_ConnectionString()
   at Microsoft.SharePoint.Administration.SPDatabase.get_DatabaseConnectionString()
   at Microsoft.SharePoint.Taxonomy.MetadataWebServiceDatabase.EnsureApplicationAccess(String userName)
   at Microsoft.SharePoint.Taxonomy.MetadataWebServiceApplication.OnProcessIdentityChanged(SecurityIdentifier processSecurityIdentifier)
   at Microsoft.SharePoint.Administration.SPIisWebServiceApplication.SetAccessControl(SPIisWebServiceApplicationSecurity security)
   at Microsoft.SharePoint.Administration.SPServiceBackupRestoreUtilities.RestorePermissionsAcl(SPBackupRestoreInformation info, SPIisWebServiceApplication application)
   at Microsoft.SharePoint.Administration.SPIisWebServiceApplication.Microsoft.SharePoint.Administration.Backup.IBackupRestore.OnPostRestore(Object sender, SPRestoreInformation info)

Thanks Moe

share|improve this question
    
Are you using an account that has permissive access to the new Managed Metadata Service Application in the database? –  Mike Dec 7 '12 at 16:05
    
Did you backup and restore your MMS service application to the farm before restoring the site content? –  RJ Cuthbertson Dec 7 '12 at 16:06
    
I am using farm account who has permission to mms. I am using central admin restore. and I think the service db restore is after the content db restore. –  Maria Burton Dec 7 '12 at 16:24
add comment

1 Answer

up vote 0 down vote accepted

On the MSDN blog of Tajeshwar Singh Site Collection Backup\Restore and Managed Metadata he describes how to ensure your term store is available to your site content after a restore is completed:

Wherever you restore the site collection, Managed Metadata Service should be available. Managed metadata columns consult the MMS service whenever we interact with data stored in these columns. If MMS is not there things can break and show unexpected behavior. The easiest option to make things work is to restore the termstore from source farm to target farm.

To do this via PowerShell:

Export:

$mmsApp = theSourceMMSGuid;

$mmsproxy = Get-SPServiceApplicationProxy | ?{$_.TypeName -eq "ExportTaxonomyProxyName"};

Export-SPMetadataWebServicePartitionData -Identity $mmsApp -ServiceProxy $mmsproxy -Path \\location\exportfile.bak;

Import:

$mms2 = theDestinationMMSGuid;

$mms2proxy = Get-SPServiceApplicationProxy | ?{$_.TypeName -eq "ImportTaxonomyProxyName"};

Import-SPMetadataWebServicePartitionData -Identity $mms2 -ServiceProxy $mms2proxy -path \\location\exportfile.bak -OverwriteExisting;
share|improve this answer
    
I am not sure if this is the solution. I will mark it as answer for now and will come back. –  Maria Burton Dec 7 '12 at 16:56
    
The article is about a site collection restore, but the same applies to a farm restore. My colleague in the cubicle next to me was just working on the same issue last week. –  RJ Cuthbertson Dec 7 '12 at 16:59
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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