I’m assuming you have already installed JetBrains TeamCity and you are looking to upgrade an existing installation. You can check what version of TeamCity you are running by looking in the footer of the web interface.
At the time of writing TeamCity is in version 9.1.4.
So, assuming you don’t have the latest version and need to upgrade let’s press on. Grab the installer from the JetBrains site and follow the steps below.
Step 1 – Backup TeamCity
Make sure that TeamCity is running and access the web user interface. Under Administration – which can be found top-right - choose Backup from the Server Administration section – bottom-left. Select an appropriate Backup scope and click Start Backup.
Wait patiently until your backup completes. You can see where TeamCity has put the backup file in the report section at the bottom of the page.
Step 2 – Install the latest version of TeamCity
Double-click on the installer and follow the wizard.
Follow the wizard through. It is very likely you’ll be prompted to uninstall the previous version of TeamCity. I always do so.
Uninstall the previous version.
Hopefully the previous version will have been uninstalled.
Now we can start installing the new version.
Keep running through the wizard. Eventually you’ll be asked to allocate an account to the TeamCity server and the build agent. I always use the system account for each.
Keep ploughing through the wizard until you hit the final step.
Check the “Open TeamCity Web UI after Setup is completed” checkbox and click Finish. The web UI should open for you.
Step 3 – Data upgrade
It is quite possible that when you view the TeamCity web UI you’ll be notified that data upgrade is required.
Assuming you are an administrator, click the “I’m a server administrator, show me the details” link. On the page that follows you’ll be prompted for a token that’s in the TeamCity server log. On my system – and I use default TeamCity settings – that’s found in C:\TeamCity\logs and is called teamcity-server.log.
Copy the token and paste it into the first on the form before clicking Confirm.
On the next form click Upgrade and cross your fingers.
Hopefully TeamCity will now start.
Once it has started you should be dropped back in the management UI.
Job done. Congratulate yourself on how awesome you are.
What if it all went wrong?
If you are unlucky enough for there to have been a problem you might have to restore TeamCity from the backup you took at the start of the process.