How to migrate teamcity to new server - I only have disk image of old install

I can't log into the running TeamCity host or to the TeamCity application.

I have opened the vmdk image  with 7Zip and can copy all necessary files.

I need to know what files to copy and where to put them in a fresh install of teamcity on a new server.

So far I have located the C:\ProgramData\JetBrains\TeamCity folder.

I have a lot of time invested in about 30 build configurations.

Do I need anything else? 

The brute force idea that comes to mind is to install a new version teamcity. Make sure the services are stopped and then copy the above folder in and restart the services.

It can't be that easy - please advise.

The most recent backup is labeled TeamCity_Before_Upgrade_20200411_180425\ so I don't think this will be helpful.


There are two required components that contain user data to the TeamCity server: Data Directory and Database. If you have the Data Directory, you have half of the requirements. However, you can check within the Data Directory to find the location of the Database. Please check in your Data Directory for /config/ This file will contain the information about the Database location and then you can determine whether the Database still available.


Since I posted this I realized that I have mysql 5.7.17 running as an external database.  I didn't have a way to back it up so I copied the programdata\MySql folder to the new server. I installed the right version of mysql and I was able to connect to it running mysqld pointed at the correct my.ini file. 

So now I have mysql running.

I tried copying the programdata folder for teamcity 2022.10.3 (what I was using on the disk image) onto the new server and then installing teamcity. The teamcity server won't start. Now I am going to make a clean install of teamcity. Shut it down once I get it running and add in the pointers to the populated mysql teamcity database.



Finally got logged in and all is working OK but not great.

After getting the pointed at mysql database server I still couldn't get the service to start up. It kept failing and I didn't know why. I uninstalled TeamCity and reinstalled and deselected the run as service option. After that I double click the startup.bat in the bin folder and I got the error messages I needed. Maybe that info was in a log somewhere but I didn't think of that. I needed to set the java environment variables. After that I got catalina to start.

Problem 1. I will need to revert back to using the service so it will startup after a reboot.

Problem 2.  I was never able to get the mysql service to start so I switched over to using mysqld with the exact same command line as the service "C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqld.exe" --defaults-file="C:\ProgramData\MySQL\MySQL Server 5.7\my.ini"

so the mysqld process is running the database instead of a service - don't how that will get resolved.

Problem 2. Needs to be resolved - any ideas?


problem 1 above is resolved by uninstalling and reinstalling teamcity 2022.10.3 and selecting service option.

problem 2 was resolved by installing mysql 8 - latest and then migrating teamcity database from 5.7 to 8. 

mysql service runs in version 8 OK.



Please sign in to leave a comment.