Quantcast
Channel: Zammad - Community - Latest posts
Viewing all articles
Browse latest Browse all 7704

Update from 5.2.x to latest version

$
0
0

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.


Viewing all articles
Browse latest Browse all 7704

Trending Articles