I have been receiving a few questions about how to rename a WSS site lately, so I thought I would post the solution here so that everyone can benefit from my experience.
The scenario is, we have a top level site collection located at http://server/sites/site1 but we want to rename it to http://server/sites/site2
There are a number of ways to do this, but if you are interested in performing a full rename (making the site identical – same name, same content, etc) you will need to use the STSADM tool.
Steps:
- On your front end web server, open a command prompt.
- Type cd %systemdrive%\program files\common files\microsoft shared\web server extensions\60\bin
- Perform the backup by typing stsadm –o backup –url http://server/sites/site1 -overwrite -filename %systemdrive%\backup.dat
- If you are planning on restoring the site to the same virtual server (the same content database) you will now need to delete the original site. We need to do this due to the following (from the documentation):
About GUIDs and Restoring Site Collections If you attempt to restore a backup of a site collection more than once to the same content database, you may get the following error message: “No content databases are available for restoring this site collection. Create a new content database and then try the restore operation again.” This is because the globally-unique identifiers (GUID) for lists are preserved in the backup file and reused during restore, but the content database requires list GUIDs to be unique. Therefore, you cannot restore a site collection twice to the same content database, and must instead use a different content database.
- Now that we have that sorted out, you can perform this optional step (you would generally want to do this)
- To remove the original site type stsadm –o deletesite –url http://server/sites/site1
- Now we are ready to restore to our new site name, type the following in the command prompt
- stsadm –o restore –url http://server/sites/site2 -filename %systemdrive%\backup.dat
- We have now successfully restored the original site into a new site collection, with a new name
Hope this helps someone else out there.