Backup/Restore of SharePoint site Collection using Power Shell

SharePoint 2010, 2013, 2016, 2019 (on premises)

In this article I am showing you how to perform backup/restore operation using Power Shell

1. On the Start menu, click All Programs.

2. Click Microsoft SharePoint Products.

3. Click SharePoint Management Shell.

4. At the Windows Power Shell command prompt type the following command:

. In SharePoint , Power Shell command Backup-SPSite is used for taking backup

7. Please see the screen shot for the backup Power Shell command

8. Backup-SPSite -Identity http://ServerName:port -Path “c:\backup\file.bak”

9. If you want to overwrite a previously used backup file, use the Force parameter. You can use the NoSiteLock parameter to keep the read-only lock from being set on the site collection while it is being backed up. However, using this parameter can allow users to change the site collection while it is being backed up and might lead to possible data corruption during backup.

10. Once this done you will get the backup.

11. Next you have to create site collection then use the below command to restore the backup that we currently taken.

12. Restore-SPSite -Identity http://Servername:port -Path “c:\backup\file.bak” -force



13. force command is used when you want to overwrite the existing site collection that I created now.