Sunday, February 10, 2008

Restore TFS Databases Script - The one stop restore script

Grant Holliday - Restoring TFS Databases Script

"Often I find myself restoring the 11 or so TFS databases. Usually I’m doing it for one of four things:

  1. Restoring in a VPC for development / testing
  2. Restoring to a second “development” server so that people can try things before they do them in production
  3. A disaster recovery rebuild (or exercise), or
  4. Moving the Data Tier to another server as part of an upgrade

If you find yourself in any of these situations, these docs are the most useful:

Usually I have a directory full of *.bak SQL Backup files and in the past I’ve either gone through the ‘Restore database’ wizard, or hand-written the SQL restore script. This week I invested the time to build a batch script that makes it a whole lot easier and repeatable.

..."

As I upgraded from TFS2005 to TFS2008 I wondered how much fun it was going to be if I had to rollback and restore the TFS2005 DB backups... I'm glad I didn't have to find out.

In any case, Grant provides a cool script to make future upgrades less scary and painful (as well as making it easier to build out a test server to first try the upgrade on... easy = more likely to do it  ;)

No comments: