Upgrade TFS 2017 to TFS 2018 – Walkthrough

How we upgraded TFS from 2017 to 2018 in 3 steps. It was very easy and straight forward but if you haven’t done this before, I hope this post helps.

Upgrading TFS can be very easy if you keep it current or very difficult if you don’t keep it up to date and delay the upgrade until there are many versions between where you are at today and where you want to get to. Luckily, our company has kept our TFS infrastructure up to date every year. Don’t quote me but as I understand it, Microsoft updates TFS quarterly and major updates every year. So, you should plan on updating TFS at least one a quarter. As far as I know, this is the TFS feature timeline: https://docs.microsoft.com/en-us/vsts/release-notes/

To update from TFS 2017 to 2018, here are the steps high level. It was a 3 step process for us. Out infrastructure looks like this: 1 VMWare virtual TFS server and 1 VMWare virtual MS SQL Server with reporting and the TFS Database on it.

  • Disable old work item form (Not really a step. Just check the box)
  • Backup and Upgrade SQL to 2016 SP1
  • Upgrade TFS from TFS 2017 to TFS 2018
  • Upgrade SQL from 2016 SP1 to SQL 2017

Step 1 – Upgrade SQL to to version 2016 SP1

There is usually an overlapping version of SQL between TFS versions. Microsoft has designed TFS this way to easily upgrade to new versions and keep a common Database version on the back end. For us, when we started looking at TFS 2018, we found that we were on SQL 2012 (I believe) and we needed to upgrade to SQL 2016 SP1. Both TFS 2017 and TFS 2018 support SQL 2016 SP1. This was our first step. To do this, here was our procedure. This took from start to finish almost 2 hours:

  • Shut down TFS Server
  • Snapshot TFS Server while off
  • Backup existing TFS databases manually (We didn’t use TFS to do the backup)
  • Once the snapshot and databases were backed up, We essentially had a backout plan (Which we used twice until we got this right. I won’t go into detail here but it worked flawlessly).
  • Shutdown SQL Server and take a VMWare snapshot of it
  • Turn on SQL Server
  • Update compatability mode of all databases to 2016
  • Turn on TFS
  • Update SQL 2016 configuration of the new 2016 features
  • Verify that upgrade was successful

Roll back of SQL upgrade plan

In case the SQL upgrade didn’t go well…

  • Turn off TFS and revert snapshot
  • Restore SQL Manual backups
  • Turn on TFS

Step 2 – Upgrade TFS from 2017 to 2018

This was a bit confusing as there was TFS 2018 RTW and TFS 2018 Update 1 RC. Please make sure you understand the difference here. RTW means “Release to Web” and RC means “Release Candidate” Unless you’re living on the edge, I wouldn’t upgrade your production TFS to a RC version. We went to the RTW version.

We waited 1 week between upgrading SQL to 2016 and upgrading TFS to 2018. This was to ensure we were only making one change at a time. This will ensure you are sure what the procedure you performed is the issue. We did not have any issues after upgrading SQL to 2016 before our TFS 2018 upgrade.

This is where we had problems. First, I couldn’t find anywhere on the web that someone write instructions for the actual upgrade from TFS 2017 to TFS 2018. Since there were no clear instructions, I decided to write these 🙂 Also, our steps listed below worked like a charm. Our restore process had to be executed twice. We were not sure why our data tier couldn’t authenticate the account that was performing the upgrade, we backed out. After we determined the correct rights, We proceed without issues. So you know, the account that you’re using to perform the upgrade MUST be a TFS administrator AND at lease “ServerAdmin” role. We gave my account temporary SA rights to perform the upgrade. Then removed them when done.

  •  Shutdown TFS and take a VMWare snapshot
  • Perform a SQL backup (This is a SQL backup) and should be done following best practices. our SQL administrator performed these steps.
  • Power on TFS
  • Perform TFS Update
  • Test TFS

Backout plan to roll the failed TFS 2018 upgrade back to TFS 2017

  • Shut down TFS
  • Use VMWare snapshots to revert to the snapshot you took above
  • Restore the 2017 SQL backup
  • Turn on TFS
  • Test

Step 3 – Upgrade SQL from SQL 2016 to 2017

As of this writing, we haven’t upgraded SQL from 2016 to 2017. Here are our procedures as of this writing. When we complete it. I’ll update this blog post (I hope).

  • Shut down TFS
  • Snapshot TFS
  • Backup existing TFS user databases manually before SQL upgrade
  • Stop SQL services
  • Take a VM snapshot of SQL server
  • Start SQL services
  • Upgrade the comparability mode of all databases to 2017 Update SQL 2016 configuration to take advantage of new 2017 features
  • Turn on TFS
  • Verify successful upgrade (Both in TFS and SQL)

7 thoughts on “Upgrade TFS 2017 to TFS 2018 – Walkthrough

  1. meyyazhagan

    Thanks for sharing such a nice blog!

    Do you have any recommendation for TFS 2012 to 2018 migration? I’m looking for some detailed blog for this migration from 2012 to 2018. Kindly let me know if you have any insights.

  2. Vinay Sandela

    In our Organization, we are using TFS 2017.1 in Windows Server 2008 with SQL 2014.
    We are planning to upgrade to TFS 2018, where minimum requirement of OS is Windows Server 2012.
    So, We have got our servers ready with Windows Server 2016 and SQL 2016 installed.

    So, Do we need to move our 2017.1 instances first to new Server, then proceed with the Upgrade?

  3. Bob

    It is very clear, thank you. It can help a lot.

    A small typo: Restore the 2017 SQL backup, instead of 2016; in Backout plan to roll the failed TFS 2018 upgrade back to TFS 2017.
    Although very obvious.

Comments are closed.