Click here to Skip to main content
15,896,415 members
Articles / Productivity Apps and Services / Sharepoint / SharePoint 2013
Tip/Trick

SharePoint Backup and Restore

Rate me:
Please Sign up or sign in to vote.
5.00/5 (2 votes)
22 Dec 2015CPOL5 min read 8.3K   3  
The articles explains in brief about the backup and restore process of SharePoint portals.

Introduction

Backup and Restore is one of most crucial and important parts of an application. Once an application is developed and deployed into the server, it is mandatory to maintain the backups from time to time so that it to be used for things like disaster recovery, rolling back the application to a certain point if any upgrade fails, and so on. In this article we will learn about the backup and restore of SharePoint applications.

SharePoint provides multiple options to achieve backup operations effectively. We can choose any one of the features to perform backup and restore based on our needs. In this article we will go through the available options using which we can perform backup and restore.

Central Administration provides us with two options namely "Farm Backup" and "Granular Backup." Granular Backup allows us to perform backup at list, library, site and site collection level. Granular backup will be very useful when it comes to backup and restore of individual components of a SharePoint Portal. On the other hand, Farm Backup as the name suggests is useful when we want restore complete web applications, which includes all site collections, service applications, and so on.

Granular Backup

Granular backup allows us to perform Site backup, list/library backup and site collection backup. Now in the below activity will look at on how to perform backup and restore of a list in a SharePoint Site.

  1. Navigate any one of the available SharePoint sites. Click on the ribbon and click on "View all Site Contents." In this example we are going to create a sample list to perform backup operations.
  2. Click on Create an App and Choose Custom list from the available templates and click on create and give the name of the list as "Records." Image 1
  3. Now the created list is available in the site contents. We can add a few records to it and the final contents of the list looks like below:

    Image 2
  4. Now go to the central administration website and click on the "Backup and restore" available in the left side navigation. It will redirect to the backups page, where you can find the "Farm Backup and Restore" and "Granular Backup".

    Image 3
  5. Click on "Export a site or list" under "Granular Backup" option and fill the following options in the landing page.
  6. Choose URL of Site Collection from which you want to take the backup of the list, then choose the URL of Site and finally choose the name of the list (in our example, "Records").
  7. Give the path for the backup file followed by the file name with extension with ".cmp"
  8. Choose check box "Export full security" and choose "All Versions" from the dropdown.
  9. The options are shown as below:

    Image 4
  10. Once the backup is performed successfully, we will be able to see the backup file in the specified location as shown below:

    Image 5
  11. Alternatively, we can achieve the above list backup using the following SharePoint powershell command
    Export-SPWeb "http://www.domain.com/" -itemurl "/Lists/test" -path "c:\test.cmp"
  12. Now go to the SharePoint Site and delete one or two records from the list. We can also make sure that we have deleted the reocrds from site recycle and end user recyclic bin as shown below: Image 6
    Image 7
  13. Now click on the "SharePoint 2013 Management Shell," which opens powershell command window where we can run the commands to perform restore from the created backup file.
  14. The following command is used to perform restore of the list to the site.
    Import-SPWeb  "http://win-7neb4ol28vu:15184" -Path "\\win-7neb4ol28vu\D\backup\Records.cmp"
    Image 8
  15. Interestingly, if we observe that after the restore is done our deleted records are added back to the list but with different "ID"s. This is happened because the versioning of the list was not enabled.

    Image 9
    Image 10
    Image 11
  16. Now if perform same procedure with versioning enabled, after once the restore is done with versioning enabled, we can observe that the records are restored with the "ID"s.
  17. There are few other flags that can used with the import command like ‘-Force’ and ‘-UpdateVersions’ which are used to overwrite the list if the list exists and restore the entire version respectively. More information about working with backup and restore commands can be found in TechNet articles.

Farm Backup

Farm backup and restore is straight forward and can be easily done using Central Administration site. Below are the steps which are used to achieve the same:

  1. Go to Central Administration, click on "Backup and Restore" from the left navigation click on the "perform a backup" under "Farm Backup and Restore".
  2. The backup page provides us with the wide range of choices to choose from, components starting with the server side solutions to complete Web Application along with individual Service application proxies.
  3. The below is the snapshot of the same:
  4. Once you’re done with the selection of the required components for the backup, in the next page, we will have the following settings that can be applied:
    1. Backup Type: has to options to choose from "Full" and "Differential".
    2. Backup Configuration settings,
    3. Backup File Location.
  5. After all the settings are done, we can start the backup. The following is the result page of the backup.
  6. Now once backup is done. We can perform the restore using the "Restore from a backup" option.
  7. The below screenshots show the backup and restore procedure screenshots.

Image 12

Image 13

Image 14

Points of Interest

This article is part of series of articles on SharePoint for beginners.

Below are the list of articles on "SharePoint for beginners."

  • SharePoint - Web Application Management
  • SharePoint Lists and Libraries
  • SharePoint Features, Packages and Solutions.
  • SharePoint Backup and Restore

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer Collabera
Singapore Singapore
S V Sai Chandra is a Software Engineer from Hyderabad Deccan. He started Embedded Programing in his college days and now he is a Web Developer by Profession. He Loves coding and his passion has always been towards Microsoft Technologies. Apart from coding his other hobbies include reading books, painting and hang out with friends is his most favorite past time hobby.
He blogs at
http://technowallet.blogspot.com
Technical Skills:
C#,Ado.Net,Asp.Net,Sql Server,JavaScript,XML,Web services.

Comments and Discussions

 
-- There are no messages in this forum --