Updates and upgrades
The Knocknoc software is managed by your operating system, as such updates can be managed within your patching cycle and complete control.
These are applied by using your relevant package management system, as below.
On Debian / Ubuntu and similar variants:
# update your package information
sudo apt update
# update the software
sudo apt install --only-upgrade knocknoc knocknoc-agent
# restart the services if they are not restarted
sudo systemctl restart knocknoc
sudo systemctl restart knocknoc-agent
# if you are using the client on this machine
sudo apt install --only-upgrade knocknoc-client
On Red Hat / CentOS / Oracle Linux:
# update your package information
sudo yum check-update
# update the software
#
# on older systems
sudo yum update knocknoc knocknoc-agent --refresh
# on newer systems
sudo dnf upgrade knocknoc knocknoc-agent
On Microsoft Windows - download the latest Agent and install over the top. Your settings will be retained and the software upgraded without fuss.
Before you upgrade
Take a backup first. An upgrade applies database migrations, and migrations only run forwards. Knocknoc has no command that undoes one, so the backup is what lets you go back.
Backups has the commands for the server's configuration, certificates and database, and for each agent. The server can stay running while you take it. Backing up the whole machine or VM covers all of it.
Rolling back
The way back is to reinstall the version you were on and restore the backup you took before the upgrade. Putting the older package back on its own is not enough, because the database has already been migrated and nothing migrates it down again.
Agents do not have to move with the server. A server and its agents upgrade separately, and there will be an error with instructions about which side to upgrade when they disagree about a configuration.