Tuesday, January 14, 2014

Backup / Restore SharePoint site collection using PowerShell or STSADM commands


  • Backup Using PowerShell
Backup-SPSite <URL of the site collection (Ex, http://server_name/sites/site_name)> -Path <full path to the backup file (Ex, C:\Backup\site_name.bak)>
  • Backup Using STSADM
stsadm -o backup -url <URL of the site collection (Ex, http://server_name/sites/site_name)> -filename <full path to the backup file (Ex, C:\Backup\site_name.bak)> -overwrite
  • Restore Using PowerShell
Restore-SPSite <URL of the site collection (Ex, http://server_name/sites/site_name)> -Path <full path to the backup file (Ex, C:\Backup\site_name.bak)> -Force 
  • Restore Using STSADM
stsadm -o restore -url <URL of the site collection (Ex, http://server_name/sites/site_name)> -filename <full path to the backup file (Ex, C:\Backup\site_name.bak)> -overwrite

Note: Using of -overwrite or -Force to overwrite an existing backup file or site collection if it already exists.

No comments:

Post a Comment