Skip to content

Upgrading Agilefant

Benjamin Behm edited this page Jun 26, 2013 · 7 revisions

Note!

Those using versions pre-3.1.1 MUST upgrade first to 3.1.1, manually run the upgrade scripts that are appropriate for the 'jump' between the versions, start Agilefant once using version 3.1.1, and only after that update to the latest version

1. Back up your database and previous Agilefant installation

To make sure you can revert to the previous version Agilefant, and for the safety of your data, please take backups of your current installation.

First of all, take a backup of your Agilefant database by using the mysqldump command. E.g. the following row in your shell would do it. This makes it possible for you to revert to this database should the upgrade go wrong.

mysqldump -uDATABASE_USER -pDATABASE_PASS agilefant > dump-agilefant-DATE.sql

Shut down your Tomcat service, and from your Tomcat's webapps directory, copy the .war file and agilefant directory to a safe place. Then, remove both from the webapps directory.

From version 3.1.1 onwards, the Flyway database migration library takes automatically care of updating the database schema to match the latest Agilefant, so steps 2) and 3) below are not necessary. However, if you are migrating to a post-3.1.1 version from pre-3.1.1 versions, see the note at the top of the page!!

2. Run the sql update scripts

As Agilefant's database schema tends to evolve over time, upgrade scripts are needed to modify your existing database to comply with the new version. The upgrade scripts can be found inside the Agilefant zip package. The scripts are named according to the version numbers, leaving out the periods. E.g. to upgrade from the 1.6 series to 2.0, run the 160-200.sql.

If you have skipped any versions, run all the scripts in between. Even if you have not skipped any versions, you may have to run several scripts; for example, those upgrading from 2.0.5 to 3.0.0 should run 205-206.sql, 206-250.sql and 250-300.sql.

3. Changing the database configuration to match yours

In the release package, the files that tell Agilefant where to look for the database point to the default location described in the install guide. If your configuration differs from this, you need to change the database configuration inside the .war package to match your setup. These steps are detailed in the installation guide.

4. Upgrade the web application

Place the new war package in your Tomcat's webapps directory and start the Tomcat server. Voila, your new Agilefant should be running!