0

We have just created a new Windows Server 2012 with TFS 2012 using a SQL Server 2012 db. I need to migrate the code with history from a TFS 2010 using SQL Server 2008 RS to this new server. Any suggestions?

Jonathan Nixon
  • 4,940
  • 5
  • 39
  • 53
Kirby
  • 1,739
  • 1
  • 17
  • 21

2 Answers2

3

I went down this road recently. You basically have two options:

  1. Migrate
  2. Upgrade

Migration

I started going down the Migration route and downloaded the TFS Integration. In short, this ended badly. I spent a total of 2 weeks running the migration and eventually gave up. The tool said that it was going to take over a month to complete the migration.

Eventually I gave up and instead tried the Upgrade route.

NB. I want to point out that whilst I had issues, I'm sure there are many people have used this tool successfully. I am only speaking from my own experience

Upgrade

You are in the same position as I was, namely you already have a new server ready to go. All you need to do to upgrade is as follows (This is not a full guide, there is a link below to a complete guide for this process.):

  1. Open Team Foundation Administration Console on the 2010 server
  2. Click Team Project Collections
  3. On the General tab, select Detach Team Project Collection - a wizard opens
  4. Follow the wizard and detach the collection.
  5. Once detached, backup the Collection Database
  6. If TFS 2012 is already installed then simply restore the database into the new TFS 2012 instance. If not, you need to prep the new SQL Server using TFSConfig PrepSQL.
  7. Restore the backup into the SQL 2012 instance
  8. Attach the collection in the Team Foundation Administration Console on TFS 2012.

The Detach and Attach processes are important as they prep TFS for the transfer process and actually perform upgrades on the database

This is not a full guide, this is just a set of pointers. I strongly recommend you read this page fully before performing any steps. http://msdn.microsoft.com/en-us/library/dd936138(v=vs.100).aspx#Backup

gregpakes
  • 4,465
  • 29
  • 43
  • I found this video series I'm watching that takes the approach of backing up the TFS 2010 server's db from a tool in TFS 2012 called TfsBackup.exe. He also backs up the Encryption Key directly from TFS 2010 for use later when he restores. I'm watching the restoring part next. – Kirby Apr 19 '13 at 17:27
  • So here is a status update. Following the steps I have successfully backed up and restored the 2010 with the 2012 backup/restore tools. I configured pointing to this restore db and the upgrade finished w/o error. – Kirby Apr 25 '13 at 16:56
  • I still have a couple of questions maybe you all can help me out with: 1) When I go to the TFS Server Administration and click on Team Project Collections, why does my restored/upgraded collection show a URL of the old server and a Sql Server instance of the new? I can connect to tfs with the new server and see this collection in a program such as Visual Studio. – Kirby Apr 25 '13 at 16:58
  • Second question (and I don't know why I cannot type an enter in this window). 2) For projects that I already had on my machine, my old domain credential are the owner. How do I change this or remove these bindings. I created a new folder and everything but somehow VS knows a workspace already exists under a different owner. – Kirby Apr 25 '13 at 16:59
  • Hi, I would probably ask these as new questions. You'll probably get a lot more joy! – gregpakes Apr 25 '13 at 20:26
1

I figured it out!

I used this series to do the install of TFS and the migration: http://mohamedradwan.wordpress.com/2013/01/05/upgrade-tfs-2010-to-tfs-2012-with-migration-to-a-new-hardware-series/

Answers to my comments below:

When you go to your Team Project Collections you can actually use the ChangeUrl function to reset it to what it should be. It is common that it will come up with the wrong url when doing a restore from another server. I took screen shots of the process and should have paid closer attention to the warnings that were at the finish.

As far as my second question, apparently VS keeps a config file that has the mapping settings which contains the credentials. I tried to remove and save, but for some reason this didn't work. I mapped it to a new folder, and it worked without issue.

Kirby
  • 1,739
  • 1
  • 17
  • 21