none
Restore-SPSite error - unresolved symbol

    Question

  • Hello All - 

    I'm getting a nasty error when trying to restore a teamsite site-collection into my production environment. The site was created on the development environment, which is identical to production:

    Restore-SPSite : <nativehr>0x80070003</nativehr><nativestack>OWSSVR.DLL: (unresolved symbol, module offset=0000000000052CFE) at 0x000007FEE4A32CFE
    OWSSVR.DLL: (unresolved symbol, module offset=0000000000052C86) at 0x000007FEE4A32C86
    OWSSVR.DLL: (unresolved symbol, module offset=0000000000053178) at 0x000007FEE4A33178
    OWSSVR.DLL: (unresolved symbol, module offset=000000000005100C) at 0x000007FEE4A3100C
    OWSSVR.DLL: (unresolved symbol, module offset=000000000015CDED) at 0x000007FEE4B3CDED
    Microsoft.SharePoint.Library.ni.dll: (unresolved symbol, module offset=00000000000EBF54) at 0x000007FEE613BF54
    Microsoft.SharePoint.ni.dll: (unresolved symbol, module offset=0000000002AD1F5C) at 0x000007FEEB351F5C
    Microsoft.SharePoint.ni.dll: (unresolved symbol, module offset=0000000002A9AB1C) at 0x000007FEEB31AB1C
    Microsoft.SharePoint.ni.dll: (unresolved symbol, module offset=0000000005317239) at 0x000007FEEDB97239
    clr.dll: (unresolved symbol, module offset=00000000001A2FBD) at 0x000007FEFACB2FBD
    clr.dll: (unresolved symbol, module offset=00000000001A3794) at 0x000007FEFACB3794
    clr.dll: (unresolved symbol, module offset=00000000001A364B) at 0x000007FEFACB364B
    ntdll.dll: (unresolved symbol, module offset=0000000000029D8D) at 0x0000000077BE9D8D
    ntdll.dll: (unresolved symbol, module offset=0000000000018A2C) at 0x0000000077BD8A2C
    clr.dll: (unresolved symbol, module offset=00000000001A3710) at 0x000007FEFACB3710
    clr.dll: (unresolved symbol, module offset=00000000001A36CE) at 0x000007FEFACB36CE
    ntdll.dll: (unresolved symbol, module offset=0000000000029D0D) at 0x0000000077BE9D0D
    ntdll.dll: (unresolved symbol, module offset=00000000000191AF) at 0x0000000077BD91AF
    ntdll.dll: (unresolved symbol, module offset=00000000000197A8) at 0x0000000077BD97A8
    KERNELBASE.dll: (unresolved symbol, module offset=0000000000009E5D) at 0x000007FEFE179E5D
    clr.dll: (unresolved symbol, module offset=00000000001A3A87) at 0x000007FEFACB3A87
    clr.dll: (unresolved symbol, module offset=00000000001A3D22) at 0x000007FEFACB3D22
    Microsoft.SharePoint.ni.dll: (unresolved symbol, module offset=0000000002AAEEAA) at 0x000007FEEB32EEA
    </nativestack>
    At line:1 char:1
    + Restore-SPSite $site_col_url -Path $path -DatabaseServer $db_server -DatabaseNam ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidData: (Microsoft.Share...dletRestoreSite:SPCmdletRestoreSite) [Restore-SPSite], DirectoryNotFoundException
        + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletRestoreSite

    Worse than that, I tested restoring a site-collection backed up from production into production, and get the same error.

    Please can someone shed some light on this? 

    Thanks



    sysadmin

    Monday, September 16, 2013 12:33 PM

