In this article I have explained how to back up and restore the SharePoint site collection using power shell scripts.
Here are the steps: Open a site where we want to create a backup. Now I am going to backup the site. Open “SharePoint management shell”. Run as elevated privileges. Command: Backup-SPSite -Identity URL -Path “location”. Example: Backup-SPSite -Identity “http://site/test” -Path “c:\backup\test.bak”. So site backup has been taken successfully. Open central administration. Now create a team site to restore the backup. Now we will restore the backup to this site. Command Restore-SPSite -Identity URL -Path “backup file location” -Force. Example: Restore-SPSite -Identity “http://trenmax-sp/sites/test2/” -Path “c:\backup\test.bak” -Force. Type: Yes Select the default is 'Y', so the site has now start restoring. Now the site has been restored successfully into this site. Now refresh the page. It has been restored successfully into test2 site.
Configure MinRole Search and Cloud Hybrid Features in SharePoint Server 2016 and Office 365