Back up a Web application in SharePoint Server 2010

 

Applies to: SharePoint Server 2010

This article describes how to back up a Web application. Regularly backing up a Web application reduces the possibility of data losses that might occur from hardware failures, power outages, or other problems. It is a simple process that can help to ensure that all the Web application-related data and configurations are available for recovery, if that is required. We recommend that Web application backups be created in addition to regular backups at the farm level.

This topic describes how to back up a single Web application.

In this topic:

  • Considerations when backing up a Web application

  • Task requirements

  • Use Windows PowerShell to back up a Web application

  • Use Central Administration to back up a Web application

  • Use SQL Server tools to back up a Web application

Considerations when backing up a Web application in SharePoint Server

Consider the following when you prepare to back up a Web application.

  • You can back up only one Web application at a time by using the procedures in this article. However, you can simultaneously back up all Web applications by backing up the entire farm.

  • Backing up a Web application does not affect the state of the farm. However, it does require resources and might slightly affect farm performance when the backup is running. You can avoid performance issues by backing up the Web application during hours when farm use is lowest, such as outside office hours.

  • If the Web application uses the object cache, you must manually configure two special user accounts for the Web application after you restore the Web application. For more information about the object cache and how to configure these user accounts, see Configure object cache user accounts.

  • When you back up a Web application, the Internet Information Services (IIS) settings and all content databases that are associated with the Web application are also backed up.

  • When you back up a Web application that is configured to use forms-based authentication, you must also use a file backup system to protect the Web.config files because the Web.config files have been updated manually to register the membership and role providers, and manual changes to the Web.config files are not backed up. Similarly, Web.config files are not restored when you restore a Web application. After recovery, you must update the Web.config files and redeploy the providers. For more information, see Plan authentication methods (SharePoint Server 2010) and Configure claims authentication (SharePoint Server 2010).

Task requirements for backing up a Web application in SharePoint Server

Before you begin, you must create a network folder in which to store the backups. Both the Windows SharePoint Services Timer V4 service account and the server farm user account must have Full Control permissions to this folder. For more information about how to create a backup folder, see Prepare to back up and recover (SharePoint Server 2010).

Use Windows PowerShell to back up a Web application in SharePoint Server

You can use Windows PowerShell to back up a Web application manually or as part of a script that can be run at scheduled intervals.

To back up a Web application by using Windows PowerShell

  1. Verify that you meet the following minimum requirements: See Add-SPShellAdmin. Additionally, the user account performing this procedure must be a member of the SQL Server db_backupoperator fixed database role on the database server where each database is stored.

  2. On the Start menu, click All Programs.

  3. Click Microsoft SharePoint 2010 Products.

  4. Click SharePoint 2010 Management Shell.

  5. At the Windows PowerShell command prompt, type the following command:

    Backup-SPFarm -Directory <BackupFolder> -BackupMethod {Full | Differential} -Item <WebApplicationName> [-Verbose]
    

    Where:

    • <BackupFolder> is the path of the folder you use for storing backup files.

    • <WebApplicationName> is the name of the Web application.

      Note

      You must use the exact name for the Web application that you are backing up withWindows PowerShell. To find the Web application name in Central Administration click Manage web applications in the Application Management section.

    Note

    If you are backing up the Web application for the first time, you must use the Full option. You must perform a full backup before you can perform a differential backup.

For more information, see Backup-SPFarm.

Note

We recommend that you use Windows PowerShell when performing command-line administrative tasks. The Stsadm command-line tool has been deprecated, but is included to support compatibility with previous product versions.

Use Central Administration to back up a Web application in SharePoint Server

You can use Central Administration to back up a Web application.

To back up a Web application by using Central Administration

  1. Verify that the user account that is performing this procedure is a member of the Farm Administrators group.

  2. In Central Administration, on the Home page, in the Backup and Restore section, click Perform a backup.

  3. On the Perform a Backup — Step 1 of 2: Select Component to Back Up page, select the Web application from the list of components, and then click Next.

    Note

    The Web application might consist of several components. You must select the top-level component.

  4. On the Start Backup — Step 2 of 2: Select Backup Options page, in the Backup Type section, select either Full or Differential.

    Note

    If you are backing up the Web application for the first time, you must use the Full option. You must perform a full backup before you can perform a differential backup.

  5. In the Back Up Only Configuration Settings section, click Back up content and configuration settings.

  6. In the Backup File Location section, type the Universal Naming Convention (UNC) path of the backup folder, and then click Start Backup.

  7. You can view the general status of all backup jobs at the top of the Backup and Restore Job Status page in the Readiness section. You can view the status for the current backup job in the lower part of the page in the Backup section. The status page updates every 30 seconds automatically. You can manually update the status details by clicking Refresh. Backup and recovery are Timer service jobs. Therefore, it may take several seconds for the backup to start.

    If you receive any errors, you can review them in the Failure Message column of the Backup and Restore Job Status page. You can also find more details in the Spbackup.log file at the UNC path that you specified in step 6.

Use SQL Server tools to back up a Web application in SharePoint Server

You cannot back up the complete Web application by using SQL Server tools. However, you can back up all the databases that are associated with the Web application. To back up the complete Web application, use either Windows PowerShell or Central Administration.

To back up a Web application by using SQL Server tools

  1. Verify that the user account that is used to back up the databases is a member of the SQL Server db_backupoperator fixed database role on the database server where each database is stored. Additionally, verify that the user account has Full Control permissions on the backup folder.

  2. Open SQL Server Management Studio and connect to the database server.

  3. In Object Explorer, expand Databases.

  4. Right-click the database that you want to back up, point to Tasks, and then click Back Up.

  5. In the Back Up Database dialog box, in the Source area, select the kind of backup that you want to perform from the Backup type list. For more information about which backup type to use, see Overview of Recovery Models (https://go.microsoft.com/fwlink/p/?LinkId=114396).

  6. In the Backup component area, click Database.

  7. Either use the default name provided or specify a name for the backup set in the Name text box.

  8. Specify the expiration date for the backup set. This date determines how long, or when, the backup set can be overwritten by any later backups that have the same name. By default, the backup set is set to never expire (0 days).

  9. In the Destination area, specify where you want to store the backup.

  10. Click OK to back up the database.

  11. Repeat steps 1-10 for each database that is associated with the Web application.

Resource center

Business Continuity Management for SharePoint Server 2010 (https://go.microsoft.com/fwlink/p/?LinkID=199235)

IT Pro content

Restore a Web application (Search Server 2010)

Restore a Web application in SharePoint Server 2010

Back up a farm in SharePoint Server 2010

Plan for backup and recovery in SharePoint Server 2010

Backup and recovery for SharePoint Server 2010

Developer content

Data Protection and Recovery (https://go.microsoft.com/fwlink/p/?LinkID=199237)

See Also

Other Resources

Resource Center: Business Continuity Management for SharePoint Server 2010