Chapter 10. Backing Up and Restoring a SharePoint Environment

A SharePoint document management and collaboration environment is a critical component, on par with mail in terms of criticality for many organizations. The ability to perform comprehensive backup and restore of a SharePoint 2013 environment is subsequently a critical requirement as part of an enterprise disaster recovery strategy.

SharePoint 2013 includes a wide variety of tools that provide for backup and restore, which can sometimes be confusing. These tools are powerful, but in many cases overlap, and it is not immediately obvious how to use them.

This chapter focuses on the built-in tools provided for backup and restore of a SharePoint 2013 environment. Specific guidance around usage of these tools is given, and recommended backup routines are provided.

Backing Up and Recovering SharePoint Components

Backup options in SharePoint 2013 have been scoped across wider areas in comparison to SharePoint 2010 RTM (release to manufacturing). SharePoint 2013 administrators have an array of options to choose from and combine, per best practices outlined in this chapter, to back up and restore SharePoint 2013 content.

In comparison to earlier versions, SharePoint 2013 administrators can now back up the farm configuration, complete farm and site collection only, do a granular level of backup and restore, and connect to an unattached content database and restore content from it. In addition to this, SharePoint 2013 administrators can now restore a site from the Recycle Bin and site collection using Windows PowerShell.

The tools covered in this chapter for backup and restore are the following:

Image Recycle Bin: This tool has been very popular since it was introduced in SharePoint 2007, and is widely used by end users and SharePoint administrators. Because the data can be restored by the end user within 30 days of deletion and thereafter by the site collection administrators, it has led to reduced IT overheads in data restoration.

Image Central Administration: The Central Administration graphical user interface (GUI) is one of the tools that can be used to back up and restore the SharePoint environment. However, not all backup and restore options are available when using the Central Administration site.

Image SharePoint 2013 Management Shell: The SharePoint Management Shell, introduced in the SharePoint 2010 version, now leverages on Windows PowerShell 3.0. Windows PowerShell is a command-line tool that SharePoint administrators can use to administer the SharePoint environment. Windows PowerShell provides additional options for the SharePoint administrators that are not available to execute using the Central Administration GUI.

Image STSADM: STSADM is still available in SharePoint 2013; it remains deprecated and is provided only to support backward compatibility. SharePoint 2013 Management Shell remains a preferred option for managing the SharePoint 2013 environment. In certain situations, SharePoint 2013 Management Shell is the only option to administer SharePoint 2013 environment.

Image Internet Information Services (IIS) backup: IIS 7 configuration on Windows Server 2008 can now be backed up using the appcmd executable file. The IIS 7 configuration file is composed of web.config files and applicationHost.config files. In a situation in which a system failure occurs, systems administrators can restore the IIS 7 configuration from the backup file.

Image Structured Query Language (SQL) backup: SharePoint configuration and content databases stored in SQL Server can be backed up using built-in backup functionality, either by the database administrator’s initiating this as a one-time task or scheduling tasks to do a full backup. SQL database backup can be combined with other SharePoint backup options, such as Central Administration or SharePoint 2013 Management Shell. Unlike SharePoint restore procedures, SQL restore procedures cannot restore item-level objects, only complete database restores.

Image Microsoft System Center 2012 Data Protection Manager (DPM) 2010: DPM 2010 is Microsoft’s enterprise backup tool. DPM does snapshot-level backup and restore of SharePoint content, providing for full farm or individual item-level recovery. DPM is a separate component and is not included with SharePoint 2013.

Image Third-party backup tools: Vendors such as Quest, Idera, and AvePoint already have backup tools for SharePoint 2010 that facilitate item-level restores. These vendors are currently working on releasing backup tools for SharePoint 2013.

Using the Recycle Bin for Recovery

Recycle Bin introduced in SharePoint 2007 is available in SharePoint 2013 with significant improvements since SharePoint 2010 RTM. This functionality is the first line of defense for restores, enabling end users and administrators to restore deleted items and deleted sites easily and reduce overheads associated with restore operations and loss of productivity.

