Rules to Better TFS 2010 Migration

​Since 1990, SSW has supported the developer community by publishing all our best practices and rules for everyone to see. 

If you still need help, visit Application Lifecycle Management and book in a consultant.

Hold on a second! How would you like to view this content?
Just the title! A brief blurb! Gimme everything!

Update: TFS 2010 has been replaced by TFS 2012 - if you're moving to TFS 2012, see our Rules to Better TFS 2012 Migration.

Upgrading Team Foundation Server can be a daunting task. Be assured that things have become easier and if you follow this guide, it will minimize your downtime.

In this page we will look at upgrading an existing TFS2008 server to TFS2010. We assume you are using a single server configuration and have a DNS entry setup for external access at tfs.northwind.com.

Do you agree with them all? Are we missing some? Email us your tips, thoughts or arguments.  Let us know what you think.

  1. Do you know your migration choices?

    There are many options for migrating to TFS 2010 from TFS 2008.

    1. Bit by bit - Migrate some projects (keep both TFS2008 and TFS2010 online)
    2. Migrate all (recommended – this is what these rules will be about)

    For help on determining the optimum path for you check out Bryan Krieger's post on the subject
  2. Do you have a rollback plan?

    Always plan for a catastrophic disaster, in the event of errors when testing:

    1. Take the TFS2010 server offline
    2. Bring the TFS2008 server online
    3. Change the DNS entries for tfs.northwind.com from the IP for the TFS2010 server to the IP for the TFS2008 server
      1. Internal DNS Server
      2. External DNS Server

    TFS In DNS
    Figure: DNS Pointer for TFS can be easily changed

  3. Do you get a new TFS2010 Server ready?

    1. Prepare a new image. We recommend running Windows 2008 R2 Server x64 using Hyper-V Manager. Your options are:
      1. Manually build a server
      2. A syspreped image (this will be quicker)
      3. System Center Virtual Machine Manager (recommended, quickest)
    2. Add the roles
      1. Application Server
      2. IIS
    3. Install SQL Server 2008 x64 default configuration
    4. Install SQL Server 2008 SP1
    5. Run www.ssw.com.au/ssw/Diagnostics/ and get all green ticks
  4. Do you disable connections?

    Once you are ready to start you need to make sure that no one can access the existing TFS 2008 server while you do the migration.

    1. You are ready to start
    2. Send out an email notifying all users that TFS2008 will be turned off. 
      Follow Rules to better Networks
    3. Make sure no-one can check in files by either:
      1. Running TFSQuiesce (recommended)
        or
      2. Turning off TFS Service
        1. Remote desktop into TFS 2008
        2. Start IIS
        3. Right click Team Foundation Server | Stop

        Figure: You need to stop anyone checking in files 
    4. Confirm you can no longer get latest on the Northwind team project
  5. Do you run your dog food stats (before)?

    1. Run the excellent DogFoodStats by Grant Holliday. These are queries on the TFS2008 database to give you stats about number of files, number of users etc.
      http://blogs.msdn.com/bharry/archive/2007/12/02/tfs-statistics-update.aspx
      1. Record the Number of files
      2. Record the number of Iterations
    TFS2008:
    ===========================================
    Files
    -------- -----------
    1        28052
    2        335168
    -- Compressed file size:
    --------------------
    11837952896

    -- Uncompressed file sizes:
    --------------------
    24868196032
    -- Areas & Iterations:
    -----------
    1096
    Example: Dog Food Stats on TFS2008Make sure that you save the numbers so you can compare it to TFS 2010 later...
  6. Do you backup your databases?

    Run your daily backups to provide a safety net should things go wrong.  

    1. Confirm that the TFS2008 databases were backed up last night.

      a. TfsActivityLogging
      b. TfsBuild
      c. TfsIntegration
      d. TfsVersionControl
      e. TfsWarehouse 
      f. TfsWorkItemTracking
      g. TfsWorkItemTrackingAttachments

      Figure: If you can’t see the physical .bak file for all these, chase up your DBA
    2. Create a backup of the TFS2008 databases by running your Daily Backup maintenance plan on TFS2008 

      Figure: Before starting, kick off the daily backups
  7. Do you know how to upgrade your TFS2008 databases?

    Since we recommend doing a "move based upgrade", we don’t like the "in place upgrade" option, these are the steps:
    1. Copy the TFS2008 backups to TFS2010 server (e.g. C:\TfsBackups)
    2. Restore all the databases to TFS2010’s instance of SQL 2008
    3. Install Team Foundation Server 2010
    4. After the install has completed the Team Foundation Server Configuration Wizard will open
    5. Select Upgrade | Start Wizard
      TFS Config - Upgrade
    6. Click "Next"
    7. Click "List Available Databases"
    8. Select the TfsIntegration database
    9. Check "By checking this box, I confirm that I have a current backup"
    10. Click "Next"
    11. Select "NT AUTHORITY\NETWORK SERVICE" for the System account
    12. Click "Next" 
      TFS Upgrade Wizard - Account
    13. Click "Next"
      TFS Upgrade Wizard - Application Tier
    14. Click "Next"
      TFS Upgrade Wizard - Reporting
    15. Click "Next"
      TFS Upgrade Wizard - Reporting - Reporting Services
    16. Click "Next"
      TFS Upgrade Wizard - Reporting - Analysis Services
    17. Specify the TFSService account
    18. Click "Next"
      TFS Upgrade Wizard - Reporting - Report Reader Account
    19. Click "Next"
      TFS Upgrade Wizard - Sharepoint
    20. Click "Next"
      TFS Upgrade Wizard - Sharepoint - Settings
    21. Click "Next"
      TFS Upgrade Wizard - Project Collection
    22. Click "Next"
      TFS Upgrade Wizard - Review
    23. Click "Configure"
      TFS Upgrade Wizard - Readiness Checks
    24. Have coffee (2 hours)
      Coffee
      BTW: A good user interface should have a coffee image
      [TODO: Martin to create new rule in "Rules to better UI"]
      [TODO: Martin to add suggestion to TFS]
      TFS Upgrade Wizard - Configure - Upgrade Process
    25. Click "Next"
      TFS Upgrade Wizard - Configure - Upgrade Process Success
    26. Click "Close"
      TFS Upgrade Wizard - Complete
    27. Click "Close"
      TFS Config - Application Server Complete
    28. Change the DNS entry for tfs.northwind.com to point to TFS2010 on
      1. Internal DNS
      2. External DNS
      Red Bull Can Since you have to deal with your system admins, this job will take the longest. Speed it up by buying a Red Bull for your system admin
  8. Do you do a quick test after the upgrade finishes?

    All of the hard work has been done, now you need to do a quick test.

    1. Open http://tfs.northwind.com:8080/tfs/web/
    2. Confirm the Team Web Access page load and shows all your team projects
      Quick Test After Upgrade 
      Figure: Make sure you can access TSWA after the upgrade.
  9. Do you run Dog Food Stats (after)?

    Running the "Dog Food" stats on your new TFS 2010 server is a good way to see if the upgrade was successful. You should check the new values against the stats you noted down from your TFS 2008 server.

    1. On TFS2010, run the DogFoodStats queries and save the results
      (http://blogs.msdn.com/granth/archive/2009/10/23/tfs2010-sql-queries-for-tfs-statistics.aspx
    2. Compare the numbers are the same
      1. Note: Number will differ slightly (usually increases as TFS2010 checks in a few more items)
        Note: Grant Holliday has never published exactly why they are not the same.
    TFS2008:
    ===========================================
    Files
    -------- -----------
    1        28052
    2        335168
    -- Compressed file size:
    --------------------
    11837952896

    -- Uncompressed file sizes:
    --------------------
    24868196032
    -- Areas & Iterations:
    -----------
    1096
    Figure: Have a look at the dogfoodstats you ran before
    TFS2010:
    =============================================
    Areas and Iterations
    --------------------
    1096

    Files
    -----------
    347629

    Compressed File Sizes
    ---------------------
    11296

    Uncompressed File Sizes
    -----------------------
    23723
    Figure: You should get the same number or more for your TFS2010 server. We’re not worried unless it’s slightly less
     
  10. Do you get a developer to test the migration?

    Getting someone else to test the migration is the best way to make sure that you have not missed anything.

    1. Run www.ssw.com.au/ssw/Diagnostics/, check it’s all green ticks
    2. Diagnostics will pick up that you need the Visual Studio 2008 SP1 Forward Compatibility Update for Team Foundation Server 2010 installed 
    3. Start Visual Studio 2008
    4. Open Team Explorer
    5. Add a new server http://tfs.northwind.com:8080/tfs/ 
      Add Team Foundation Serve 
      Figure: Remember to use the "/tfs" option when connecting to the new server.
    6. Confirm that the following are correct
      1. Source Code - connect to TFS2010 server and confirm that you can get latest.
      2. Source Code history - check that the source history is intact
      3. Work Items - confirm that you can see the last work items that you created
      4. Team Project - Create a new team project and check the SharePoint portal and reports work
        note: This will need to be done using Team Explorer 2010 as it is not supported in 2008.
    Congratulations, you’ve done a successful migration.

  11. If you already have an installation

    If you have already done some test migrations on the new server there is no need to start from scratch. Just follow these simple steps and you will be up and running in no time.

    1. Open the Team Foundation Server Admin Console
    2. Click Application Tier | Team Project Collections | Detach Team Project Collection
      Detach Team Project Collection 
      Figure: Remove the old Team Project Collection from the server.
    3. Delete the Tfs_* databases except Tfs_Configuration from SQL Server Management Studio
    4. Delete the Tfs_Analysis database from SQL Server Analysis Server.
    5. Copy the TFS2010 backups to TFS2010 server (e.g. C:\TfsBackups)
    6. Restore the databases to the TFS2010’s SQL 2008 Server
    7. In the Team Foundation Server Admin Console
    8. Click Application Tier | Team Project Collections |Attach Team Project Collection
      Attach Team Project Collection
    9. Follow the wizard, rule #8 from step 13.

  12. Do you know how to integrate with SharePoint 2010?

    If you are going to be integrating TFS 2010 with SharePoint 2010 then there are a few things you need to do.

    Single Server Deployment

    If you want to run SharePoint 2010 on the same box as TFS 2010 then make sure you install it before you install TFS 2010. You will then have to use the custom configuration wizard so you can use the existing SharePoint instance.

    Multi-Server Deployment

    If you are going to have SharePoint 2010 on a separate server to your TFS 2010 then you will need to again run the Custom configuration wizard, but you will also need to Integrate your SharePoint 2010 instance with TFS 2010.

  13. Do you know what will break and how to be ready for them?

    Most of your reports (built in and custom) will be broken as the database schema has significantly changed.

    To be ready for this, do a test migration and update any custom reports against the new database schema. That way, when your live server is up and running, your reports will be ready.

    See John Socha-Leialoha's post for a good write up about what has changed and how to get your reports working.