build(train): Train's server and BRouter deployable beside the instance (ADR 0030, D46)

deploy/compose.train.yaml adds Train's server at train.halkyon.eu, a
member of Learn's register, with its database halkyon_train in the
instance's PostgreSQL, and BRouter beside it alone (v1.7.10, checked by
SHA-256, no log), its segments of the operator's region kept current
monthly. Nothing changes until deploy/.env names the compose file:
redeploy.sh and backup.sh take Train in only then, and the operator's
steps are in sidecars/README.md. restic now forgets snapshots grouped by
host alone, so adding Train's dump leaves no group behind for good.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-10-29 00:05:39 +01:00
commit a8f7c26e69
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -196,6 +196,21 @@ the way back from a restore that went wrong.
docker compose up -d
```
Train's database, where `.env` switches Train on (`compose.train.yaml`, Halkyon Train's
ADR 0030, D46), is in the same snapshots as `latest-train.dump`, and is restored the
same way, its server stopped meanwhile (`docker compose stop train-server`), from the
same snapshot as Learn's, so that the register's accounts and Train's people agree:
```sh
restic dump <snapshot> /home/deploy/backups/latest-train.dump >~/backups/restore-train.dump
docker compose exec -T postgres \
pg_restore -U halkyon_learn -d postgres --clean --create <~/backups/restore-train.dump
```
`pg_restore --create` makes the database anew owned as it was, by `halkyon_train`,
whose role is the cluster's and so survives the restore (on a new server, make it first:
`sidecars/README.md`, *Train*, step 2).
To check a backup without touching the instance, restore it into a database of its own
next to the real one, look, and drop it: