stsadm can inadvertently delete a root site collection if erroneous URL path used

Article ID: 968474 – Last Review: March 10, 2009 – Revision: 2.0

stsadm can inadvertently delete a root site collection if erroneous URL path used

Source: Microsoft Support

RAPID PUBLISHING

RAPID PUBLISHING ARTICLES PROVIDE INFORMATION DIRECTLY FROM WITHIN THE MICROSOFT SUPPORT ORGANIZATION. THE INFORMATION CONTAINED HEREIN IS CREATED IN RESPONSE TO EMERGING OR UNIQUE TOPICS, OR IS INTENDED SUPPLEMENT OTHER KNOWLEDGE BASE INFORMATION.

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

MICROSOFT AND/OR ITS SUPPLIERS MAKE NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY, RELIABILITY OR ACCURACY OF THE INFORMATION CONTAINED IN THE DOCUMENTS AND RELATED GRAPHICS PUBLISHED ON THIS WEBSITE (THE “MATERIALS”) FOR ANY PURPOSE. THE MATERIALS MAY INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS AND MAY BE REVISED AT ANY TIME WITHOUT NOTICE.

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.


APPLIES TO
  • Microsoft Office SharePoint Server 2007
  • Microsoft Windows SharePoint Services 3.0 Service Pack 1
Keywords: 
kbnomt kbrapidpub KB968474

 

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.

AddThis Social Bookmark Button

Leave a Reply

*
To prove that you're not a bot, enter this code
Anti-Spam Image