Backup restore site collection sharepoint

Backup restore site collection sharepoint is the mostly requested task for administrator. As an admin, you should know how to backup sharepoint site collection. When you need to migrate site collection from one environemnt to another environent Example Production to QA mostly, we follow the sharepoint back up restore method. It can be sharepoint content database backup restore method or only backup and restore site using powershell method.

Advertisements

sharepoint backup and restore site collection methods

There are different ways to back up site in sharepoint and restore to different infracture. We can follow content database back up and restore method. Follow the post below on the same.

https://atomic-temporary-119393429.wpcomstaging.com/dismount-mount-content-database-in-sharepoint-2019-using-powershell/

we can follow any one of the backup and restore methods in sharepoint, find below:

  • Backup site collection using central admin.
  • Backup site collection using powershell
  • Restore site collection using powershell
Advertisements

Backup site using central admin

Follow the step by step procedure to back sharepoint site using central admin method below:

  • Open “SharePoint Central Administration”
  • Click on “Backup and Restore” from left navigation.
  • Click on “Perform a site collection backup” present under “Granular Backup”.
  • Select “Site Collection” and enter backup file save path.
  • Select the check box “Overwrite existing file” so as to save and replace the existing file with same name.
  • proceed for click “Start Backup”.
Backup site collection using central admin
Advertisements
  • Backup process will start with message “A site collection backup is currently in progress” under “Granular Backup Job Status” page. You will see page as shown below.
Granular Backup Job Status
Advertisements
  • Click on “Refresh” to check the status in certain interval of time. You will see the completion status once done.
Granular Backup Job Status completed
Advertisements

Backup site using powershell

You can follow powershell command which comes under sharepoint backup and restore best practices. Follow the step by step procedure below:

  • Run “SharePoint 2019 Management Shell” as an Administrator.
  • Run the command “Backup-SPSite” as shown in code below.
Backup-SPSite http://win-q2repghf9du/sites/DevSite -Path "C:\backup\SharePoint\DevSite.bak" -Verbose
Advertisements

Restore site collection using powershell

Follow step by step procedure to restore site using powershell.

Identify the content database and respective DB server in which you are planning to restore by navigating “Manage Content Database -> Select web application -> Click on respective content database”.

attach content databases in web application sharepoint
manage content database settings
Advertisements
  • Run “SharePoint 2019 Management Shell” as an Administrator.
  • Run the command “Restore-SPSite” as shown in code below.
Restore-SPSite -Identity http://win-q2repghf9du:44179/ -Path C:\backup\SharePoint\DevSite.bak -DatabaseServer WIN-Q2REPGHF9DU -DatabaseName WSS_Content_WebApp -Force -Verbose
Advertisements

if you are passing url http://win-q2repghf9du:44179/, restored site collection will be a root site collection, as below.

restored root site collection sharepoint
Advertisements

if you are passing url http://win-q2repghf9du:27315/sites/DevSite, restored site collection will be created with same url, as below. This URL is the new site collection url as restored path.

Restore-SPSite -Identity http://win-q2repghf9du:27315/sites/DevSite -Path C:\backup\SharePoint\DevSite.bak -DatabaseServer WIN-Q2REPGHF9DU -DatabaseName WSS_Content_41dfb81a085a49b781b289e61fc4b037 -Force -Verbose
Advertisements
restore site collection in sharepoint
restoring site collection in sharepoint using powershell

Backup sharepoint online site collection

So as to take backup sharepoint online site collection, you need to contact microsoft support by creating a ticket.

Advertisements
Advertisements

export import list library sites in sharepoint

export import list library sites in sharpoint 2019 is a common task for sharepoint administrator carried out during migration. You will get requests from user to move or copy, sharepoint list, libraries, sites from one site to another site. Site may be present in different web application under different sharepoint environment(PROD, DEV, SIT). Site between different sharepoint versions (SharePoint 2010 to SharePoint 2013 or SharePoint 2013 to SharePoint 2016 or SharePoint 2019).

Advertisements

You can migrate contents from one site to another site using backup restore site collection method, if size of content is large. We already discussed how to create backup restore request and follow content database detach attach method in previous post as below.

