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.
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:
The first version of this tool is 1.1-beta-2
Follow these steps:
java -Xmx512m -jar data-management-cli-1.1-beta-4-app.jar -buildsJdbcUrl jdbc:derby:${old.continuum.home}/data/continuum/database -mode EXPORT -directory backups java -Xmx512m -jar data-management-cli-1.1-beta-4-app.jar -usersJdbcUrl jdbc:derby:${old.continuum.home}/data/users/database -mode EXPORT -directory backups
Follow these steps:
java -Xmx512m -jar data-management-cli-1.1-app.jar -buildsJdbcUrl jdbc:derby:${new.continuum.home}/data/continuum/database -mode IMPORT -directory backups java -Xmx512m -jar data-management-cli-1.1-app.jar -usersJdbcUrl jdbc:derby:${new.continuum.home}/data/users/database -mode IMPORT -directory backups
Before to import from an older version (before 1.1-beta-4 to 1.1 final, you must open the builds.xml file under backup directory and remove all 'testResults' tags. You can remove them with the following XSL:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml"/> <xsl:template match="testResult"/> <xsl:template match="@*|node()"> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> </xsl:stylesheet>
And you can run it with this command:
xsltproc copy.xsl builds.xml > fixed-builds.xml