Understanding the Two Stages of the Recycle Bin

The Recycle Bin in SharePoint 2013 retains the two-stage functionality, but with an added level of functionality: restoring deleted sites, which was introduced in Service Pack (SP) 1 for SharePoint 2010.

When an item is deleted, it goes through both Recycle Bins before being deleted completely from the database.

The first Recycle Bin, shown in Figure 10.1, is at the site level. This Recycle Bin is available and managed by the users of the site.

Image

FIGURE 10.1 Viewing a team site first-stage Recycle Bin.

To restore deleted items from the Recycle Bin, the user needs to click the Site Content link in the quick launch (left-side navigation in the SharePoint team site), and then click the Recycle Bin link on the right side of the page, select the deleted items to restore, and click Restore Selection. This restores the deleted items to the original location.


Note

Users see only the items that have been deleted by them. They do not see items that other users have deleted.


If the users have not restored the deleted items from the site Recycle Bin within the retention period (default is 30 days), or have deleted the items from the Recycle Bin, the items are moved to the secondary Recycle Bin. This Recycle Bin is at the site collection level, and only site collection administrators have access to this Recycle Bin to restore items and deleted sites for the end users, as shown in Figure 10.2.

Image

FIGURE 10.2 Viewing a site collection second-stage Recycle Bin.

Enabling Recycle Bin Functionality in SharePoint

To access the Recycle Bin settings for a particular web application, follow these steps:

1. Open the SharePoint 2013 Central Administration site.

2. Select Application Management in Quick Launch.

3. Under Web Applications, click the Manage Web Applications link.

4. Highlight the web application that you want to manage.

5. The ribbon is highlighted.

6. Click General Settings and select General Settings from the drop-down menu.

7. Scroll down to the Recycle Bin options, modify the settings, and click OK to save these changes.

The Recycle Bin settings listed, shown in Figure 10.3, provide the following options:

Image Recycle Bin Status: This setting enables the entire web application Recycle Bin, including both stages, to be toggled on or off.

Image Delete Items in the Recycle Bin: This option sets the number of days before items are removed from the end-user Recycle Bin. The default value is 30 days. This setting can be altered with a number of days of your choice, or it can be toggled to never delete items from the Recycle Bin.

Image Second-Stage Recycle Bin: The Site Collection Recycle Bin, also known as the second-stage Recycle Bin, can be either turned off or configured to be emptied after it reaches the specified percentage of the web application’s quota. For example, if the web application has a quota of 500MB, a setting of 50% enables up to 250MB of data to be stored in the second-stage Recycle Bin, increasing the effective quota of the web application to 750MB. This setting can be changed to a different number up to 100% or can be toggled off.

Image

FIGURE 10.3 Recycle Bin settings for a web application.


Caution

These settings should be altered only after analyzing the usage pattern of the Recycle Bin at the site level, the number of requests received for second-stage Recycle Bin restore, and the type of restore requests received by the SharePoint administrators. Items retained in the site Recycle Bin count toward the quota of a site collection, so this setting has to strike a balance between the number of days and the site collection quota. Similarly, settings of 100% for the second-stage Recycle Bin would mean that the size of site collection would be twice as much in the content databases.


Site restoration, introduced in SP 1 for SharePoint 2010, has proven valuable not only for SharePoint administrators but also for users. The Recycle Bin helps reduce SharePoint restore operations, helps to improve business continuity, and reduces overall IT overhead. Users should be trained in the use of the Recycle Bin.

Using SharePoint Central Administration for Backup and Restore

The SharePoint 2013 Central Administration Backup and Restore page introduced in SharePoint 2010 remains unchanged in SharePoint 2013. The Backup and Restore page has two options for backup and restore:

Image Farm Backup and Restore

Image Granular Backup

Using the Farm Backup and Restore option, SharePoint administrators can back up the following:

Image Complete Farm

Image Farm Configuration Only

Image Individual Components in a Farm

