The backup of Sharepoint 2010 User Profile Proxy fails with error 'unable to query the team database metadata' when User Profile synchronization is enabled.
Viewing the SPSWrapper debug log of the failed backup will show the following error:
[0f68] 07/28/11 17:56:31 INF :: Unable to cast object of type 'Microsoft.Office.Server.Administration.UserProfileApplicationProxy' to type 'Microsoft.SharePoint.Administration.SPServiceApplication'.
[0f68] 07/28/11 17:56:31 Executing Powershell cmd Get-SPServiceApplicationProxy -identity a779dcff-1f39-4c8b-a255-e880fb89f671
[0f68] 07/28/11 17:56:32 Error exception in running cmd Get-SPServiceApplicationProxy -identity a779dcff-1f39-4c8b-a255-e880fb89f671 Exception is Exception getting "IsSynchronizationRunning": "Object reference not set to an instance of an object."
[0f68] 07/28/11 17:56:32 Error in BackupSSP
This is similar to another issue described in TECH166208 except the error is in a different object. The SPSWrapper debug must be reviewed to determine which issue is present, in this case the exception is in getting the IsSynchronizationRunning property.
A hotfix is now available for this issue in the current version(s) of the product(s) mentioned at the end of this article. Refer to the Hotfix link under Related Documents at the end of this article to obtain the hotfix needed to resolve the issue.