Hello, everybody!
For testing purposes I have created host-named site collection http://portal.contoso.com
I am trying to copy this site collection with the Copy-SPSite cmdlet to a new host-named site collection http://portal2.contoso.com :
Copy-SPSite -Identity 'http://portal.contoso.com' -TargetUrl 'http://portal2.contoso.com' -DestinationDatabase WSS_Content_80_1 -HostHeaderWebApplication 'http://spserver2013'
But I am getting the following error:
Copy-SPSite : Another site already exists at http://portal.contoso.com/. Delete this site before attempting to create a new site with the same URL, choose a new URL, or create a new inclusion at the path you originally specified.
Any help with this issue will be appreciated.
P.S. I tried Copy-SPSite cmdlet with path based site collections and it works like a charm.