Web site already exists error when restoring
Question
I am using SharePoint Server 2007 Enterprise with Windows Server 2008 Enterprise. And I am using publishing portal template. And I am using command,
stsadm -o restore -url http://machinename:8090/siteabc -filename c:\backup\siteabc.bak
But met with the following error -- there is a web site already exist on "/siteabc". Please specify a new URL or using -overwrite.
How to check whether there is a web site called "/siteabc" already exists? Not sure whether tools like SharePoint Manager could detect this?
Solution
SharePoint Manager would indeed show you if this site already exists. Another way is to go into 'Central Administration', click on the 'Application Management' tab and select Site Collection List (Under 'SharePoint Site Management'). Make sure you change the web application in the top right hand corner to the correct one and you should see the site listed.
Im pretty sure that the site would exist and you could then delete it or use -overwrite to restore your backup over the top.
Hope this helps,
Alex
OTHER TIPS
I think this was fixed in SP2, but in SP1 I noticed that when I restored a site, if I didn't have the url correct, it would think i'm talking about the root site instead of the one I was referring to.
so
stsadm -o restore -url http://machinename/sites/siteabc -filename c:\backup\siteabc.bak
would work, but
stsadm -o restore -url http://machinename/site/siteabc -filename c:\backup\siteabc.bak
wouldn't and would actually think i'm trying to restore to http://machinename/. I made the mistake of doing the -overwrite switch and restored the site right over top of my root site collection.
Also, when doing this, make sure your managed paths are setup to allow site collections at the url you are specifing.
This KB article also explains the issue I was seeing (http://support.microsoft.com/default.aspx/kb/968474)
You could also try navigating to http://machinename:8090/siteabc/_layouts/settings.aspx. I have provisioned a few sites where I hosed the masterpage during provisioning. When I went to http://machinename:8090/siteabc I would get a 404, but I knew the site was still there. Since the application pages used a different masterpage, I could still get to the site via the settings page and delete the site.