The Granular Backup and Restore section enables SharePoint administrators to do the following:

Image Back Up Site Collection

Image Export Site or List

Ideally, the SharePoint Central Administration tool would be used to do a one-time backup or restore operation. As with earlier versions, scheduling backups via the SharePoint 2013 Central Administration tool is not an option from within the GUI.

Back Up Using Central Administration

Before backing up using the SharePoint Central Administration tool, the backup location needs to be configured. The backup location can be a local drive on the server or a network share.

Farm Configuration Backup

To back up farm configuration using the SharePoint Central Administration tool, follow these steps:

1. Open the SharePoint Central Administration site on a SharePoint server (Start, All Programs, Microsoft SharePoint 2013 Products, SharePoint 2013 Central Administration).

2. Select Backup and Restore in quick launch.

3. Under the Farm Backup and Restore section, select Perform a Backup.

4. From the Select Component to Backup page, select the Farm component, as shown in Figure 10.4.

Image

FIGURE 10.4 Backing up a farm from the Central Administration tool.

5. Click Next at the bottom of the page.

6. In the Select Backup Options page, select Full Backup, as shown in Figure 10.5. (When performing a backup of the component for the first time, Differential Backup should not be selected because the backup operation will fail.)

Image

FIGURE 10.5 Choosing backup options in the Central Administration tool.

7. In the next section, on the same page, select Back Up Only Configuration Settings, and then click Next.

8. In the next section, on the same page, enter a backup location and click Start Backup.

After starting the backup, SharePoint 2013 displays the Backup and Restore Job Status page. It might take several minutes for the backup process to appear on the page, depending on the backup type and the data to back up. On this page, you can monitor the backup and restore progress by clicking the View History link, View the Backup, and Restore History.

Backup files can be viewed in the Backup location selected earlier and appear as an Extensible Markup Language (XML) manifest file, as shown in Figure 10.6, and as a folder full of .bak files, as shown in Figure 10.7. You should not delete the XML manifest file in the root; it is required to restore your backup components.

Image

FIGURE 10.6 Examining a SharePoint backup manifest file.

Image

FIGURE 10.7 Viewing a site backup file location.


Note

When doing configuration backup, service application settings, including service proxies, are not included in the backup.


Performing Granular Backup Using the SharePoint Central Administration

Granular backup of SharePoint 2013, previously available only from the STSADM command-line tool, is available from within the GUI.

Backing Up a Site Collection

To back up a site collection using the SharePoint Central Administration tool, follow these steps:

1. Open the SharePoint Central Administration site on a SharePoint server (Start, All Programs, Microsoft SharePoint 2013 Products, SharePoint 2013 Central Administration).

2. Select Backup and Restore in quick launch.

3. Select Perform a Site Collection Backup, under the Granular Backup section.

4. On the Site Collection Backup page, select a site collection to back up from the drop-down menu, as shown in Figure 10.8.

Image

FIGURE 10.8 Performing a granular SharePoint site backup.

5. Enter the backup location and the filename ending with extension .bak in the Filename box. Select Overwrite Existing File if you want to overwrite, and then click Start Backup.

After starting the backup, SharePoint 2013 displays the Granular Backup Job Status page. On this page, you can monitor the granular backup progress; it also displays site collection backup status and content export status (discussed later in this chapter).

Unlike the farm backup and restore operation, a detailed history of the granular backup operations cannot be viewed. In addition, a backup of the site collection done using SharePoint Central Administration cannot be restored via the SharePoint Central Administration GUI. You can restore this backup only using Windows PowerShell commandlet (cmdlet) Restore-SPSite, which is covered later in this chapter.

This method is recommended when a one-time backup of a site collection is required, perhaps because the site collection content needs to be archived or because the site collection needs to move so that it is under a different web application.


Note

Granular backup and export is a processor-intensive function in comparison to a farm backup operation.


Export a Site or List Using the Central Admin Console

To export a site or a list using the SharePoint Central Administration, follow these steps:

