Rules

Secret ingredients to quality software

Edit
Info

Do you backup your databases?

Created on 12 Aug 2015 | Last updated by Tiago Araújo [SSW] on 11 Mar 2021 10:18 PM (about 1 month ago)

Before starting your upgrade, you should back up all your TFS databases.

It's important that you backup TFS by using one of the supported methods, to ensure that you can reliably restore your data if needed.

Tip: The Team Foundation Server Team Foundation Server 2012 Update 2 and above has a built in Scheduled Backup tool which helps you to easily backup all TFS Databases. For versions prior to TFS 2012 Update 2 you have to use Backups tool from the TFS Power Tools package.

tfs scheduled
Figure: TFS Scheduled Backups Tool

In some cases you won't be able to use this tool e.g. with TFS 2012 Power Tools RTM. This version has a bug which causes a failure of Tfs_Configuration DB when you try to restore it.

tfs backup
Figure: TFS Backup tool failed to restore the Tfs_Configuration DB – known bug in TFS 2012 Power Tools RTM

In such case you will have to manually backup databases. Make sure all relevant databases have been backed up. This includes all those starting with "Tfs_"

backup all
Figure: Backup all relevant databases

Important: Manual backup requires additional user steps which involve creation of additional tables and stored procedures. These tables has to be created to keep TFS databases in sync.

Follow this instructions to properly backup your databases: Manually back up Team Foundation Server.

add tbl
Figure: Add tbl_TfsTransactionLogMark table to every Tfs_* Database

add spset
Figure: Add sp_SetTransactionLogMark stored procedure to every Tfs_* Database

If you manually backup the TFS Databases make sure you add additional jobs that execute 1 minute before the backup kick off.

add additional
Figure: Add additional jobs to SQL Server Agent

Make sure you back up the Reporting Services database if you'd like your reports to come across as well.

For Reporting Services make sure you have backed up the encryption key.

backup reporting
Figure: Backup Reporting Services encryption keys


We open source. This page is on GitHub