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

Managed path in sharepoint web application

Managed path in sharepoint web application used to define or manage path of web application, so as to create sites collection categorically. There are 2 types of managed path “Wildcard Inclusion”,”Explicit Inclusion”. We will discuss once create managed path and site collection. You can understand better once discussed with example.

Advertisements

Explicit Inclusion managed path

Let’s follow the step by step procedure to create explicit Inclusion managed path in sharepoint.

  • Navigate to SharePoint Central Administration. Click on Application management and select Manage Web Applications.
  • Select the web application and click on “Managed Path” from ribbon under Manage Option.
  • Enter Name in place of “Add a New Path” as “IT” and managed path type as “Explicit Inclusion”.
  • Click “Add Path” and click “OK”.
Explicit inclusion managed path
Advertisements
  • Navigate to SharePoint Central Administration. Clcik on Application management and click Create Site Collection.
  • Select the Web Application “http://win-q2repghf9du:27315/“, Enter “Title” of the Site Collection.
  • Under “Web Site Address” you will get drop down option as “IT”, Select that option.
  • Select template as “Team Site”, enter user id in place of “Primary Site Collection Administrator”,”Secondary Site Collection Administrator”, click “OK”.
  • The URL of site collection created will be “http://win-q2repghf9du:27315/IT“.
  • Similarly if you create another Explicit Inclusion managed path as “Finance” then the site collection URL will be “http://win-q2repghf9du:27315/Finance“. So only one site collection can be created under Explicit Inclusion managed path created.
Managed path site collection
Advertisements

Wildcard Inclusion managed path

Now lets discuss step by step procedure to create wildcard Inclusion managed path in sharepoint and create site collection using this path, same way we did before.

  • Select the web application and click on “Managed Path” from ribbon under Manage Option.
  • Enter Name in place of “Add a New Path” as “Engineering” and managed path type as “Wildcard Inclusion”.
  • Click “Add Path” and click “OK”.
Wildcard inclusion managed path
Advertisements
  • Navigate to SharePoint Central Administration. Clcik on Application management and click Create Site Collection.
  • Select the Web Application “http://win-q2repghf9du:27315/“, Enter “Title” of the Site Collection.
  • Under “Web Site Address” you will get drop down option to choose wildcard inclusion path “Engineering”.
  • You will get another option to enter site collection name let’s say “Powerplant”.
  • Select template as “Team Site”, enter user id in place of “Primary Site Collection Administrator”,”Secondary Site Collection Administrator”, click “OK”.The URL of site collection created will be “http://win-q2repghf9du:27315/engineering/Powerplant“.
  • Similarly if you create site collection with this wildcard inclusion managed path with name as “Semiconductor” then the URL of that site collection would be “http://win-q2repghf9du:27315/engineering/Semiconductor“.
Wildcard inclusion site collection
Advertisements

you will notice more then one site collections can be created under the wildcard inclusion managed path “Engineering”. This the difference between wildcard Inclusion and explicit Inclusion managed path.

sharepoint managed paths best practice

sharepoint managed paths best practice is to keep number of managed path less. Higher the number of manged path mean more checking on each http request which will cause performance issue.

Advertisements

sharepoint managed paths limit

sharepoint managed paths limit for path-based site collections set as 20 per web application and for host-named site collections, its 20 per farm.

Advertisements
Advertisements

Anonymous access policy in sharepoint web application

Anonymous access policy in sharepoint web application is created for public facing sites, which can be accessed by users having no permission in the site. Anonymous access permission setting is disabled by default. No prompt for user credentials while accessing these anonymous contents is required.

Actually “IUSR_computername” account is created by IIS for authenticating anonymous users to access the public facing content in sites. We can create anonymous access policy at the web application level so as to restrict/manage permission for anonymous content and their action on it.

Advertisements
  • Since we are going to create a public facing sharepoint site, its always recommended and best practice to extend web application that is going to face external traffic.
  • Navigate to SharePoint Central Administration. Click on Application management and select Manage Web Applications.
  • “Extend Web Application to Another IIS Web Site” dialog box will open, Select “Allow Anonymous” to “Yes”. Click “OK”.
Extend web application to another iis web site
Advertisements
Authentication providers sharepoint web application
Advertisements
  • Click on “Intranet” as we have selected this while extending the web application, you will notice “Enable Anonymous Access” is selected.
Authentication providers extend web application
Advertisements
  • Now select the extended Web Application (http://win-q2repghf9du:27315/) from Web Application Management page and click on “Anonymous Policy”.
  • Select the zone as “Intranet” as anonymous access is enabled for this zone. you can enable for other zones following the previous step. Next select “Anonymous User Policy” that you want to apply let’s say “None”.
Advertisements

There are 3 anonymous user policy level available as below, you can select as per requirement.

  • None: Default permissions to anonymous users will be applied as NT AUTHORITY\Authenticated Users and All Authenticated Users have.
  • Deny Write: Read access to all content for site collections under that web application but no write access.
  • Deny All: No permission to the web application.
Anonymous Policy sharepoint web application
Advertisements
Anonymous access sharepoint site permissions
Advertisements
  • Select types of anonymous access policy that anonymous users can access like “Entire Web Site” or “Lists and Libraries” or “Nothing”. Select “Entire Web Site” so as to give access to all contents in that site. uncheck “Require Use Remote Interfaces Permission”, click “OK”.
Anonymous access entire web site in sharepoint
Advertisements
Anonymous users sharepoint group
  • We can further restrict permissions at the document library level. Navigate to “Document Library”. Click on Library Settings and select “Permissions for this document library” and click on “Stop Inheriting Permissions”.
Advertisements
  • You will get option in ribbon “Anonymous Access” Click on that “Anonymous Access”. Select the permission you want to assign and click “OK”.
stop inheriting permissions sharepoint
Advertisements
edit anonymous access permission in sharepoint
  • Next you can check the Site Collection feature “Limited-access user permission lockdown mode”. It should not be active so as to get access at the Application Page Level.
Limited-access user permission lockdown mode
Advertisements
Advertisements