Sunday, March 08, 2009

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

Wow....

This bug never happen to me.... but is good to know

http://support.microsoft.com/kb/968474

"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"

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
Post a Comment