Do you backup your databases?
  v1.0 Posted at 13/08/2015 2:36 AM by Ben Cull

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.jpg

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.jpg

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.jpg 

Figure: Backup all relevant databases


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.jpg 

Figure: Add tbl_TfsTransactionLogMark table to every Tfs_* Database

add spset.jpg

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.jpg

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.jpg

Figure: Backup Reporting Services encryption keys

Related rules

    Do you feel this rule needs an update?

    If you want to be notified when this rule is updated, please enter your email address:


    Note: Social Media login for Yotpo is not working in IE or Safari, please use Chrome. We are waiting for Yotpo to fix it.