Search code examples
tfstfs-migration

TFS Collection Migration from 2010 to 2012


I have two TFS servers. One is a legacy TFS2010 server that contains an old collection of our projects. Last year, we spun up a new TFS2012 server. However, we never migrated our source code from the old server (we treated it as a fresh install and created new projects).

We are now looking at retiring the 2010 server completely and I want to migrate the legacy 2010 collection (actually all I care about is the source control and history) to the new server as a separate collection, but I can't figure out how. I've followed the instructions on MSDN (http://msdn.microsoft.com/en-us/library/vstudio/dd936138.aspx) but when I get to the step for attaching the collection on the new server, TFS complains that "no attachable databases were found" on the sql server.

I've also tried running the "tfsconfig Collection /attach" command on the target TFS server (even though numerous posts I read say it was deprecated in 2012). It tells me it can't connect to the target database server (even though my production collection is attached to it on that box).

Does anyone know if a collection migration from 2010 to 2012 is even possible or if I'm just spinning my wheels? There's no official documentation from Microsoft that I can find that says such a migration is even possible (even though there's nothing I can find that refutes it either)

Server Specs:

  • Old SQL Server: Enterprise 64 Bit 2008 SP3 (10.0.5500)
  • New SQL Server: Enterprise 64 Bit 2008R2 SP2 (10.50.4000)
  • Old TFS Server: 10.0.40219.1 (SP1 KB2182621)
  • New TFS Server: 11.0.60315.1 (TFS2012 Update 2)

Solution

  • You can migrate a single collection. The steps I know working are:

    • detach the collection from the 2010 instance using TFS Admin console
    • backup the database (or detach from SQL)
    • restore the database new SQL instance (or copy the files and attach them from SQL) -- check does not clash with existing database names
    • attach the collection from the 2012 TFS Admin Console

    The last step will kick off the upgrade process: the collection will not be available until the process is complete. It could takes minutes or hours depending on the size, and make sure you have enough space for SQL transaction logs.