Tuesday, June 30, 2009

Backup and Restore Site Collection in MOSS 2007

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.

No comments:

Post a Comment