Backup and Restore - SharePoint Farms, Site Collections & Sites

Stsadm can be used to backup/ restore individual aspects of your sharepoint farm.

You can backup the entire sharepoint farm, an individual site collection or even an individual site.

For Backup:

To export sites : Stsadm –o export –url <URL> -filename <FileName>.cmp

To back up a site collection: stsadm –o backup –url <URL of the site collection> -filename <Name of the backup file>

To back up an individual database, Web application, or the entire farm:

stsadm –o backup –directory <UNC path or local drive> -backupmethod <Full or Differential>


To import sites: Stsadm –o import –url <URL> -filename <FileName>.cmp

To restore a site collection: stsadm –o restore –url <URL of the site collection> -filename <Name of the backup file>

To restore an entire farm: stsadm –o restore –directory <UNC path or local drive> -restoremethod <overwrite or new>

If you wanted to restore only a particular item like only the content database, you can do that by using the –item property of the restore operation.

You can also view what will exactly be restored or backed up if you use the –showtree option. This doesn’t execute the command but shows the results as to what would happen if the command was executed.

More help on these commands at : stsadm –help <<operation name>>