How to: Back Up Team Foundation Server

You can help prevent the loss of data and productivity by backing up data for Visual Studio Team System Team Foundation Server on a scheduled basis by using the tools that SQL Server provides. By backing up your data, you can help protect against data loss in the event of a hardware failure or other unplanned event. Before you start to back up your application-tier server for Team Foundation, you should back up the encryption key for Reporting Services. For more information, see How to: Back Up the Reporting Services Encryption Key.

Warning

You can use SQL Server Management Studio to back up individual databases. However, you might experience unexpected results after you restore from those back-ups because the databases are related and you risk restoring outdated versions. For more information about strategies for backing up databases, see the following pages on the Microsoft Web site: "Choosing the Recovery Model for a Database" for SQL Server 2005 or "Introduction to Backup and Restore Strategies in SQL Server" for SQL Server 2008.

Use the following table to identify databases for Visual Studio Team System Team Foundation Server:

Database

Description

ReportServer

The Reporting Services database contains the reports and report settings for Reporting Services.

ReportServerTempDB

The Reporting Services temporary database is used for temporarily storing information that is used when you run specific reports for Reporting Services.

STS_Config_TFS or WSS_Config

The configuration database for SharePoint Products and Technologies contains a listing of all sites including content databases, site templates, custom Web parts, and other settings from SharePoint Central Administration.

STS_Content_TFS or WSS_Content

The content database for SharePoint Products and Technologies contains the actual content in the team's SharePoint site.

NoteNote:
The name of the database that contains data for SharePoint Products and Technologies will vary depending on the version of SharePoint Products and Technologies that is installed and whether the person who installed it customized the name. Additionally, if SharePoint Products and Technologies is installed on a separate server from Team Foundation Server, these databases might not be present on the data-tier server for Team Foundation. If they are not present, you must manage their backup, restoration, and configuration separately from Team Foundation Server. However, you should synchronize the maintenance of the databases to avoid synchronization errors.

TfsBuild

The build database contains Team Foundation Build data and published test results.

TfsIntegration

The registration database contains Projects, Areas, Iterations, and other registration data.

TfsVersionControl

The Team Foundation version control database.

TFSWarehouse

The Analysis Services database contains the data for building the warehouse used by the Reporting Services.

NoteNote:
The database can be backed up, however the warehouse is not backed up as the warehouse must be rebuilt from the restored TFSWarehouse database.

TfsWorkItemTracking

The Team Foundation work item tracking database.

TfsWorkItemTrackingAttachments

The Team Foundation work item tracking attachments database.

TfsActivityLogging

The history database contains a log of all Team Foundation Server Web service requests.

NoteNote:
This database is not required for Team Foundation Server operation and back up is optional.

This procedure explains how to create maintenance plans that perform either a full or an incremental backup. If you want to perform both types of back-ups, complete the steps two times; one time for the full backup, and one time for the incremental backup. For more information, see "Creating Transaction Log Backups" for either SQL Server 2005 or SQL Server 2008 on the Microsoft Web site.

Note

For maximum data protection, schedule the full backup differently from the incremental backups.

The following procedure assumes that you want to schedule backups by using a maintenance plan for all the Team Foundation Server databases. For more information about how to perform backup and restore manually or for individual databases, see "Backing Up and Restoring Databases in SQL Server" for either SQL Server 2005 or SQL Server 2008 on the Microsoft Web site.

Required Permissions

To perform this procedure, you must be a member of the Administrators security group on the Team Foundation data-tier server and you must be either a member of the SQL Server System Administrator security group on the Team Foundation data-tier server or have the SQL Server Perform Back Up and Create Maintenance Plan permissions set to Allow. For more information, see Team Foundation Server Permissions.

Make sure that you store your backups in a secure location. You should not store your backup files on the same server that you just backed up.

