Upgrading Continuum

This document will help you upgrade Continuum from 1.2.x to 1.3.x.

When upgrading Continuum, it could have some database model changes. The Data Management tool exports data from the old database model and imports the data into the new database model.

Upgrading from 1.2.x to 1.3.1

There are 2 databases that need to be considered: one for the builds and one for the users.

There were no changes in the users database from 1.2.x to 1.3.1, so you can simply point Continuum 1.3.1 at your existing user database.

The builds database has had model changes, and will need to be exported and imported.

First, download the Data Management tools you will need. The tool is a standalone jar that you can download from the central repo.

You will need to download two versions of the tool, one for the export out of the old version and one for the import into the new version:

Note: The 1.2.2 and 1.2.3 released versions of this tool have a bug. You will need to use version 1.2.4 of the tool to export databases from those versions.

Next, follow these steps to export data from the old version

  • Stop the old version of continuum
  • Execute this command to create the builds.xml export file
    java -Xmx512m -jar data-management-cli-1.2.x-app.jar -buildsJdbcUrl jdbc:derby:${old.continuum.home}/data/databases/continuum -mode EXPORT -directory backups

Then, follow these steps to import the data to the new version

  • Start the new version of Continuum to create the new data model, but do not configure it.
  • Stop Continuum
  • Execute this command to import the builds data from the xml file you created earlier:
    java -Xmx512m -jar data-management-cli-1.3.1-app.jar -buildsJdbcUrl jdbc:derby:${new.continuum.home}/data/databases/continuum -mode IMPORT -directory backups

Finally, be aware that sometimes the NEXT_VAL values in the SEQUENCE_TABLE need to be adjusted.

  • Before starting Continuum for the first time after the import, connect to the db with a client like Squirrel SQL and check the values in the NEXT_VAL column of the SEQUENCE_TABLE.
  • Values must be greater than the max id value in each table.
  • For example, the next value of "org.apache.maven.continuum.model.Project" must be greater than the greatest id in Project table.

Now you can start your new version of Continuum.