Upgrade
Upgrade
This page shows how to move to a new release. Use it for each version step. You get the new binary on your old state and config.
flowchart LR Back["back up data_dir"] -- "read" --> Notes["changelog notes"] Notes -- "check" --> Check["--check-config on new binary"] Check -- "start" --> Health["GET /healthz returns OK"] Health -- "bad" --> Roll["restore backup"]Before you start
- Back up state and config in Backup.
- Read
CHANGELOG.mdfor breaking changes. - Keep the old binary or image tag until the new one proves itself.
Steps
- Validate the current config with the new binary. It prints
okfor a valid directory. - Stop the broker.
- Install the new binary or point the compose file at the new image tag. Never use
:latestfor a running deployment. - Start the broker.
- Check
/healthzand reconnect one client before you declare success.
# Adjust paths and the image tag to your setup. The example test does not run this block.indramqtt --config-dir /etc/indramqtt --check-configsudo systemctl stop indramqttsudo install -m 0755 target/release/indramqtt /usr/local/bin/indramqttsudo systemctl start indramqttcurl -sf http://127.0.0.1:18083/healthz[!TIP] Keep
node.data_dirand the config directory across the upgrade. A new empty directory starts empty instead of resuming.
Roll back
Stop the new broker. Restore the backup from Backup. Reinstall the old binary or tag. Start and check /healthz.
Check that it works
Start the broker with this file. Validate the directory. The command prints ok.
[node]id = "docs-upgrade"
[listeners.tcp]bind = "0.0.0.0:1883"
[listeners.api]bind = "0.0.0.0:18083"
[logging]level = "warn""${INDRAMQTT_BIN:-indramqtt}" --config-dir "${DOCS_CFG_DIR:-./docs-upgrade}" --check-configokNext steps
- Confirm behavior in Troubleshooting.
- Watch metrics in Monitoring.