I am trying to restore a backup of a site collection from my production enviroment to my dev enviroment using the following powershell script:
Restore-SPSite http://abd.spdev.<domain> -Path d:\sp2013\abd\abd4jt.bak -hostheaderwebapplication http://SPDEV:80 -Force -DatabaseServer *****-spdev-01\SPDEVDATA -DatabaseName SPDEV_ABD
I have created the ABD site collection (with a basic STS#0 teamsite template) and tested it to ensure it is serving data - it is. The SPDEV web app is up and running and working for all my other site collections and the relevant service accounts have dbowner rights to the SPDEV_ABD database on the SPDEVDATA SQL instance.
When I run the script I get this error message:
Restore-SPSite : The Web application at http://abd.spdev. could 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 maping to the intended application At line:1 char:1 + Restore-SPSite -identity http://abd.spdev. -Path d:\sp2013\abd\abd4jt.bak -h ... + ~~~~~~~~~~~~~~ + CategoryInfo : InvalidData: (Microsoft.Share...dletRestoreSite:SPCmdletRestorSite) [Restore-SPSite], FileNotFoundException
+ FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletRestoreSite
Any ideas?