fbpx

March 15, 2011

Backup/restore SharePoint site collection using PowerShell

Backup/restore SharePoint site collection using PowerShell

You can quickly perform site collection backup and restore using PowerShell commands. It is powerful and quick.

Back up a site collection using PowerShell

1.      Make sure that the user has rights to perform backup.

2.      On the “Start” click “All Programs.”

3.      Now click on “Microsoft SharePoint 2010 products”.

4.      Click on “SharePoint 2010 Management Shell”

5.      The PowerShell command prompt will be appear , now type the following

Backup-SPSite -Identity <Name on site collection> -Path <backup file path> [-Force] [-NoSiteLock] [-UseSqlSnapshot] [-Verbose]

If you want to overwrite the previous backup, please use force.

 

Restore a site collection using PowerShell

1.      Make sure that the user has rights to perform backup.

2.      On the “Start” click “All Programs.”

3.      Now click on “Microsoft SharePoint 2010 products”.

4.      Click on “SharePoint 2010 Management Shell”

5.      The PowerShell command prompt will be appear , now type the following

Restore-SPSite -Identity <The site collection URL> -Path <Backup file> [-DatabaseServer <Name of Database server>] [-DatabaseName <The content database name>] [-HostHeader <The Host header>] [-Force] [-GradualDelete] [-Verbose]

If you want to overwrite the existing site collection, please use force.

  • Related Tags:

(3) Comments

Leave a comment