Changing a Site Collection URL SharePoint 2007

1. Backup the content database.
2. Backup the snap if its a virtual machine.
3. Lock the site.
Do not restart the web server after locking site. If you restart the server the site will be locked for everybody. You unlock by using step 7 and then do step 3 again.

At a command prompt on the drive on which SharePoint Products and Technologies is installed, change to the following directory: COMMONPROGRAMFILES%\Microsoft shared\Web server extensions\12\Bin.

To determine the current access level of the site, type the following command, and then press ENTER:

stsadm -o getsitelock -url

where URL name is the URL of the site collection that you want to back up.
If the current access level allows changes to the site content, change it to read-only by typing the following command, and then pressing ENTER:

stsadm -o setsitelock -url -lock readonly

where URL name is the URL of the site collection that you want to back up. For more information, see Setsitelock: Stsadm operation (Office SharePoint Server).
When the backup is complete, use this procedure to return access to the site collection to the original setting determined in step 1.

4. Backup the site collection.
On the drive on which SharePoint Products and Technologies is installed, change to the following directory: %COMMONPROGRAMFILES%\Microsoft shared\Web server extensions\12\Bin. Type the following command:

stsadm -o backup -url -filename [-overwrite]

where URL name is the URL of the site collection that you want to back up, and where \\server name\folder name\file name is the UNC path of the backup folder and the name of the file that you are backing up to. If there is an existing file for the backup, use the -overwrite parameter to overwrite the existing file.

If the backup is completed successfully, the Command Prompt window displays the following text:”Operation completed successfully.”

If the backup is not completed successfully, the Command Prompt window provides additional details about the failure. Most typically, an incorrect URL or file name was given.

5. Delete the site collection.
6. Restore the dat file.
To restore a site collection, type the following command, and then press ENTER:

stsadm -o restore -url -filename

where URL name is the URL of the site collection that you want to restore and UNC path is the UNC path of the backup shared folder.
When you receive a warning that all selected items will be overwritten, type y, and then press ENTER.
When prompted, type the user name and password for the Web application and content databases.

If the recovery is completed successfully, the Command Prompt window displays the following text:”Operation completed successfully.”
If the recovery is not completed successfully, the Command Prompt window provides additional details about the failure. Most typically, an incorrect URL or file name was given

7. Unlock the site.
To determine the current access level of the site, type the following command, and then press ENTER:

stsadm -o getsitelock -url

where URL name is the URL of the site collection that you want to back up. For more information, see Getsitelock: Stsadm operation (Office SharePoint Server).

If the current access level is too restrictive, change it by typing the following command, and then pressing ENTER:

stsadm -o setsitelock -url -lock none

where URL name is the URL of the site collection that you want to back up and Access Level is the site lock setting the site had before being backed up. For more information, see Setsitelock: Stsadm operation (Office SharePoint Server).

Reference:
http://technet.microsoft.com/en-us/library/cc706871.aspx
http://blogs.technet.com/josebda/archive/2006/10/03/Renaming-a-Site-Collection.aspx

Diganta Kumar is an experienced Technical Program Manager with a passion for technology. He has architected and developed software for over a decade for a broad range of industries. Diganta is a founder of two online IT businesses. He likes to help, mentor, and manage software development teams to improve and produce great software. He currently works as a Principal Program Manager for Microsoft. Before joining Microsoft, he was with AWS for five years, where he managed large cross-functional programs on a global scale.

Posted in SharePoint
3 comments on “Changing a Site Collection URL SharePoint 2007
  1. This is the perfect web site for everyone who wants to understand this
    topic. You know a whole lot its almost tough to argue with you (not that I really would want to…HaHa).
    You definitely put a fresh spin on a topic that’s been discussed for decades. Great stuff, just wonderful!

  2. I really like what you guys are up too. Such clever work and exposure!

    Keep up the great works guys I’ve incorporated you guys to my blogroll.

  3. smart card says:

    This site was… how do I say it? Relevant!! Finally I
    have found something which helped me. Kudos!

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: