stsadm can inadvertently delete a root site collection if erroneous URL path used
This article has been archived. It is offered "as is" and will no longer be updated.
Source: Microsoft Support
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.
After using stsadm -o restore with the -overwrite parameter and getting an error you notice the top level site collection from the site collection you were trying to restore is deleted.
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
This can happen if you pass an improper URL path with stsadm -o restore with the -overwrite parameter.
Correct - stsadm
Incorrect - stsadm -o restore -url http://SERVERNAME/site/sitename -filename DRIVE:\file.bak -overwrite
Incorrect - stsadm -o restore -url http://SERVERNAME/sites/sitename/web -filename DRIVE:\file.bak -overwrite
When we pass the -overwrite parameter with stsadm it deletes the destionation site collection and 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 collection of the URL.
in example 1 the Missing 's' in the word 'sites' along URL path will cause the root site collection to be deleted.
in example 2 the path is not a site collection and will attempt to restore to the site collection at http://SERVERNAME/sites/sitename
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.
Article ID: 968474 - Last Review: 01/15/2015 11:01:17 - Revision: 5.0
Microsoft Office SharePoint Server 2007, Microsoft Windows SharePoint Services 3.0
- kbnosurvey kbarchive kbrapidpub kbnomt KB968474