backuplisted
Install: claude install-skill AnotherSava/claude-code-common
# Off-box backups
Every tenant here uses one shape. This skill installs it, and the reason it is a skill rather than a
document is that most of its failure modes are **silent** — the run exits 0 while being wrong — so the
steps that catch them have to be executed, not remembered.
## Context
- Project root: !`git rev-parse --show-toplevel 2>/dev/null || pwd`
- Backup artefacts already here: !`find . -maxdepth 4 \( -name 'backup*.sh' -o -name 'restore*.sh' -o -name '*backup.env*' -o -name '*-backup.*' -o -name '*offsite*' \) -not -path '*/node_modules/*' -not -path '*/.git/*'`
- Publish/deploy coordinates: !`find . -maxdepth 3 -name 'publish.env*' -not -path '*/node_modules/*'`
## The shape
| Piece | Where |
|---|---|
| the job | `<repo>/…/backup.sh` (or a `bin/` command), committed **100755** |
| the restore | `<repo>/…/restore.sh`, restoring to a scratch dir — never over live data |
| the units | `<repo>/…/<tenant>-backup.{service,timer}`, installed to `/etc/systemd/system/` |
| the template | `<repo>/…/backup.env.example` — names and shapes, never values |
| credentials | `/etc/<tenant>/backup.env` on the box, mode 0600, the unit's `EnvironmentFile` |
| the passphrase | the app's own Doppler config — `<shard>` / `prd_<app>`, or that project's `prd` for a tenant older than the shards — **off** the box it protects |
| the repository | `s3:<endpoint>/<app>-backups/<host>` — endpoint and region from `b2_authorize_account` |
| staging | `/var/lib/<tenant>/backup-stage`, a **f