4

When I try to do a restore of a site collection,

restore-spsite -Identity https://xx/10014628/ -Path D:\SiteCollectionBackups\10014628.bak -Force -Confirm

I get:

restore-spsite : <nativehr>0x80070003</nativehr><nativestack></nativestack>
At line:1 char:1
+ restore-spsite -Identity https://xx/sites/100146 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (Microsoft.Share...dletRestoreSite:SPCmdletRestoreSite) [Restore-SPSite], DirectoryNotFoun 
   dException
    + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletRestoreSite

Full Error from the log

System.IO.DirectoryNotFoundException: <nativehr>0x80070003</nativehr><nativestack></nativestack>, StackTrace:   
 at Microsoft.SharePoint.SPWeb.InitWebPublic()    
 at Microsoft.SharePoint.SPWeb.get_ID()    
 at Microsoft.SharePoint.Administration.SPSiteCollection.Restore(String strSiteUrl, String strFilename, Boolean bOverwrite, Boolean bGradualDelete, Boolean hostHeaderAsSiteName, Boolean preserveSiteId)    
 at Microsoft.SharePoint.PowerShell.SPCmdletRestoreSite.InternalProcessRecord()    
 at Microsoft.SharePoint.PowerShell.SPCmdlet.ProcessRecord()    
 at System.Management.Automation.CommandProcessor.ProcessRecord()    
 at System.Management.Automation.CommandProcessorBase.DoExecute()    
 at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate)    
 at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext)    
 at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)    
 at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)    
 at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)    
 at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)    
 at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)    
 at System.Management.Automation.DlrScriptCommandProcessor.RunClause(Action`1 clause, Object dollarUnderbar, Object inputToProcess)    
 at System.Management.Automation.CommandProcessorBase.DoComplete()    
 at System.Management.Automation.Internal.PipelineProcessor.DoCompleteCore(CommandProcessorBase commandRequestingUpstreamCommandsToStop)    
 at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate)    
 at System.Management.Automation.Runspaces.LocalPipeline.InvokeHelper()    
 at System.Management.Automation.Runspaces.LocalPipeline.InvokeThreadProc()    
 at System.Management.Automation.Runspaces.PipelineThread.WorkerProc()    
 at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)    
 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)    
 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)    

If I try to

remove-spsite -Identity https://xx/sites/10014628/ -Confirm -Force -Verbose

I get the same error.

If I try:

stsadm -o databaserepair -url "https://xx" -databasename "ContentDatabases"

so, I cant remove that site collection, neither repair it, neither restore it. Any idea??

6
+25

I recently ran into the exact same issue in SP 2013 where my Dev machine had the RTM install and the target server the June CU. We ended up copying the Content Database from SQL directly, reattaching and associating it to a Web Application and it worked flawlessly.

It seems the Restore command is no longer backwards compatible and can't be relied to restore betweem different patch levels (so to everyone out there, you better backup your SQL directly instead of having a Backup-SPSite routine) but this might have been an isolated issue.

2

Seems that in the previous action, a site collection reference already has been created somewhere in the web application configuration. Although there’s a reference, the necessary files to render the page aren’t there. There’s also no possibility to remove the existence of the site collection. When you try to do something with the site collection, for example try to delete it, you always get the following exception:

System.IO.DirectoryNotFoundException, <nativehr>0x80070003</nativehr><nativestack></nativestack>

One solution is to remove the content database, and recreate the content database and site collection with PowerShell. Using the GUI will break things again.

If that doesn’t work, I found 2 other workarounds for the problem:

Delete the web application and recreate it. This is not a good solution, because you create downtime, lose managed paths, configuration, etc. When you encounter the error on the “Processing…” page, leave the window open to preserve your session. Fix the issue that shows up in the log, and simply hit F5 and use the same session. This will complete the creation process of the site collection and not throw any exception.

Source

Also check whether the site collection is locked as read only.

Please have a look at the below URL too,

http://support.microsoft.com/kb/2488967

  • 1
    The content database has 2000 site collections, how can I do this without losing any data? – Luis Valencia Nov 15 '13 at 12:30
1

do this:

open powershell as admin (run as admin):

restore-spsite -Identity https://xx/10014628/ -Path D:\SiteCollectionBackups\10014628.bak -Force -Confirm

change the D drive to a local drive like C but dont put the file on root like so C:\10014628.bak rather have it within a folder C:\SiteCollectionBackups\10014628.bak should do the trick

also like to note and ask have you updated sharepoint 2013 recently? if so:

After installing the fixes you need to run the SharePoint 2013 Products Configuration Wizard on each machine in the farm.

http://blogs.technet.com/b/stefan_gossner/archive/2013/08/14/august-2013-cu-for-sharepoint-2013-has-been-released.aspx

otherwise it would bring about errors like what you got!

1

I am not sure if i am late or not.

this error comes for one of the following reasons:

  • Backup SharePoint server version is different than the restore server version

  • The backup file is corrupted

  • The used user account is not having the permission on the content DB for the web application that you want to restore on.

1

To get the site id use powershell. Interestingly in my case I can create the powershell object. E.g.

$s=Get-SpSite <url>
$s.ID  

Go to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN

Then execute

STSADM -o deleteconfigurationobject -id <site id>

In once case this worked

Or you can try deleting

$s.Delete 

If everything fails, detach and reattach the content database.

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.