1. Open the SharePoint Central Administration site on a SharePoint server (Start, All Programs, Microsoft SharePoint 2013 Products, SharePoint 2013 Central Administration).

2. Select Backup and Restore in quick launch.

3. Select Export a Site or List, under Granular Backup section.

4. On the Site or List Export page, select a site collection, select the site, and then select the list to export from the drop-down menu, as shown in Figure 10.9.

Image

FIGURE 10.9 Exporting a list using Central Admin backup.

5. Enter a backup location and the filename ending with extension .cmp in the Filename box. Select Overwrite Existing Files if you want to overwrite.

6. The next toggle gives an option to export full security, including author, editors, created by times, and modified times. If the selection is not at the list level but at the site level (that is, exporting a site), then Export Full Security will include all users in the site. Select this option if required.

7. The next drop-down menu gives options to export the version history for files and list items. The options are All Versions, Last Major, Current Version, and Minor Versions. Select the desired choice from the drop-down menu, as shown in Figure 10.9, and then click Start Export.

After starting the export, SharePoint 2013 displays the Granular Backup Job Status page. On this page, you can monitor the granular backup progress; the page also displays the content export and site collection backup status (discussed earlier in this chapter).

Unlike the farm backup and restore operation, a detailed history of the granular backup operations cannot be viewed. In addition, content export done using SharePoint Central Administration cannot be imported via the SharePoint Central Administration GUI. The import operation can be done only using Windows PowerShell cmdlet Import-SPWeb, which is covered later in this chapter.

This method is recommended for when a site needs to be moved to a different site collection or (as is more common) when moving a SharePoint list to a different site.

Restoring SharePoint Using SharePoint Central Administration

Backups done using the Central Administration tool generate the XML manifest file and files with .bak extensions. In case of a restore situation, both XML manifest files and files with .bak extensions are required. SharePoint administrators can restore these backups to the same environment or to an entirely new environment (for example, a User Acceptance Test [UAT] environment or a development environment).

Similarly, in case of a catastrophic failure of hardware or of the entire farm, SharePoint administrators can rebuild the environment and then restore the SharePoint 2013 farm.


Note

Only site collections can be recovered from a site collection backup.


Restore Farm Configuration Using Central Administration

To restore farm configuration and other components using SharePoint Central Administration, follow these steps:

1. Open the SharePoint Central Administration site on a SharePoint server (Start, All Programs, Microsoft SharePoint 2013 Products, SharePoint 2013 Central Administration).

2. Select Backup and Restore in quick launch.

3. Under the Farm Backup and Restore section, select Restore from a Backup.

4. On the Backup and Restore History page, enter the backup directory location.

5. Select the farm component that you want to restore, as shown in Figure 10.10, and click Next.

Image

FIGURE 10.10 Restoring a SharePoint farm using SharePoint Central Administration.

6. It takes a few minutes before the Select Component to Restore page displays. On this page, select the SharePoint component to restore, as shown in Figure 10.11, and then click Next.

Image

FIGURE 10.11 Selecting components to restore.

7. On the Select Restore Options page, select New Configuration to restore a farm with different computer names, web application names, or database servers, or select Same Configuration to restore a farm with the same computer names, web application names, and database servers, as shown in Figure 10.12. Click Start Restore to begin the restore process.

Image

FIGURE 10.12 Finalizing settings for a farm restore.

Recovering Data from an Unattached Content Database

SharePoint 2013 retains the capability to restore content from an unattached content database that was introduced in SharePoint 2010. The content database does not need to be “attached” to a SharePoint farm but does need to be attached to an SQL Server. To recover data from an unattached content database, follow these steps:

1. Open the SharePoint Central Administration site on a SharePoint server (Start, All Programs, Microsoft SharePoint 2013 Products, SharePoint 2013 Central Administration).

2. Select Backup and Restore in quick launch.

3. Under the Granular Backup section, select Recover Data from an Unattached Content Database.

