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

Advertisements

Diganta Kumar has architected and developed software for more than a decade for a wide range of industries and development platforms and over the years has filled many roles including program manager, founder, developer, architect, team lead, mentor and project manager. Diganta is founder of two online IT businesses. He is a certified AWS Solutions Architect, certified Professional Scrum Master (PSM I), certified Professional Scrum Developer (PSD I) and ITIL Certified. He has presented at Microsoft Tech.Ed, Microsoft AppFest and Ark Group Intranet conference. He attends AWS Seattle Official Events, Seattle AWS Architects-Engineers, and AWS Cloud Commerce user groups. He likes to help, mentor and manage software development teams to improve and produce great software. He currently work as a Senior Technical Program Manager for Amazon Web Services.

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 )

Google+ photo

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

Connecting to %s