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

change list url in sharepoint 2019 to create duplicate list

change list url in sharepoint 2019 to create duplicate list is an important task for an administrator. When list view threshold of a list is crossing the limit, user want to create similar list with different name. we can copy list items form one list to another list in this situation. We can follow other ways as well as below.

Advertisements
  • Export list using powershell and import in UAT. Else we can backup content database and restore using powershell in UAT as well.
  • Rename list and change list url in sharepoint using powershell.
  • Export list in UAT using powershell and import list in PROD using powershell. Else you can follow recovering list from unattached content database.
Advertisements

Export list using powershell and import list in SharePoint UAT

Follow the blog post export import list library sites in sharepoint to export list from PROD and import in UAT.

Advertisements

Backup content database in sharepoint and restore using powershell in UAT

Follow the blog post dismount Mount content database in sharepoint 2019 using powershell to do back up and restore content database.

Advertisements

Rename list and change url of list using powershell

Once list is moved to UAT, we can use below powershell for list url change. Modifying title of list using UI method will not update the url, it will remain unchanged, So we have to using powershell method change list address.

List name before rename
list url before change
Advertisements
$liUrlOriginal="/Lists/Budget2020";
$liUrlNew="/Lists/Budget2020Archieved";
$web= Get-SPWeb -Identity http://spmcse-sp19:37985/sites/SPMCSE
$li=$web.GetList($web.Url + $liUrlOriginal)
$rootFolder=$li.RootFolder;
$rootFolder.MoveTo($web.Url + $liUrlNew)
change list url in sharepoint using powershell
list url after change
Advertisements

Export list in sharepoint UAT using powershell and import list in PROD

Follow the blog post export import list library sites in sharepoint to export list from UAT and import in PROD. Else you can follow, list recovery method from unattached content database as described below.

Advertisements

Recover list from an unattached content database in sharepoint 2019

You can follow export import list method as mentioned above or you can use recovering a specific list from unattached content database method.

Advertisements

change sharepoint list url completed. Duplicate list or a similar list with reference to another list in same site is created in production environment. Save list as template including content is one of the solution to create duplicate list but there will be error if the number of items is very high, especially for financial sites, we can follow these process.

Follow the video below, to understand better in video format.

Advertisements

unattached content database recover contents list library

unattached content database – recover contents list library from is required while moving list or library as content migration. You can recover files from content database that is not attached to any web application in sharepoint 2019. Recovering data from content database unattached will restore only specific list library in sharepoint site. Follow the step by step procedure to recover list library from sharepoint content database not attached.

Advertisements
  • Navigate to central admin in sharepoint 2019.
  • Select “Backup and Restore” from left navigation and click on “Recover data from an unattached content database” present under “Granular backup”.
recover contents list library from unattached content database
Advertisements
  • Select “Database Server”.
  • Select “Database Name” which is unattached to any web application.
  • select the radio button “Export site or list”, if you want to export list or library from unattached content database.
  • Choose radio button “Backup site collection” to export site collection from content database unattached.
recover files from content database that is not attached
Advertisements
  • Select site collection present in the unattached content database.
  • choose site from the site collection selected above.
  • Select list or library that you want to recover or restore.
select site list library in sharepoint from contact database unattached
Advertisements

After that, follow the same procedure described in previous post “export import list library sites in sharepoint” to import list or library described once export is completed.

Import-SpWeb -Identity "site url in which you want to import list" -Path "exported item saved location" -IncludeUserSecurity -UpdateVersions Overwrite -verbose

Import-SpWeb -Identity "site url in which you want to import library" -Path "exported item saved location" -IncludeUserSecurity -UpdateVersions Overwrite -verbose
Advertisements

watch the video to get in detail step by step

Advertisements
Advertisements