This PowerShell SharePoint tutorial, we will discuss how to fix error restore-spsite directorynotfoundexception SharePoint 2013 which comes while taking backup in SharePoint 2013 on-premise environment.
Recently we were trying to Backup restore a site collection from one server to another server meaning from a dev server to testing server using PowerShell in SharePoint 2013. When we run the command it gave an error like this.
Below is the PowerShell command we were trying to restore the site:
Add-PSSnapin "Microsoft.SharePoint.PowerShell" Restore-SPSite -Identity http://SiteColURL/ -Path E:\MySiteCollection.bak -force
When we run the command the error was coming like below:
Restore-SPSite : 0x80070003OWSSVR.DLL: (unresolved symbol, module offset=0000000000053C36) at 0x00007FF800853C36 OWSSVR.DLL: (unresolved symbol, module offset=0000000000053BBE) at 0x00007FF800853BBE OWSSVR.DLL: (unresolved symbol, module offset=00000000000540B4) at 0x00007FF8008540B4 OWSSVR.DLL: (unresolved symbol, module offset=0000000000051F44) at 0x00007FF800851F44 OWSSVR.DLL: (unresolved symbol, module offset=000000000015EB21) at 0x00007FF80095EB21 Microsoft.SharePoint.Library.ni.dll: (unresolved symbol, module offset=00000000000D66FD) at 0x00007FF8021A66FD
At line:2 char:1
- Restore-SPSite -Identity https://SiteURL …
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
- CategoryInfo : InvalidData: (Microsoft.Share…dletRestoreSite:SPCmdletRestoreSite) [Restore-SPSite], DirectoryNotFoundException
- FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletRestoreSite
restore-spsite directorynotfoundexception SharePoint 2013
We were trying to restore from one server to another server in SharePoint 2013. In the PowerShell command when we specify database server name and content database name it worked for us.
We use the below PowerShell command.
Add-PSSnapin "Microsoft.SharePoint.PowerShell" Restore-SPSite -Identity http://SiteColURL/ -Path E:\MySiteCollection.bak -DatabaseServer WIN-PFCP2DGT8DI -DatabaseName WSS_Content_New
After this, it worked for us.
You may like following SharePoint tutorials:
- How to make SharePoint site collection read only and restrict delete?
- Create a web application and a Site Collection using PowerShell
- SharePoint 2010 to SharePoint 2013/2016/2019 Migration Steps
Here, we learned how to fix error restore-spsite directorynotfoundexception sharepoint 2013, which comes while taking backup and restore in SharePoint 2013.
I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SPGuides.com