Advertisements

Dismount Mount content database in sharepoint 2019 using powershell“. You can follow this to complete the task.

You can export list library sites to migrate contents only, size of content to be migrate is not so high. Once export is complete, you need to import list library in destination sharepoint site.

You can export import sharepoint list library using powershell or by using granular backup export a site or list method.

Advertisements

follow the command below Export-SPWeb to export sharepoint site collection

Export-SPWeb -Identity "<site collection url>" -Path "saving path"
Export-SPWeb -Identity "http://win-56r9d2tbfob:39760/sites/SharePointTechnicalSupport" -Path "C:\Backup\Site Collection\sitecollectionPS.cmp"
Advertisements

following command will export subsite in sharepoint

Export-SPWeb -Identity "subsite url" -Path "saving path" -verbose
Export-SPWeb -Identity "http://win-56r9d2tbfob:39760/sites/SharePointTechnicalSupport/SubsiteTeams" -Path "C:\Backup\SubsiteSite\SubsitePS.cmp" -verbose
Advertisements

export list in sharepoint following below command

Export-SPWeb -Identity "subsite url" -Path "saving location" -ItemUrl "list path" -IncludeUserSecurity -IncludeVersions All -verbose
Export-SPWeb -Identity "http://win-56r9d2tbfob:39760/sites/SharePointTechnicalSupport/SubsiteTeams" -Path "C:\Backup\List\List.cmp" -ItemUrl "Lists/ContactList" -IncludeUserSecurity -IncludeVersions All -verbose
Advertisements

following command will export library in sharepoint

Export-SPWeb -Identity "subsite url" -Path "saving location" -ItemUrl "library name" -IncludeUserSecurity -IncludeVersions All -verbose
Export-SPWeb -Identity "http://win-56r9d2tbfob:39760/sites/SharePointTechnicalSupport/SubsiteTeams" -Path "C:\Backup\Library\Documents.cmp" -ItemUrl "Shared Documents" -IncludeUserSecurity -IncludeVersions All -verbose
Advertisements

Import list in sharepoint following below command

Import-SpWeb -Identity "site url in which you want to import list" -Path "exported item saved location" -IncludeUserSecurity -UpdateVersions Overwrite -verbose
Import-SpWeb -Identity "http://win-56r9d2tbfob:19919/sites/SPSupport" -Path "C:\Backup\List\List.cmp" -IncludeUserSecurity -UpdateVersions Overwrite -verbose
Advertisements

following command will import library in sharepoint

Import-SpWeb -Identity "site url in which you want to import library" -Path "exported item saved location" -IncludeUserSecurity -UpdateVersions Overwrite -verbose
Import-SpWeb -Identity "http://win-56r9d2tbfob:19919/sites/SPSupport" -Path "C:\Backup\Library\Documents.cmp" -IncludeUserSecurity -UpdateVersions Overwrite -verbose
Advertisements

similarly use follow the command below to Import site in sharepoint

Import-SpWeb -Identity "http://win-56r9d2tbfob:19919/sites/SPSupport" -Path "C:\Backup\SubsiteSite\SubsitePS.cmp" -IncludeUserSecurity -UpdateVersions Overwrite -verbose
Advertisements

watch below video to get more in detail.

Advertisements

Difference between Granular Backup and Farm Backup

Granular Backup:

  • Granular backup is used for backing up a specific sharepoint entity, like a site collection, web or a list.
  • Granular has two main types which are site collections and Web site or list.
  • These backup mainly focuses on single content database.
  • Granular backups are content backups that work on the site collection, website, or list level.

  • These backups can be performed using Central Administration, STSADM, or PowerShell commands.
  • But it is not recommended to run site collection backups if your site collection is larger than
    around 15 GB.

Farm Backup:

  • The Farm Backup alternative is meant to be used in the scenario you describes: When you want to backup everything in the farm in one backup.
  • These are bascially towards web farms and web application levels.
  • These are basically into farm configurations, solution packages, web applications, service applications, whole content databases etc.
  • These backups can be performed using Central Administration, STSADM, or PowerShell commands.