Skip to content

Upgrade and back up

Install the release, restart the daemon, and check the running version:

curl -fsSL https://github.com/wardrik-dev/wardrik/releases/download/wardrik_daemon-v0.1.0-rc.12/install.sh | sh
systemctl --user restart wardrik
wardrik version
  • Without WARDRIK_VERSION, it installs the latest release, including pre-releases.
  • The new release installs next to the old one. The running daemon continues using the previous release until restarted.
  • To roll back, run the script with WARDRIK_VERSION set to the previous release, and restart.

In Docker, start a new container with the same volumes:

docker pull ghcr.io/wardrik-dev/wardrik:0.1.0-rc.12
docker rm -f wardrik
docker run -d --name wardrik -p 127.0.0.1:4747:4747 \
-v wardrik-config:/config -v wardrik:/data ghcr.io/wardrik-dev/wardrik:0.1.0-rc.12

After an upgrade, run wardrik doctor. It fails for each agent whose saved state the new release can't read, and says why.

What Where
Your files ~/.config/wardrik: config.yaml, agents/, policies/, env
The vault key ~/.local/share/wardrik/vault_key, or wherever WARDRIK_VAULT_KEY is stored
The store ~/.local/share/wardrik/store, the Postgres database, or the S3 bucket

Back up the vault key separately from the store. Together they decrypt every secret.

A store on disk:

wardrik stop
tar -czf wardrik-store-$(date +%F).tar.gz -C ~/.local/share/wardrik store
wardrik start

To restore, stop the daemon, extract the archive, and start it. Back up Postgres with pg_dump, and a bucket with your provider's versioning or replication.

  • The script verifies the release against its SHA256SUMS. It keeps the previous release and removes older ones.
  • The daemon regenerates the cookie and the wardrik command's token on startup.
  • If a new release can't read an agent's saved state, such as one naming a module the release no longer has, the agent doesn't start. Its status is unreadable, with the reason as problem, and messages to it return an error. Defining it again starts it over with an empty conversation: wardrik reload does for agents in agents/. Its definition, files and events stay.
  • ~/.config/wardrik can be kept in a dotfiles repository. Exclude env, which contains keys.