Skip to main content

Updates and rollback

Update notice​

At most every 6 hours the application queries https://disk-tester.znbw.de/api/latest and compares the version with the installed one (SemVer). If a newer version is available, the footer shows "Update available: vX" with a link to the release notes and the command for the update. Only a regular HTTP request is sent; errors are ignored silently.

This can be changed with the environment variables in disk-tester.env:

VariableMeaningDefault
DISK_TESTER_UPDATE_URLBase URL of the update interfacehttps://disk-tester.znbw.de
DISK_TESTER_UPDATE_CHECK0 disables the checkon

Updating from the web interface​

If the application runs from a release installation (/appdata/disk-tester/releases/<version>) and systemd-run is available, the footer shows an Install update button next to the update notice. Otherwise (mock mode, source checkout) the console command is shown instead.

  1. Clicking it opens a confirmation dialog with the version, a link to the release notes and a note that the service restarts and the page reloads afterwards.
  2. While a test or erase job is running or an auto-mode countdown is pending, Install now is disabled and the dialog states the reason.
  3. After confirmation, update.sh runs as its own systemd unit (disk-tester-update) so it survives the service restart. The footer shows progress, and the page reloads as soon as the new version answers.
  4. If the update fails, the footer shows the result (failed, rolled back or refused) with a short reason. The previous version keeps running.

The result of the last run is stored in /appdata/disk-tester/data/update-status.json.

Automatic updates​

Under Settings > General, "Install updates automatically when idle" enables automatic updates (default: off). After each successful update check, a newer version is installed as soon as no test or erase job is running and no auto-mode countdown is pending. If a version fails, it is not retried automatically; clicking Install update manually tries it again. If the check itself fails, it is retried after 30 minutes.

Installing an update from the console​

sudo /appdata/disk-tester/app/deploy/update.sh

The script downloads the latest release from the homepage, verifies the SHA256 checksum, unpacks it to /appdata/disk-tester/releases/<version>, switches the symlink /appdata/disk-tester/app to the new version and restarts the service. Settings, drives and history in data/ are kept.

Arguments: latest (default), a specific version such as v0.3.0, or --rollback.

If a test or erase job is running or an auto-mode countdown is pending, the script aborts without changing anything. --force skips this check.

Rollback​

sudo /appdata/disk-tester/app/deploy/update.sh --rollback

Switches the app symlink back to the previously installed version and restarts the service. Older versions stay under releases/ until you remove them manually.

Technical details are in the update contract.