Update from 5.2.x to latest version

Infos:

  • Used Zammad version: 5.2
  • Used Zammad installation type: docker-compose
  • Operating system: Ubuntu 20.04
  • Browser + version: Chrome Version 122

Expected behavior:

Secure update zammad 5.2 to the latest version.

Actual behavior:

Preparation for the update.

Steps to reproduce the behavior:

Hi, to all. One of my clients has been using a docker container with zammad 5.2 for several years. now he wants to update to the latest version. what’s the safest way to do this? According to the official documentation, all I need are these 6 commands:
$ docker-compose stop
$ git pull
$ docker-compose pull
$ docker-compose up

  • GIT_BRANCH=develop docker-compose -f docker-compose-build.yml up
  • GIT_BRANCH=develop docker-compose -f docker-compose-build.yml build –no-cache
    right? Or are there any pitfalls?
    And also, how to properly make a backup before the update? thanks in advance.

I don’t have any experience with the docker version of Zammad, but have a little experience with running it in kubernetes. Before testing on the prod machine, you could spin up a staging env and test a backup of the prod db to see if you have any problems on the latest version. Here are the steps I took in order to migrate from 5.1.x to 6.2.x on a newer k8s cluster when I was testing. It is the k8s commands, but they should be easy enough to translate to docker. Hopefully its helpful.

  1. Exec into the postgres container
    kubectl -n {namespace} exec -it {container-name} -- /bin/bash
  2. Backup the DB
    pg_dump -U zammad zammad_production > /tmp/backup.sql
  3. Spin up a new instance of zammad
  4. Move that backup file to a volume on the new instance
  5. Exec into the new postgres container
    kubectl -n {namespace} exec -it {container-name} -- /bin/bash
  6. Enter the postgres db and kill connections and drop the db.
    psql -U zammad postgres and select pg_terminate_backend(pid) from pg_stat_activity where datname='zammad_production'; DROP DATABASE zammad_production;
  7. Recreate the db fresh
    psql -U zammad template1 -c 'create database zammad_production;'
  8. Restore the data from your backup file to the db
    psql -U zammad -d zammad_production < /tmp/backup.sql

Previous to this I had no kubernetes or database experience at all, but it worked just fine when I was testing on a completely separate cluster using the data from the prod one.