I have a Web App with a root and four different HNSCs. I've been able to successfully backup and restore the HNSCs from a dev environment, but I am having trouble achieving this with my root site collection.
This is my PowerShell script:
Restore-SPSite http://contoso.com/ -Path xxx.bak -DatabaseServer xxx -DatabaseName xxx -HostHeaderWebApplication http://contoso.com -Force
I get the following error:
Restore-SPSite : The URL 'http://contoso.com/' is in use as an alternate access URL or as the URL of a host header site. Please choose a different URL and try again.
I tried removing the existing root site collection before running the script with the same outcome. I even tried using / as the Site Collection's url with no success.
Microsoft examples are for site collections under sites, not root site collections. So, is this even possible?