Upgrade strategy 2.1.0 -> 5.0.0

I’m running an ancient Zammad instance 2.1.0-1510157740.86d5b882.stretch and like to upgrade to the latest and greatest 5.0.0. What ist the best strategy?

Can I upgrade directly or do I need to go through several versions?

Do I need to run any kind of database migrations manually?

Is it possible, to just pg_dump the old instance, install the latest version on a new machine and import the old database?

Many thanks in advance!

No better don’t do that.
In my opinion the best upgrade path (with enough “safeties” inside) would be:

  1. 2.1 → 2.4
  2. 2.4 → 3.0
  3. 3.0 → 3.4
  4. 3.4 → 4.0
  5. 4.0 → 5.0 (stable)

While that’s a good idea it won’t work for all migrations and will, if very unlucky, leave your database in a dirty state for those migrations that require specific versions of the code. Theoretically major to major should be good enough, if you want to be extra sure use above mentioned path and, as long as your database is all right right now, you’ll be fine.

You may want to run zammad run rake db:migrate before updating anything.
An important warning:

Zammad 5.0 enforces specific database versions.
For this reason you may want to upgrade to 4.1 and then migrate into a current Debian 10 (as 11 is not yet supported). Theoretical Debian 9 should be good to go already, but you could raise your pgsql version greatly. :slight_smile:

Keep the software dependencies in mind:
https://docs.zammad.org/en/latest/prerequisites/software.html

Apart from repo stuff, your update steps should look like mentioned here:
https://docs.zammad.org/en/latest/install/update.html

Note that your ES version most likely is no longer supported. If nothing else connects to it consider killing it completely (remove data directories) and reinstall a supported version. You can skip that if you migrate onto a new host with 5.0 anyway.

In between your migration steps you technically can skip the searchindex rebuilds for speeding the process up.

1 Like

Many thanks for your detailled reply!
Due to internal problems, I need to postpone the ugprade (again!) to end of the year, but at least now I know exactly what to do!

I hope that instance is not available to the public internet at least.

Only via email. Web UI is internal. We want to open it - after ugprade!

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.