Team Foundation Server-Automated Backups

One of the things that never ceases to make me smile is the number of companies running Microsoft’s Team Foundation Server software … who don’t back it up.

For those that don’t know, TFS can be looked at as a central store for pretty much all the work that goes on inside a software company. Neglecting to back it up is opening yourself to disaster.

As the TFS Databases are nothing more than SQL Databases, you can back them up in the normal SQL way, or use a tool (there are multiple databases, and you have to get them all at the same time and in the same state – not always easy to achieve). My favourite tool of choice for handling these backups is actually part of the Microsoft Team Foundation Server PowerTools, and integrates neatly into the TFS Administration Console.

The first step after installing the tools is to Create Your Backup Plan.

image

Some things that you will need before you start are:

* A network location where you want your backups to go
* An idea how long you want your backup retention (defaults to 30 days)
* An idea of how you want to schedule your backups – the default nightly runs at 2am local time

Now, my TFS Server doubles up as the main fileserver, so I cheated and entered a local path in the Network Backup Path. (These in turn are synced off to a remote device nightly). This, although being accepted, failed the Readiness check – as its not a network path.

One strange gotcha, I chose to run Full and Transactional backups – leaving Differential off, and you have to uncheck any checked day selection boxes before you can continue.

The other thing that caught me out was the Grant Backup Permissions and Backup Tasks Verification steps were failing, saying that my own account did not have suitable rights for the backup location (strange, as I’m an Admin, and I have full writes to both the NTFS folder and the share). After checking the TFS and SQL Server logs, it was a problem that my target share had a space in it. Putting quotes round it doesn't help either, just causes something else to fail.

And the third, and final thing? Don’t use Local_System account. Remember to setup your own, restricted where possible, account for all services.

image

Comments are closed