To create a maintenance plan in SQL Server 2008

  1. On the data-tier server, click Start, click All Programs, click Microsoft SQL Server, and then click SQL Server Management Studio.

  2. Connect to the server for the data tier by selecting Database Engine in the Server type box and then selecting the correct Server name and Authentication scheme for the server. If it is required by your SQL Server, provide a valid User name and Password, and then click Connect.

  3. In SQL Server Management Studio, expand the Management node, right-click Maintenance Plans, and then select Maintenance Plan Wizard.

  4. On the Maintenance Plan Wizard welcome page, click Next.

  5. In the Name box on the Select a Target Server page, type a name for the maintenance plan.

    • For example, you could name a full backup TfsFullDataBackup.

    • For example, you could name an incremental backup TfsIncrementalDataBackup.

  6. Select the correct Server name and Authentication scheme for your SQL Server. If it is required by your SQL Server, provide a User name and Password and then click Next.

  7. On the Select Maintenance Tasks page, select the maintenance task you want to run, and then click Next.

    • To complete a full backup, select Back Up Database (Full).

    • For an incremental backup, select Back Up Database (Transaction Log).

  8. On the Select Maintenance Task Order page, click Next.

    For more information about the options on this dialog box, press F1 for help that is specific to the dialog box. Also, see the SQL Server Books Online and search for the Maintenance Plan Wizard.

    Note

    Store the backup files on another secure computer.

  9. On the Define Back Up Database Task page, click the down arrow, select All Databases, click OK, and then click Next.

  10. On the Select Plan Properties page, click Change.

  11. In the New Job Schedule dialog box, type a Name for the back up job.

    For example, you could name a full backup ScheduledFullBackup as the name. Or, you could name an incremental backup ScheduledIncrementalBackup.

    Note

    Leave the Schedule type as Recurring and leave the Enabled check box selected.

  12. Set the desired Frequency and Daily Frequency options for your back up plan, but leave the Duration set to No end date. Click OK and then Next.

    Note

    Typically, the start times for full and incremental backups are staggered from each other.

  13. On the Select Report Options page, select the desired report distribution options, and then click Next.

  14. Click Finish to complete creating the maintenance plan.

    SQL Server backs up the databases specified in the maintenance plan according to the frequency you specified.

To create a maintenance plan in SQL Server 2005

  1. On the data-tier server, click Start, point to All Programs, point to Microsoft SQL Server, and then click SQL Server Management Studio.

  2. In the Server type list, click Database Engine.

  3. In the Server name list, click or type the appropriate server.

  4. In the Authentication list, click the appropriate scheme.

  5. In User name, type the user name of a valid account.

  6. In Password, type the password of the account if SQL Server requires it, and then click Connect.

  7. Expand the Management node, right-click Maintenance Plans, and then click Maintenance Plan Wizard.

  8. On the Maintenance Plan Wizard welcome page, click Next.

    The Select Plan Properties page opens.

  9. In the Name box, type a name for the maintenance plan, click Separate schedules for each task, and then click Next.

    • For example, you could name a full backup TfsFullDataBackup.

    • For example, you could name an incremental backup TfsIncrementalDataBackup.

  10. On the Select Maintenance Tasks page, select the check boxes for the maintenance task or tasks you want to run, and then click Next.

    • To complete a full backup, select the Back Up Database (Full) check box.

    • To complete an incremental backup, select the Back Up Database (Differential) check box.

    • To complete a transaction log backup, select the Back Up Database (Transaction Log) check box.

  11. If the Select Maintenance Task Order page appears, click Next.

    For more information about the options on this page, press F1 or search for "Maintenance Plan Wizard" in the SQL Server Books Online.

    The Define Back Up Database Task page opens.

  12. In the Databases list, click the databases that you want to back up, and then click OK.

  13. Under Schedule, click Change. Specify the schedule type, frequency, and task duration that best meet your operational needs, and then click OK.

  14. Review the information, and then click Next.

  15. If you specified more than one maintenance task, repeat the previous three steps for each task.

  16. On the Select Report Options page, specify the options that you want for distributing reports, and then click Next.

  17. Click Finish to complete creating the maintenance plan.

    The Maintenance Plan Wizard Progress page displays progress information for the creation of the plan.

    SQL Server backs up the databases that you specified in the maintenance plan according to the frequency that you specified. If you did not specify a scheduled time for backups, you can create a backup at any time by right-clicking the maintenance plan and clicking Execute.

See Also

Tasks

How to: Restore Data for Team Foundation

How to: Back Up the Reporting Services Encryption Key

Other Resources

Managing Data

Managing Data-Tier Servers for Team Foundation Server

Managing Team Foundation Server

Change History

Date

History

Reason

June 2010

Removed erroneous reference to SQL Server 2005 and updated introduction to concepts.

Customer feedback.