I have 2 SharePoint servers

  1. From server A I took site collection backup

  2. Now server A is totally down and I installed new SharePoint 2013 in server B

Now I want to restore site collection from server A to server

I run below command

Restore-SPSite -Identity "http://af-spt1-srv/sites/test" -Path C:\Users\spvfarm\Desktop\t\hrc.bak -DatabaseServer af-dbt1-srv -DatabaseName WSS_Content_test2 -HostHeader http://af-sp-srv -Force -GradualDelete -Verbose

but it gives blow error:

Restore-SPSite: The web application at http://af-spt1-srv/sites/test counld not be found. verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application

  • Do you have a web application created on that site and a site collection in that path created? Commented Apr 20, 2015 at 15:16

3 Answers 3


First, you need a web application created on farm B at http://af-spt1-srv Second, lets clean up your command...it has a mix of parameters from remove-spsite and restore-spsite and some you just don't need. Use this instead: Restore-SPSite -Identity "http://af-spt1-srv/sites/test" -Path C:\Users\spvfarm\Desktop\t\hrc.bak -DatabaseServer af-dbt1-srv -DatabaseName WSS_Content_test2

Reasoning is hostheader is for host header based site collections. You have path based site collection listed, so this isn't needed. -Force should NEVER be used as a default command. You need to know and understand why you are using it. Example, overwriting an existing site collection at the same location would be a reason to use it, but you are creating a new site collection from this, so it isn't needed. -Gradualdelete is part of the remove-spsite command. -Verbose you can keep if you need to see the extra info.


First you have to create a web application in farm B. After creating the web application, get the URL and execute the command bellow:

Restore-SPSite -Identity "<webApplicationUrl>/sites/test" -Path "<backupFilePath>" -DatabaseServer "<DBServer>" -DatabaseName "<DBNameCreatedWithTheWebApplication>" -Force

If your farm is using only one DBServer you can remove the parameters DatabaseServer and DatabaseName.


check the permission of the account and even run powershell as administrator.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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