Thursday, October 2, 2008

Backup and Restore Site Collection in MOSS

Hi all,
Here are the stsadm commands that will be useful to backup and restore site collections in MOSS.

Backup Site Collection

First go to command prompt and set the following path:
c:\program files\common files\microsoft shared\web server extensions\12\bin

This is the folder in which the stsadm.exe is present.
After setting this path write the following command:

stsadm -o backup -url http://servername:portnumber/sitecollectionName -filename pathofDestinationFolder/NameofBackupFile

You will need proper rights on the content db to take backup

Restore Site Collection

Set the path as shown in the above example.
After setting the path the process is:

I am taking an example of restoring collaboration portal. Before executing the restore command create a web application and create a site collection with collaboration portal as site template. Here is the command:

stsadm -o restore -url http://servername:portnumber/sitecollectionName -filename pathOfBackupFile -overwrite

writing -overwrite is mandatory else it will give error.

Again you will need proper rights on the content db to execute restore command.

Happy Administering!!

No comments:

Share your SharePoint Experiences with us...
As good as the SharePointKings is, we want to make it even better. One of our most valuable sources of input for our Blog Posts comes from ever enthusiastic Visitors/Readers. We welcome every Visitor/Reader to contribute their experiences with SharePoint. It may be in the form of a code stub, snippet, any tips and trick or any crazy thing you have tried with SharePoint.
Send your Articles to with your Profile Summary. We will Post them. The idea is to act as a bridge between you Readers!!!

If anyone would like to have their advertisement posted on this blog, please send us the requirement details to