Tuesday, March 22, 2011

Atlassian JIRA: In-Place Database Upgrades

Upgrading JIRA to a newer version, or even migrating JIRA from a machine to another, has always been a pretty simple task. Oversimplifying (only a little bit), a JIRA migration can be accomplished following these steps (this is an excerpt of the Official JIRA Documentation):
  • Prevent users from modifying JIRA while the migration is taking place.
  • Export the old JIRA data using the export tool.
  • Back up the old JIRA: installation directory, home directory, database. Attachments and indexes should be backed up only if stored outside the JIRA home directory (which is not the default installation).
  • Install the new JIRA.
  • Migrate JIRA configurations from the old instance to the new one.
  • Connect the new JIRA to a new, empty database.
  • Start the new instance and use the import tool to load the data exported from the old instance.
I acknowledge that it might seem otherwise, but the migration process is really easy to perform. Unfortunately, the migration process has some drawbacks that affect your users while it is taking place:
  • Users cannot use JIRA during the migration process.
  • The import and export phases are not constant-time tasks: the time required to complete them depends on the amount of data that's been migrated and it can quickly become an issue for large JIRA installations.
Although unsupported up to JIRA v. 4.3, I've seen users neglecting the import/export phase and trying to connect the new JIRA instance to the old database. Most of the times, it worked but it would not update the database structures used by JIRA, with at least a performance degradation as a consequence.

In-Place Database Upgrades

Atlassian JIRA v. 4.3 now officially supports In-Place Database Upgrades when upgrading from at least JIRA 4.0.x.

This means that, during an upgrade process, the administrator is not required to perform the export/import phase any longer. Instead, he will be able to connect the new instance directly to the old database: during the first startup, JIRA will perform a check of the database structures and will upgrade them accordingly.

The bigger the JIRA instance, the more time will be saved during an upgrade process and the less downtime will be experienced by JIRA users.

Upgrading JIRA has never been so easy.

No comments: