How to Back Up and Restore SharePoint Data

Read this article to find out how to restore SharePoint data from backup or data file. What files SharePoint uses to store data and how to back up them. Backing up SharePoint environment is no minor task. With a serious approach in mind, it is a must to have a data backup plan and recovery options.

How to Back Up and Restore SharePoint Data

Recovering SharePoint: «When» instead of «If»

It’s going to happen one day, want it or not. That is why you should be ready to recover SharePoint data from a backup. Even if nothing disappeared or was removed incidentally before, it’s better to be prepared for possible problems and try some recovery options before the black Monday comes. After all, if the recovery methods you already know don’t work properly or as expected, how are you going to save your data, then? It is always best to practice in restoring data from a backup copy to be well-informed when things come from bad to worse.

Different options to back up data

Various approaches to create a backup of the same SharePoint data can be applied. Sometimes, all you need is to back up a list, library or website. In other cases, you need a comprehensive approach which includes backing up farm configuration, applications, services and content spread over several websites.

Yet before users start looking for help in recovering a file or accidentally deleted list, it would be great for them to try doing it on their own.

Backup and restore options in SharePoint

Using two features in SharePoint lets you avoid the trouble related to loss of data without calling an IT expert. It may not always be possible to restore a farm, but these methods are definitely worth your attention.

Recycle Bin

It’s for cases like this that SharePoint has an element called Recycle Bin which is enabled by default. Just make sure it is configured the way you need. For example, how long the deleted data should stay in the Recycle Bin (the default time period is 30 days).

SharePoint Recycle Bin has two stages: first stage and second stage. All SharePoint items that you delete are sent to the “end user” Recycle Bin, and can be recovered from there. When an item is removed from the first stage, it goes to the Site Collection Recycle Bin.

Manage versions for lists and libraries

List and library version management is one more way that lets you recover important data. Version History saves copies of documents and lists every time that changes are saved. It doesn’t save whole documents but only changes made to them, in order to prevent databases from growing too much in size.

Restoring a previous version of a file is quite easy. Such previous versions can be viewed and restored if necessary.

SharePoint backup and restore options for administrators

Using Version History and Recycle Bin allows you to restore a lot of data with minimal effort, and this is the indisputable advantage of these features. However, it doesn’t mean that using only those two can secure you against data loss in case with SharePoint. Version History and Recycle Bin have many limitations in SharePoint, and they could be overcome if you use data backup options.

Back up websites, lists and libraries

With the help of PowerShell or Central Administration, you can back up all your websites (which make up sites collections), lists and libraries.

You can back up a website by following the link «Backup and restore» in Central Administration, from the quick access panel of the Central Administration home page. In the page «Backup and restore», follow the link «Export a site or list» in the section «Granular backup».

If you use PowerShell, it can be done with the command Export-SPWeb from the PowerShell command line. Here is the easiest example using the values – Identity (web for export) and -Path (path to the file):

Export-SPWeb -Identity <SiteURL> -Path <Path and File Name> [-ItemUrl <URL of Site, List, or Library>]

Where

  • <SiteURL> — is the URL address of the website, list or library being exported.
  • <Path and FileName> — is the path and name of the list or library file that has to be exported.
  • <URL of Site, List, or Library> — is the URL address of the destination for the website, list or library being exported.

Also, you can back up a site collection with the command Backup-SPSite, using the same values – Identity –Path.

How to save content and farm configuration data

Doing it suggests a large amount of work to be done. You need to save farm configuration data before any changes are made, and do it on a regular basis. Also, database content should be backed up.

Backup and restore content databases

Content databases include several websites, lists, sites collections, and sometimes web applications. Over time, content databases may grow too big, so it is worth creating a backup copy to a location which is different from that of the farm. It will give you a chance to restore all data in case of a failure, and save it to a SQL server under a new name as a separate content database. It’s a good idea to practice this approach before you really need it in case of emergency.

Back up service applications

Service applications contain a significant part of important farm data. That is why it is recommended to back up the entire farm regularly, but certain regulations of a company or IT department may require to back up a specific service application.

To back up a service application, you can use the command Backup-SPFarm. If you need to back up a specific service application, then add the value denoting the path –Item.

Backup-SPFarm -Directory <BackupFolder> -BackupMethod {Full | Differential} -Item <ServiceApplicationName>

Where

  • <BackupFolder> is the path to the folder on a local computer or network where backup copies are to be stored.
  • <ServiceApplicationName> is the name of the service application that is to be backed up.

You can learn the path to a specific application with the following Windows PowerShell command, Backup-SPFarm –ShowTree.

Farm configurations backup

You can back up farm configurations with the command Backup-SPFarm. Only that the Item value is omitted.

Now you know a bit about backing up data in SharePoint. The working day of a system’s end users often depends largely on the success in fixing even a minor bug, to say nothing of complete recovery of your database, and on whether you backed up the data or how successful was you attempt to recover it.

SharePoint files and folders

SharePoint stores all data and most configuration files in SQL Server data bases, or *.MDF files (talking of SQL Server database files and possible ways of recovering them, here is a good article to read). However, some configuration files and data files are stored in the installation folder for SharePoint, which is known as Hive Directory (Hive Folder) and is located by default in

C:\Program Files\Common Files\Microsoft Shared\web server extensions\16

The tool recovers data from any devices, regardless of the cause of data loss.

If you need to recover SharePoint files, this can be done with the help of Hetman Partition Recovery.

Vladimir Artiukh

Author: Vladimir Artiukh, Technical Writer

Vladimir Artiukh is a technical writer for Hetman Software, as well as the voice and face of their English-speaking YouTube channel, Hetman Software: Data Recovery for Windows. He handles tutorials, how-tos, and detailed reviews on how the company’s tools work with all kinds of data storage devices. Read more

Recommended For You