Sign In

Backup and Restore a Site Collection

Saru Ponnusamy Senior SharePoint Consultant
Jul 13, 2009

At times, we need to just back up a site collection from one Farm or a Web application and restore it to a new Farm or a Web application. In order to do this, we can use the stsadm commands as shown. Follow these steps outlined below to complete the task:

stsadm -o backup -url [Source_SiteCollection_Url] -filename [Your_SiteCollection_Backup_file]

stsadm -o restore -url [Destination_SiteCollection_Url] -filename [Your_SiteCollection_Backup_file] -overwrite

where Your_SiteCollection_Url is the url of the site collection and Your_SiteCollection_Backup_file is the name of the backup file.

P.S: If you got the message 'No content databases are available for this operation' it means the site collection with the same ID is already present in the destination content db.

To overcome this, you can:

  • attach a new content db to the web application and try again. Site Collection will be restored to this content db automatically
  • change the destination web application to another one
  • delete the site collection with existing ID on destination web application.

Note: The -overwrite option would overwrite the existing site collection. You might want to backup the existing site collection just in case.


WebKMS Consultants Diary

On this Consultants Diary column, we share some of the problems we faced and how we solved for the benefit of our readers. We hope you find this real-world solutions useful and appreciate your interest and valuable feedback.

We update this column frequently, and encourage you to come back as often as you can.

We would also be glad to welcome if you have any specific request and we will try our best to post a solution on this column.

Doc collaboration Enterprise Intranet