How to Rename a SharePoint Site with STSADM

Today I woke up and decided that I did not like the URLs that I had given the site collections in the demonstration portals that I referenced in yesterdays post.  Unfortunately, there is no option to right-click and rename a site but the STSADM utility makes the process quite painless.

  1. On the SharePoint server, open a command prompt by selecting Start > Run and typing cmd in the textbox.  Click the OK button.
  2. Navigate to the directory that contains the utility by typing cd %systemdrive%\program files\common files\microsoft shared\web server extensions\12\bin at the command prompt and pressing [Enter].
  3. Now the original site can be backed up by typing stsadm -o backup -url http://server/sites/site1 -overwrite -filename %systemdrive%\backup.dat at the command prompt and pressing [Enter]. Replace server and site1 as appropriate for your environment.
  4. If you are restoring the site to the same virtual server, you must first deleted the original site because the globally-unique identifiers (GUIDs) for SharePoint lists are preserved in the backup file.  The SharePoint content database requires that all list GUIDs be unique.  Delete the original site by typing stsadm -o deletesite -url http://server/sites/site1 at the command prompt and pressing [Enter].   Replace server and site1 as appropriate for your environment.
  5. Now the site can be restored to its new site name by typing stsadm -o restore -url http://server/sites/site2 -filename %systemdrive%\backup.dat at the command prompt and pressing [Enter].  Replace server and site2 as appropriate for your environment.

Now your SharePoint site has been fully restored into a new site collection with a new name!

One Response to How to Rename a SharePoint Site with STSADM

  1. Dennis says:

    How do you use stsadm with authentication when my site requires SSL ?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.