4. On the Unattached Content Database Data Recovery page, enter the name of the database server, and then enter the database name to connect to. If you use SQL authentication, provide credentials and select the operation to perform (Browse Content, Backup Site Collection, or Export Site or List) to select a site collection, as shown in Figure 10.13.

Image

FIGURE 10.13 Recovering data from an unattached content database.

5. On the Browse Content page, select the site collection from the drop-down menu. On the site collection dialog page, check the name of the content database, and then select the site collection to back up from the unattached content database. Click OK to return to the Browse Content page.

6. The Browse Content page looks like Figure 10.14. Select Backup Site Collection operation and click next.

Image

FIGURE 10.14 Browsing for content to restore in an unattached content database.

7. On the Site Collection Backup page, enter the backup location, and then enter the filename (using a .bak extension) in the Filename box. Select Overwrite Existing File if you want to overwrite, and then click Start Backup, as shown in Figure 10.15.

Image

FIGURE 10.15 Extracting content from an unattached content database by backing it up.

After starting the backup, SharePoint 2013 displays the Granular Backup Job Status page. On this page, you can monitor the granular backup progress; the page also displays site collection backup status.

This method is recommended when a site collection or a list needs to be retrieved from a content database not attached to a SharePoint web application but to an SQL Server instance.


Note

Unattached databases include read-only content databases and SQL Server database snapshots of content databases.


Site collections, sites, lists, and libraries can be restored from an unattached database.

Using SharePoint 2013 Management PowerShell for Backup and Restore

SharePoint 2013 Management Shell, built on Windows PowerShell v3, is installed with SharePoint Foundation 2013 and SharePoint Server 2013. Although the STSADM command is available with SharePoint 2013, it has been deprecated to provide backward compatibility with earlier versions. SharePoint 2013 administrators have been armed with a powerful management shell to administer SharePoint 2013 environments. SharePoint 2013 Management Shell is much more powerful than SharePoint Central Administration and STSADM combined. SharePoint Central Administration is limited in functionality to what is represented in the GUI, whereas SharePoint 2013 Management Shell is highly extensible, with more than 800 prebuilt cmdlets available (in addition to support for creating custom cmdlets).


Note

Sample backup and restore scripts are included in Chapter 7, “Leveraging PowerShell for Command-Line SharePoint Administration and Automation.”


Backing Up the Farm Configuration Using PowerShell

To back up farm configuration using the SharePoint 2013 Management Shell, execute the following command from within the PowerShell shell, as shown in Figure 10.16:

Backup-SPFarm –BackupMethod Full –Directory \srv03ackup  -ConfigurationOnly

Image

FIGURE 10.16 Backing up the farm using PowerShell.

Backing Up an Entire Web Application

To back up a single web application using the SharePoint 2013 Management Shell, execute the following command, as shown in Figure 10.17:

Backup-SPFarm –BackupMethod Full –Directory \srv03ackup -Item <web application
name>

Image

FIGURE 10.17 Backing up a web application using PowerShell.


Note

<web application name> is the name of the web application to be backed up using the Full method. If the web application is being backed up for the first time, it has to be full backup; otherwise, the backup will fail if it is a first-time differential backup.


The advantage of using Windows PowerShell is in executing multiple instances of Windows PowerShell scripts to back up site collections using the BackUpThreads parameter in backup-spfarm. The recommended value for SharePoint is three threads.

Restoring a Site Collection from Backup

To restore a single site collection using the SharePoint 2013 Management Shell, execute the following command, as shown in Figure 10.18:

Restore-SPSite –Identity http://intranet2013.justsharepoint.local/bu/it -Path \
srv03ackupIT.bak –force

Image

FIGURE 10.18 Restoring a site collection using PowerShell.


Note

We have used force to overwrite the site collection in the web application.


Restoring a Site Collection from the Recycle Bin

This feature was introduced in SP 1 of SharePoint 2010 and is available in SharePoint 2013. The deleted site collection can be restored from the secondary-stage Recycle Bin using the SharePoint 2013 Management Shell. You cannot restore a deleted site collection from the SharePoint 2013 GUI.

