1

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?

  • what is your AAM settings? Most probably your address is not registered in the AAM, could you please share your AAM settings for the web app? – Waqas Sarwar MVP Jul 22 '14 at 14:03
0

I did this a while back, and it's a little fuzzy, but I think your web application has to have the URL "http://abd.spdev", whereas I see you're trying to restore it to the Port 80 web application. Restore it as a site collection to the Port 80; if it's an empty web application, restore it as "" or if there's already something there, try "".

If you want to give it a unique URL, try Alternate Access Binding after restoration.

Edit: This is from a little over a year ago, so I just wanted to emphasize that this is what I think was the problem. If another user sees error in this, please let me know :) I like to keep up to date with my SharePoint shenanigans.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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