Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,25 @@ exact tag (`ghcr.io/calnode/calnode:0.1.0`) if you need stability between upgrad

## [Unreleased]

### Upgrading

- **Back up the database before upgrading.** This release includes a migration (`00072`)
that renames two columns on `bookings` and adds one. Migrations run automatically at
boot, so the upgrade is the moment to want a restore point that predates it.

- **Docker or Railway.** Take the backup deliberately rather than assuming a replica
exists somewhere, and prove it restores while the app is still on the old version: the
non-destructive drill in `DEPLOY.md` §6 restores to a scratch path without touching the
live database. If you run without `CALNODE_ENCRYPTION_KEY`, also copy
`/data/calnode.key`. The replica holds the database, not the key, and a restore without
it will not start.
Comment on lines +20 to +25

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This bullet sends every non-NS8 reader to the §6 drill, but that drill only works from a configured Litestream replica: DEPLOY.md §6 says backups are off until LITESTREAM_* is set, and the standalone binary ships no Litestream or entrypoint at all. Readers in either case get told to “take the backup deliberately” with no procedure they can follow.

Technical details
# Backup guidance assumes a Litestream replica exists

## Affected sites
- `CHANGELOG.md:20-25` — the Docker/Railway bullet points at the §6 drill, which requires
  `LITESTREAM_*` and `/etc/litestream.yml`.
- `DEPLOY.md:219-222` — “**Backups are OFF until you set the env vars below**”.
- `DEPLOY.md:42-48` (Standalone binary) — no Litestream, DB at `./data/calnode.db`; the
  key, when not supplied via `CALNODE_ENCRYPTION_KEY`, is `./data/calnode.key`
  (`internal/keyvault/secret.go:40`).

## Required outcome
- The section tells an operator without a replica how to take the backup it asks for:
  stop the app, copy the SQLite file and the key file next to it (`/data/…` in a
  container, `./data/…` for the binary).

## Suggested approach (optional)
- Extend this one bullet instead of adding a third: “with `LITESTREAM_*` set” → run the
  §6 drill; “without a replica” → copy the database and key while the app is stopped.

- **NS8 module.** Run a module backup before pulling the new image. It captures
`volumes/calnode-data` and `state/calnode.env`, which is where the encryption key lives.

The migration has a down path that restores both column names and keeps the data, but a
backup is the only safety net for anything that goes wrong between the migration running
and your first check that existing bookings still look right.

### Added

- **German without du or Sie (`de-x-neutral`).** An opt-in wording variant of the German
Expand Down
Loading