Pages

Thursday, November 3, 2011

Renaming A Site Collection in Sharepoint (MOSS2007)

Renaming A Site Collection in Sharepoint

Some times we need to rename an existing site collection in our Sharepoint environment under the same Web application. Here is a way I used to rename a site collection under the same Web application on the same virtual server. Here are the Steps:

Backup the Original SiteCollection

Backup the Original Site Collection by command stsadm -o backup -url http://server/sites/originalsite -overwrite -filename %Path%\backup.dat at the command prompt.. Replace server and Originalsite as according to your environment.

Delete the Original SiteCollection

As we are restoring the site to the same virtual server and under the same Web application, we need to delete the original site because the GUIDs of SharePoint sites are stored in the contenet DB and hence are stored in the backup file.  The SharePoint content database requires that all list and siteGUIDs must be unique.  Delete the original site by typing stsadm -o deletesite -url http://server/sites/originalsite.

Restoring the Site Collection with New Name

Now we can restore the backup to it new site name by typing stsadm -o restore -url http://server/sites/newsite -filename %path%\\backup.dat (use -overwrite option too if the new site has already been created on the server) at the command prompt .  Replace server and newsite according to your environment

Nowthe old SharePoint site has been restored on a new site collection with a new name!!!!!!!!!!!!!!!!!!!!!!


Enjoy!!!!!!!!!!!!!!!!!!!