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.
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.
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_"
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 .
Figure: Add tbl_TfsTransactionLogMark table to every Tfs_* Database
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.
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.
Figure: Backup Reporting Services encryption keys