Index: src/site/xdoc/guides/mini/guide-data-management.xml =================================================================== --- src/site/xdoc/guides/mini/guide-data-management.xml (revision 579705) +++ src/site/xdoc/guides/mini/guide-data-management.xml (working copy) @@ -6,24 +6,51 @@
-

When upgrading continuum, it could have some database model change, this tool can export datas from old versions and import this datas to a new model.

+

When upgrading continuum, it could have some database model changes. This tool exports data from old database model and imports the data into the new database model.

+

There are 2 databases that need to be converted, one for the builds and one for the users.

-

This is a standalone jar which is available in the central repo, you can download at the url http://repo1.maven.org/maven2/org/apache/maven/continuum/data-management-cli/${version}/data-management-cli-${version}-app.jar

+

The tool is a standalone jar that you can download from the central repo.

+

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

+
- -

You have to follow this steps -

-

-

NEXT_VAL values in SEQUENCE_TABLE must be checked before restarting continuum

+ +

Follow these steps:

+
    +
  • stop the old version of continuum
  • +
  • export the build and user data from the old version using the jar for the old version: + + java -Xmx512m -jar data-management-cli-1.1-beta-2-app.jar -buildsJdbcUrl jdbc:derby:${old.continuum.home}/data/continuum/database -mode EXPORT -file backups/builds + java -Xmx512m -jar data-management-cli-1.1-beta-2-app.jar -usersJdbcUrl jdbc:derby:${old.continuum.home}/data/users/database -mode EXPORT -file backups/users + +
  • +
+ +

Follow these steps:

+
    +
  • start the new version continuum to create the new data model.
  • +
  • stop continuum
  • +
  • import the build and user data into the new version using the jar for the new version: + + java -Xmx512m -jar data-management-cli-1.1-beta-3-app.jar -buildsJdbcUrl jdbc:derby:${new.continuum.home}/data/continuum/database -mode IMPORT backups/builds + java -Xmx512m -jar data-management-cli-1.1-beta-3-app.jar -usersJdbcUrl jdbc:derby:${new.continuum.home}/data/users/database -mode IMPORT -f backups/users + +
  • +
  • NEXT_VAL values in SEQUENCE_TABLE must be checked before restarting continuum +
      +
    • Normally, the SEQUENCE_TABLE is ok but in some cases the values are wrong.
    • +
    • 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.
    • +
    • 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.
    • +
    +
  • +
  • start the new version of continuum.
  • +
+