Upgrading

Upgrade Stater, go back to an earlier version by restoring a backup, or remove it, with the Linux packages, Compose or Helm.

On this page

Stater migrates its database when it starts. Migrations only go forward, so going back to an older version means restoring a backup made before the upgrade. Always take a backup first, and keep the secret key: it is not in the backup.

Linux packages#

Upgrade:

sudo -u stater sh -c 'set -a; . /etc/stater/stater.env; exec stater backup run'
sudo apt install ./stater_0.2.0-1_amd64.deb      # or: sudo dnf install ./stater-0.2.0-1.x86_64.rpm

The package restarts a running service, which migrates the database. Settings in /etc/stater are kept.

Go back:

sudo systemctl stop stater
sudo apt install --allow-downgrades ./stater_0.1.0-1_amd64.deb   # or: sudo dnf downgrade ./stater-0.1.0-1.x86_64.rpm
sudo systemctl stop stater
sudo -u stater sh -c 'set -a; . /etc/stater/stater.env; exec stater backup restore -force <backup id from before the upgrade>'
sudo systemctl start stater

Remove: sudo apt remove stater or sudo dnf remove stater stops and removes the service. Neither, not even apt purge, deletes /etc/stater (settings, the secret key, the licence) or /var/lib/stater (backups), nor the stater user: losing the key or the backups cannot be undone. Delete them yourself when you are sure.

Compose bundle#

Upgrade:

docker compose run --rm stater backup run
tar -xzf ../stater-compose-0.2.0.tar.gz --strip-components=1
./install.sh --upgrade

Go back: unpack the old bundle the same way, then

./install.sh --upgrade --no-start
docker compose stop stater
docker compose run --rm stater backup restore -force <backup id from before the upgrade>
docker compose up -d

Remove: docker compose down keeps the data; docker compose down -v deletes the database and the backups.

Helm#

Upgrade:

kubectl -n stater exec deploy/stater -- stater backup run
helm upgrade stater oci://ghcr.io/kazarrackt/charts/stater --version 0.2.0 -n stater --reuse-values

Pods are replaced one at a time; the first new pod's init container migrates the database.

Go back: helm rollback stater -n stater puts the old pods back, but not the old database. Scale to 0, restore the backup from before the upgrade (see Database and backups), then scale up again.

Remove: helm uninstall stater -n stater keeps the chart's Secret (with the secret key) and the backup volume claim; delete them with kubectl when you are sure.

Licences#

A release build refuses licences signed with the development key. Install the licence KazLabs sent you with stater configure -licence FILE, install.sh --licence FILE, the chart's licence.existingSecret, or in Admin › Licence (see Plans and licences).