To restore a site collection from the Recycle Bin using the SharePoint 2013 Management Shell, execute the following command from within the PowerShell shell, as shown in Figure 10.19:

Get-SPDeletedSite

Image

FIGURE 10.19 Restoring a deleted site collection from Recycle Bin.


Note

Identity GUID (globally unique identifier) of the Site Collection - SiteID must be noted for the next command:

Restore-SPDeletedSite -Identity <siteid guid>


Import Site or List

To import a list within a site using the SharePoint 2013 Management Shell, execute the following command from within the PowerShell shell:

Import-SPWeb –Identity http://intranet2013.justsharepoint.local/bu/it/Announcements/
-Path \srv03BackupITAnnouncements.cmp –IncludeUserSecurity

Figure 10.20 shows the syntax for the Import-SPWeb command.

Image

FIGURE 10.20 Examining the syntax for the Import-SPWeb cmdlet.

Importing a Site

Before you can import your web, you need to create the site. To create a site using the SharePoint 2013 Management Shell, execute the following command from within the PowerShell shell:

New-SPWeb –URL http://intranet2013.justsharepoint.local/bu/it/blog/ -Verbose

The Verbose parameter has been used to see how this cmdlet executes and creates a new site, as shown in Figure 10.21. After the site has been created, it can be overwritten with the backup as described next.

Image

FIGURE 10.21 Creating a new site using the New-SPWeb cmdlet.

To import a site using the SharePoint 2013 Management Shell, execute the following command, as shown in Figure 10.22:

Import-SPWeb –Identity http://intranet2013.justsharepoint.local/bu/it/blog -Path
\srv03ackupitblogposts.cmp –IncludeUserSecurity –UpdateVersions Overwrite

Image

FIGURE 10.22 Importing a site using PowerShell.

With SharePoint 2013, backup and restore of site collections, sites, or lists can now be easily done with the Central Administration tool or SharePoint 2013 Management Shell. This functionality was removed from SharePoint Designer 2010 and is also not available in SharePoint Designer 2013.

Backing Up Internet Information Services v7 Configuration

You can use the appcmd.exe executable to back up IIS configuration in Windows 2008 R2; none of the other methods previously discussed enable you to do this.

The IIS 7 configuration is split between the web.config files and the applicationHost.config files. The applicationHost.config files include configuration information for the sites, applications, virtual directories, application pool definitions, and the default configuration settings for all sites on the web server.

To back up the IIS 7 configuration from a command prompt, follow these steps:

1. Log in to the Windows Server 2008 R2 computer with an account that has administrator rights.

2. Open a command prompt by using the Run as Administrator option and change the directory to %windir%system32inetsrv.

3. At the command prompt, type appcmd add backup <backupname>. If you do not include the name of the backup, the system will name it for you by using a date, time format.

SQL Backup Tools

Fully loaded and deployed with Office Web Application Server 2013, all SharePoint 2013 Server service applications, the logging database, content databases, and configuration databases, SharePoint 2013 will have approximately 25 databases stored in SQL Server 2008 R2 SP1. That is a huge number of databases to maintain, and there is certainly a lot of content in these databases! To minimize the loss of content, it is crucial to incorporate a solid SQL database backup plan to back up all these databases.

Many options are available to back up SharePoint databases in SQL Server. In addition to Central Administration and SharePoint 2013 Management Shell, SQL Server facilitates the backup and restore of SharePoint 2013 databases with the SQL Server Management Studio, SQL Server Maintenance Plans, or Transact-SQL scripts that can be executed from within SQL Server. Further, you can use a third-party SQL backup engine to back up these SharePoint 2013 databases.

The backup options out-of-the-box in SharePoint give an array of tools to back up the configuration and the content databases, but critical SQL Server databases such as Master, MSDB, and TempDB cannot be backed up by these tools from within SharePoint. If a catastrophic event or hardware failure occurs, restoring the full SQL Server installation to the point of failure is not possible unless there is a strategic plan to do a backup and recovery of SQL Server databases.

