Upgrade
How to move an installation from one release to the next, for the deb package and for the Compose reference installation. Read CHANGELOG.md for the release you are going to first: it says what changed and whether anything needs your attention.
What an upgrade does
Upgrading replaces the binary. The new binary applies the database migrations it carries when it starts, before it listens. Migrations only go forward: there are no down migrations, and a test enforces that. This has one consequence you must plan for: once the new version has started, the old binary may not be able to read the database any more. That is why the first step is always a backup.
The vault key never changes in an upgrade, and neither package nor Compose file touches it.
Before you upgrade
Back up. The database, the vault key and your configuration, as described in backup and restore. For a deb install:
shsudo -u postgres pg_dump -Fc probeward > probeward-before-upgrade.dump sudo cp -p /var/lib/probeward/vault/vault.key /safe/place/vault.key # once is enough sudo cp -p /etc/probeward/probeward.env /safe/place/probeward.envRead the changelog entry, and the release notes on the release page.
Note the version you are running:
probeward version, or Settings, System in the web interface.Skipping releases is supported: the migrations run in order. If you are several releases behind, read every changelog entry in between.
Upgrade the deb package
Download the new package and the SHA256SUMS file from the release page, check the checksum, then:
sha256sum --check --ignore-missing SHA256SUMS
sudo apt install ./probeward_0.2.0_amd64.deb # use the file you downloadeddpkg -i does the same. What happens, in order:
The old service is stopped. If it was running, it is started again at the end. If you had stopped it yourself, it stays stopped. The same holds for the remote probe on a host that runs one (probes): it comes back only if it was running, and a probe is updated by this very step, since the package's probe cannot update itself.
The files are replaced: the binary, the unit, the manual page, the documentation.
If you have edited
/etc/probeward/probeward.envand the new package changes it too,dpkgasks what to do with the file. Keep yours (N), and read the new one to see what variables were added: it lists every variable, commented out. If you did not edit it, it is not touched.The service user, the state directory and the sysctl setting are checked and corrected. The vault key is not touched: it is not rewritten, and its contents are never read.
The service starts. The migrations run, then it listens. Look at the journal:
shjournalctl -u probeward -n 30 --no-pager systemctl status probeward curl -fsS http://127.0.0.1:8080/readyz/readyzanswers only while the database answers. The log saysprobeward listeningwith the new version when the start worked.
Upgrade the Compose installation
cd deploy
./backup.sh # always first
git pull # or check out the release tag
./install.sh # builds the image and restarts; keeps your .env
docker compose logs --tail 30 probewardIf you use a registry image, set PROBEWARD_IMAGE in .env to the new tag, then docker compose pull && docker compose up -d.
Rolling back
Rolling back is a restore. The honest position, as the product requirements put it: rollback is promised only after a restore onto the prior binary with a compatible snapshot has been rehearsed.
- Because migrations only go forward, an older binary is not guaranteed to run on a newer database. It may refuse to start, or worse, start and misread something. Do not simply install the old package over the new one on the same database.
- What does work in principle is this: install the previous version, restore the backup you took before the upgrade into an empty database, and start. Everything recorded since the backup (polls, incidents, notifications, changes made in the web interface) is gone. Sensors poll again from then on.
- The rehearsal of exactly that, for the deb package, between the M1 pilot build and the M2 development build, is recorded below. Nothing else has been rehearsed: not across other pairs of versions, and not for the Compose installation beyond the restore recorded in backup and restore. Until a release has been rehearsed in the same way, treat rolling back as a recovery you hope to avoid, not as a guarantee.
Rolling back the deb package
sudo systemctl stop probeward
sudo -u postgres dropdb probeward && sudo -u postgres createdb -O probeward probeward
sudo -u postgres pg_restore --no-owner --role=probeward -d probeward probeward-before-upgrade.dump
sudo apt install ./probeward_0.1.0_amd64.deb # the older package; apt may need --allow-downgrades
sudo systemctl start probewardThe key stays where it is, and it is the same key: the vault key does not change between versions.
Rolling back the Compose installation
Check out the previous release, run ./install.sh, then ./restore.sh --yes with the backup you took before the upgrade. See backup and restore.
Rehearsal record: 2026-11-28
Done once, in containers, for the deb package. The "old" package held the binary of the M1 pilot build (schema version 2, 0.1.0~m1); the "new" one was built from the M2 development branch (schema version 4, 0.1.0). A systemd container (Debian 13, and the same again on Ubuntu 24.04) ran the service with the real unit; PostgreSQL 18.7 ran in a second container. The data was small: one administrator, one device with a ping and a TCP port sensor, one SNMP credential, a few minutes of polls.
| Step | Result |
|---|---|
| Install the old package on a clean image | User, key (32 bytes, mode 0600), enabled unit created; service not started. |
| Configure, start, create the data, wait for polls | Both sensors up. |
pg_dump -Fc of the database | 146 KB. Key checksum noted. |
| Install the new package over the old | Service stopped, files replaced, service started again. Journal: restored engine state, listening. _sqlx_migrations went from version 2 to 4. Key checksum unchanged. Login worked, the credential was listed, polling continued. |
| Install the old package over the new one, without restoring | The service refused to start in a restart loop: cannot open the database: database migration failed: migration 3 was previously applied but is missing in the resolved migrations. |
Stop, drop and recreate the database, pg_restore the pre-upgrade dump, start the old package | Started on schema version 2. Login worked, the credential was there, polling resumed. Key unchanged. |
What this shows: the rollback procedure above works for this pair of builds, and a plain downgrade is refused, as it should be. What it does not show: anything about larger databases, about releases other than these two, about the Compose installation, or about a database that has run the new version for a long time.