Back Up and Restore by Using Stsadm


When you back up by using the Stsadm command-line tool, you can back up individual aspects of your SharePoint Products and Technologies deployment. For example, you can back up an individual site collection or you can back up the entire farm.


To export sites from your SharePoint Products and Technologies deployment, you use the following Stsadm command.


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


To back up a site collection, you must use the following stsadm command.


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, you can use the following Stsadm command.


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


 


Restore


To import sites to your SharePoint Products and Technologies deployment, you use the following Stsadm command.


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


To restore a site collection, you must use the following Stsadm command.


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


To restore an entire farm you can use the following Stsadm command.


stsadm –o restore –directory <UNC path or local drive> -restoremethod <overwrite or new>