In addition to the standard backup features in SQL Server 2008 R2 SP1, backup compression has been introduced.

SQL Server Backup Methods

SQL Server offers a wide range of options to back up databases, including the following:

Image Full: Complete database backup that includes transaction logs.

Image Differential: All data changes since the last full backup are backed up.

Image Transaction Log Backup: All transactions performed against the database since the last full backup or transaction log backup are backed up.

Image File and File Group Backup: A portion of the database is backed up.

Image Partial Backup: All data in the primary group, every read-write file group, and any specified files are backed up. File groups marked read-only are skipped.

Image Differential Partial Backup: Although similar to partial backup, this backup records only changes to the data in the file groups since the previous partial backup.

Image Copy-Only Backup: This backup enables a backup of any type to be taken without affecting any other backups. Normally, a database backup is recorded in the database and is identified as part of a chain that can be used for restoration.

To do a full backup of an individual database via the SQL Server Management Studio, follow these steps:

1. Open the SQL Server Management Studio (Start, All Programs, Microsoft SQL Server 2008, SQL Server Management Studio).

2. In the Connect to Server dialog box, select the database server name to connect to and click Connect.

3. In the left pane of the Object Explorer, expand the server and the database folder.

4. Select the desired SharePoint Database to back up.

5. Right-click the database, select Tasks, and then click Backup.

6. On the General Settings page in the Backup Database window, review the name of the databases to be backed up and confirm that the Backup Type option is set to Full.

7. For the Backup Component option, select a Database option.

8. In the Backup set, enter the name and the description for the database backup.

9. In the next Destination section, the Tape option is grayed out if no tape devices are attached to the database server. In such a scenario, the only option available is to back up to disk. Click Add to add up to 64 disk devices that will contain the backup information. The same limit applies to tape media. If multiple devices are specified, the backup information will be spread across those devices. All the devices must be present to restore the database.

10. In the Select Backup Destination dialog box, enter the path and the backup filename in the destinations on the disk where the database is to be backed up. Click OK if the backup is to be initiated, or select Options in the Select a Page pane to configure advanced backup options.

In the Overwrite Media section, you have an array of options to choose from: Append to the Existing Backup Set or Overwrite All Existing Backup Sets. Backup sets can be added to an existing media, in which case you select Append to the Existing Backup Set. If you want to overwrite the backup sets with the latest backup on the media, select the Overwrite All Existing Backup Sets option.


Note

SQL Server 2008 R2 Enterprise Edition supports compression. Note, however, that compressed and uncompressed database backups cannot co-exist on the same media set. Also note that the Overwriting Backup Sets feature will be removed from the next version of Microsoft SQL Server; therefore, you should avoid using this feature for any new development instances and modify any existing applications that currently use this feature.


In the Reliability section, you can choose from among the following options:

Image Verify Backup When Finished: Recommended to select because it verifies the database backup, but it does extend the time it takes to complete the database backup.

Image Perform Checksum Before Writing to Media: Ensures that the database backup is completed without any errors. However, selecting this option adds to the time it takes to complete the database backup.

Image Continue on Error: Database backup continues even if an error has been encountered. Selecting this option has an impact on the performance of the server because it increases the CPU overheads.

The Transaction Log section is available only if the Transaction Log backup type is selected on the General page. The Truncate the Transaction Log option removes any inactive portion of the transaction log after the database backup is complete. This is the default option and helps keep the size of your transaction log manageable. The Backup the Tail of the Log option relates to point-in-time restores and is discussed in more detail later in this chapter.

The options in the Tape Drive section are enabled only when Tape has been selected for the destination media. The Unload the Tape After Backup option ejects the media tape after the backup completes. This can help identify the end of the backup and prevents the tape from being overwritten the next time the backup runs. The Rewind the Tape Before Unloading option causes the tape to be released and rewound prior to unloading the tape.

