tfstfs-2010

TFS 2010 source control backup/restore


Is there a way to backup just the source control component of a team project and restore it into a different TFS server? We setup a TFS 2010 server for RND, but decided to use it's source control manager for a development project. We did this so the developers can learn how to work with it before we use it on a much bigger project. Now, we need to blow away the server since it is a VM for RND. We're going to setup a new TFS server for production. I don't want to lose the source code history.


Solution

  • Use the features built into the product. In Dev10, collections were added so artifacts (including source) would be portable between TFS servers - leverage that. Pilot projects were a key scenario for portable artifacts and a justification for collections.

    Dettach the collection from the VM TFS instance. It's available from the collection node of the admin console.

    Backup the database from the database you dettached.

    Deploy the new real server (non-VM).

    Restore that collection database to the sql server used for the production instance.

    Using the administration console collections node, attach the collection to the newly deployed TFS server.

    Now you have the source available from the prototype period and you have a new production collection available for the new production instance.

    BTW, in Dev 11 (you can get build conference CTP or beta soon) TFS upgrades the collection on attach so if you deploy a Dev11 TFS server, you can attach that prototype collection and pull it forward.