Search code examples
teamcityupgradeteamcity-9.0

Teamcity upgrade from 9.16 to 10


I want to upgrade Teamcity 9.16 to 10. I want to proceed with manual back-up and then restore it . I am using external database - mysql . i want to upgrade database as well. How should i proceed with this?


Solution

  • TeamCity documentation states that

    Backups created with TeamCity 6.0+ can be restored using the same or more recent TeamCity versions

    so you should be able to create a backup in TC9 and then restore it in TC10.

    The simplest way to create a backup is to navigate to the Administration | Backup section in the server UI to specify some parameters and run the backup, as described here.

    The other options are

    • backup via the maintainDB command-line tool — it is basically the same option, as backup via the UI
    • manual backup

    which are described on the corresponding page of the TC documentation.

    Restoring data from backup is performed using the maintainDB tool, basically the steps for your case are:

    • install new TeamCity (but do not start the server)
    • create a new empty Data Directory
    • create and configure an empty database
    • configure a temporary database.properties file
    • place the database drivers into the lib/jdbc in new data directory
    • use the maintainDB utility located in the <TeamCity Home>/bin to run restore command:

      maintainDB.[cmd|sh] restore -A <absolute path to the Data Directory> -F <path to the TeamCity backup file> -T <absolute path to the database.properties file> 
      
    • If the process completes successfully, copy over /system/artifacts from the old directory

    More details could be found on the corresponding page.