New in SQL Server 2008 R2 is the backup compression feature. This is the last option in the Backup Database Option section. This feature is a Microsoft proprietary formula that may shrink the size of the database backup down to 20% of the original size (depending on the value specified in the Backup-Compression Default Server Configuration option).


Caution

Using the compression option can increase the load on the CPU and negatively affect processing power.


Continue with the process as follows:

1. On the Options page, in the Overwrite Media section, maintain the default settings Back Up to the Existing Media Set and Append to the Existing Backup Set.

2. In the Reliability section, choose Verify Backup When Finished, Perform Checksum Before Writing Media, and Continue On Error Options. Click OK to execute the backup.

3. Review the success or failure error messages and click OK to finalize.

4. Repeat for additional SharePoint databases.

Understanding the SQL Server Recover Models

You can choose from three recovery models: Simple, Full, and Bulk-Logged. The choice of the model depends on various factors that you need to consider, such as the extent to which data loss is acceptable, performance of the SQL server, and database recovery to the point of failure.

The simple recovery model recovers the database only to the point of the last successful full or differential backup. Content added to the database after the backup cannot be recovered with this model.

The full recovery model recovers the entire database to any point in time, because transaction logs are maintained. It must be noted that because all transactions to the database are logged, SQL Server database performance tends to degrade. For performance enhancement and recovery, you should store transaction logs and the database files on separate hard disks.

The bulk-logged recovery model is similar to the full recovery model because it maintains a transaction log; however, this model should be used only when large amounts of data are written to the database. To improve performance of the database server in such situations of bulk insertion or indexing, you should temporarily switch the recovery model to the bulk-logged model.

Business requirements define the disaster recovery strategies and drive the database administrator’s decision as to the appropriate recovery model for the database. By default, the SharePoint configuration, AdminContent, and site content databases’ recovery model is set to Full. As a result, these databases can be restored to the point of failure.

To set the recovery model on a SharePoint content database, follow these steps:

1. Open the SQL Server Management Studio (Start, All Programs, Microsoft SQL Server 2008, SQL Server Management Studio).

2. On the screen, select the database server to connect to the SQL database.

3. In the left pane of the Object Explorer, expand the server and then the database folder.

4. Select the desired SharePoint database to back up. Right-click the database, and select Properties.

5. In the Database Properties dialog box, select the Options node.

6. In the Recovery Mode dialog box, select Full, Bulk-Logged, or Simple from the drop-down list. Full is usually selected in most cases. Click OK to save the changes.

Summary

For SharePoint 2013 administrators, the wide array of options to back up content and configuration can be quite daunting. However, with the correct mix of these options, based on the business requirements, SharePoint configuration and content can be backed up and restored effectively without any loss to the business. Although backup and restore functionality has been removed from SharePoint Designer 2013, granular backup and restore via Central Administration or SharePoint 2013 Management Shell is a more effective and efficient mechanism in situations that require content recovery.

Best Practices

The following are best practices from this chapter:

Image Implement external vendors’ SharePoint backup and restore solutions or Microsoft’s System Center DPM 2010 to enable enterprise-wide automation of backup and restore capabilities.

Image For one-time backup and restore, SharePoint 2013 administrators have a choice of either using Central Administration tool or SharePoint 2013 Management PowerShell.

Image Consider regular scripted backups using SharePoint 2013 Management Shell and SQL Server 2008 built-in tools.

Image Perform regular scripted backups of IIS 7 configuration.

Image Confirm that the SQL recovery model is set to Full on SharePoint databases to allow for full restores of SQL data.

Image SharePoint 2013 Management Shell can be used to back up the entire farm or only business-critical site collections or sites via either one-time backups or scheduled scripts. However, if the content is business critical, SQL Server tools can be used to back up the content database or, using SQL snapshots options, to back up against the SQL snapshot.

Image Simulation of recovery on regular intervals is highly recommended. This can help in plugging any shortcomings in the backup strategies and plans.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset