Operations · Backups & Restore
A brain deployment holds exactly three things worth protecting: the knowledge, the agents' state, and the wiring that stands the boxes back up. Everything else is derived. Both boxes push those three to object storage — encrypted before they leave, into buckets neither box can touch for the other.
The master vault — the company's memory, with its full git history.
Nothing can rebuild it. Compiled vaults, search indexes, and
agent /vault mounts are all derived from it and need no backup.
It backs up hourly because losing an hour is annoying; losing a week is a
different company.
Each container's hermes backup zip: sessions, pairing
approvals, config, deploy key. Taken inside the running container
via SQLite's backup API, so it's consistent while the gateway chats.
Restoring one brings a person's agent back with no re-pairing and no
re-authorized keys.
Compose .env secrets, the live docker-compose.yml,
proxy and tunnel config, systemd units, the sync
authorized_keys. The zips restore state into containers —
the wiring is what lets you start containers at all. Skip it and
a dead box costs a day of re-provisioning.
| You lost | You do |
|---|---|
| A note, or the vault | restic restore the brain-master repo — the vault
returns as a working git repo, history included. |
| One agent's state | Restore that person's newest zip, hermes import <zip> --force
into a fresh container, restart. Pairing, sessions, deploy key all return;
the vault re-clones itself. |
| The agents box | New box → restore compose dir + crontab → docker compose up -d
→ import each person's zip. |
| The brain box | New box → restore vault, config, units, and authorized_keys →
reinstall brainkit → re-point the tunnel. Every agent reconnects without
re-authorizing a single key. |
restic encrypts client-side; without the repo password you own ciphertext. Generate it on the box, put it in a password manager the same day, and never let it transit chat or shell history.
Every run pings a dead-man's-switch URL — start, success, or fail. A missed backup pages you; it does not wait quietly in a log for the day you need it.
Finish setup with a drill: restore to a temp dir and diff against the live tree. Repeat occasionally. The 3 a.m. restore should be the second time, never the first.