Sunday, March 08, 2009

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


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

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

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:

This can happen if you pass an improper URL path with stsadm -o restore.

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