Migrate teamcity's (under docker) database

Hello, I want to migrate my teamcity's database from HSQL2 to Mysql but the tutorial is not made for docker version of teamcity, do you guys have some workaround to propose ? I'll take everyone of them. Thanks in advance ! (I already tried to make a volume linking /opt/teamcity/bin to a folder in my computer but it was a fail).

0
5 comments

Hi Brice,

 

there should not really be a difference in regards to the migration. You shouldn't try to map out the folder, as it depends on several of the libraries in the installation. You can either run the command within the docker container itself, or you can just extract the .tar.gz contents locally and use that tool. Both the hsql database as well as the database.properties file are stored in the data directory, so that resides outside of the container anyway, in case you want to go that route.

0

The problem is that when running the commands with the help of "docker exec", the maintainDB tool return an error which basically says that he cannot migrate because the Teamcity server is up and running, and when I try to shut down the teamcity server, the docker container shuts down with it..

0

Hi Brice,

 

Sorry, the official images are set up so that if the process dies it kills the container as well. Then, as mentioned, you should be able to either extract the full folder, or simply download the .tar.gz and run it from there.

0

I'll dig into that, thanks a lot !

0

Hi Brice,

 

A quick follow up. I've opened this request in our tracker to improve on this area. Feel free to watch and vote for it: https://youtrack.jetbrains.com/issue/TW-62009

0

Please sign in to leave a comment.