All replies

  • I have faced similar issues in the past and the problem were with my script. I am not sure if this would help you but I made changes to my script to get this working. Can you share the script being used by you?
    Monday, September 16, 2013 1:13 PM
  • Thank you VermaVishal

    This is how I do a restore of a site-collection

    $restore_folder = "<restore folder full path>"
    $file_name       = "<filename>.bak"
    $site_col_url     = "<site collection URL>"
    $path               = $restore_folder + "\" + $file_name
    $db_server       = "<database server name>"
    $target_db        = "<teamsites content database name>"

    Restore-SPSite $site_col_url -Path $path -DatabaseServer $db_server -DatabaseName $target_db [-Force]

    Nothing special - I only do it like this so that the variables are very visible and easy to edit.


    sysadmin

    Monday, September 16, 2013 1:26 PM
  • hmm.. looks pretty straight forward. Can you try hard coding the value for $path and see if it works? You may also try to see if the folder is not read only and the user has access to it? As its throwing a DirectoryNotFoundException.

    I am sure you would have tested this

    Monday, September 16, 2013 1:35 PM
  • The error is "Directory not found", which is an issue with the path to the bak.

    Trevor Seward, MCC

    Follow or contact me at...
      

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    Monday, September 16, 2013 1:36 PM
  • Thanks

    I tried entering all the values directly in the Restore-SPSite command as a single command, no change

    I tried CD'ing to the folder where the .bak file is and running it again with -Path ".\filename.bak" instead, new error saying cannot find .bak file in C:\Windows\System32. Same result with -Path "filename.bak"

    I tried copying the .bak file to C:\Windows\System32 and running it again, and we're back to the original error.

    I'm running powershell as administrator, I'm logged in with my farm admin account, which is also a domain admin and has local admin on the box. I'm doing this all on the app server. I can CD to the restore folder in powershell and list its contents.



    sysadmin

    Monday, September 16, 2013 1:56 PM
  • You need to supply the full path to the .bak file.  You also need to supply the URL to where the content is to be restored to.

    Trevor Seward, MCC

    Follow or contact me at...
      

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    Monday, September 16, 2013 1:57 PM
  • I did :)

    The -path parameter is "D:\restores\folder\filename.bak"

    The target site-collection parameter is "https://teamsites.domain.com/sites/site_name"

    The selected database is a teamsites content database

    Both of these are valid. There is currently no site-collection at /sites/site_name, but trying to overwrite produces the same results.

    I've done the same thing on my DEV box many times without any problem, using the commands already posted above. Apart from the URL, database server and database name, everything is identical on the dev box. Even the restore path and .bak filename.


    sysadmin

    Monday, September 16, 2013 2:10 PM
  • Does anyone have any other ideas about what this could be? It's definitely not a path issue, if I deliberately use an incorrect path for the .bak file, I get a file not found error instead of the unresolved symbol error. The teamsite URL is correct.

    Everything works on my Dev environment, just not in Production. The only difference between the two environments is that the web application URLs are https://teamsites.domain.com and https://teamsites-dev.domain.com, which should have no bearing on a Restore-SPSite.


    sysadmin

    Wednesday, September 18, 2013 8:37 AM
  • Are you referencing a feature on the source site? Look at this post it may give you some ideas:

    http://sharepoint.stackexchange.com/questions/19625/problem-with-sharepoint-contenttypebinding-and-lookup-field

    For now that's all I have

    Wednesday, September 18, 2013 8:54 AM
  • Thank you, VermaVishal

    That's interesting - I will look in to that, but generally this is what's confusing me:

    If I back up a site-collection on DEV, I can restore it to DEV with no errors

    If I back up a site-collection on PROD, I can restore it to DEV with no errors

    If I back up a site-collection on PROD, a restore to PROD fails with unresolved symbol error

    If I back up a site-collection on DEV, a restore to PROD fails with unresolved symbol error

    I even tried this by backing up a site-collection from PROD, deleting the site, and attempting to restore.. same unresolved symbol error. The site-collection could however be recovered successfully from the recycle bin.

    I'm not sure why one would work and not the other. Both environments are as identical as is possible.


    sysadmin

    Wednesday, September 18, 2013 10:35 AM
  • Here's something I did notice though...

    I tried exporting the site-collection instead of backing it up, by using Export-SPWeb. The export (from DEV) failed, the following was found in the export log:

    [9/17/2013 1:54:07 PM] Progress: Starting to process objects of type ContentType.
    [9/17/2013 1:54:10 PM] FatalError: These columns don't currently have unique values.
    [9/17/2013 1:54:10 PM] Debug:    at System.Data.ConstraintCollection.AddUniqueConstraint(UniqueConstraint constraint)
       at System.Data.ConstraintCollection.Add(Constraint constraint, Boolean addUniqueWhenAddingForeign)
       at System.Data.ConstraintCollection.Add(Constraint constraint, Boolean addUniqueWhenAddingForeign)
       at System.Data.DataRelationCollection.DataSetRelationCollection.AddCore(DataRelation relation)
       at System.Data.DataRelationCollection.Add(DataRelation relation)
       at System.Data.DataRelationCollection.Add(String name, DataColumn parentColumn, DataColumn childColumn)
       at Microsoft.SharePoint.Deployment.ListObjectHelper.GetNextBatch()
       at Microsoft.SharePoint.Deployment.ObjectHelper.RetrieveDataFromDatabase(ExportObject exportObject)
       at Microsoft.SharePoint.Deployment.ListObjectHelper.RetrieveData(ExportObject exportObject)
       at Microsoft.SharePoint.Deployment.ExportObjectManager.GetObjectData(ExportObject exportObject)
       at Microsoft.SharePoint.Deployment.ExportObjectManager.MoveNext()
       at Microsoft.SharePoint.Deployment.ExportObjectManager.ExportObjectEnumerator.MoveNext()
       at Microsoft.SharePoint.Deployment.SPExport.SerializeObjects()
       at Microsoft.SharePoint.Deployment.SPExport.Run()
    [9/17/2013 1:54:10 PM] Progress: Export did not complete.

    It finished folders, files and fields without any errors or warnings, but threw the above error as soon as it began with the export of content types. The export consequently failed.


    sysadmin

    Wednesday, September 18, 2013 10:38 AM
  • I presume some binding is failing somewhere. How different are Prod and Dev from one another? Nothing comes to mind.

    Wednesday, September 18, 2013 10:45 AM
  • go through the post I sent in my earlier reply, I guess the issue is with the content type.

    Wednesday, September 18, 2013 10:46 AM