stsadm can inadvertently delete a root site collection if erroneous URL path used
stsadm can inadvertently delete a root site collection if erroneous URL path used
RAPID PUBLISHING
Symptom
After using stsadm -o restore with the -overwrite parameter and getting an error you notice a site one level up from the site you were trying to restore is deleted. The root level site http://servername is deleted.
    ERROR:
    No content databases are available for this operation. Create a content database , and then try the operation again. To create a content database, click Content databases on the Application Management page, select the Web application to use, and then click Add a content database.
Going to the now dead root site you get:ÂÂ
    404 FILE NOT FOUND
Cause
This can happen if you pass an improper URL path with stsadm -o restore.
EXAMPLE:
Correct – stsadm -o restore -url http://SERVERNAME/sites/sitename -filename DRIVE: file.bak -overwrite
Incorrect – stsadm -o restore -url http://SERVERNAME/site/sitename -filename DRIVE: file.bak -overwrite
NOTE Missing ‘s’ in the word ‘sites’ along URL path.
When we pass the -overwrite parameter with stsadm it deletes the destination site and then tries to accomplish the restore. If the URL path is incorrect then the deletion and restore is attempted against the only valid path which is the root site of the URL. The restore fails with an error but the site has already been deleted due to -overwrite which is expecting a site to be restored.
DISCLAIMER
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, MICROSOFT AND/OR ITS SUPPLIERS DISCLAIM AND EXCLUDE ALL REPRESENTATIONS, WARRANTIES, AND CONDITIONS WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO REPRESENTATIONS, WARRANTIES, OR CONDITIONS OF TITLE, NON INFRINGEMENT, SATISFACTORY CONDITION OR QUALITY, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THE MATERIALS.
Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
Microsoft Corporation. All rights reserved. Terms of Use | Trademarks
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
Back to the top
Leave a Reply