# Backup / restore checklist

Run this after the first successful deploy, then weekly.

## Inventory

- [ ] Compose file, Caddyfile, and `.env` are copied off the VPS.
- [ ] Named volumes listed: `caddy_data`, `agent_data`, `redis_data`, `pg_data`.
- [ ] Agent workspace directory (`./agent`) is in git or in the off-box tarball.
- [ ] DNS registrar login is in a password manager, not only in a browser on the VPS.

## Weekly

- [ ] `docker compose ps` — all services healthy.
- [ ] Vendor snapshot (convenience only).
- [ ] `pg_dump` to a dated file; `redis-cli BGSAVE` if you care about the queue.
- [ ] Tarball volumes + dump to object storage or another region.
- [ ] Confirm the remote object exists and is non-zero.

## Restore drill (once, then after any compose change)

1. Provision a throwaway VM in another region or account.
2. Install Docker Engine + the Compose plugin.
3. Copy compose, Caddyfile, `.env`, and the dump tarball.
4. `docker compose up -d`, restore Postgres, restore `agent_data`.
5. Point a test hostname (or `/etc/hosts`) at the new IP.
6. Hit `/health` over HTTPS.
7. Destroy the throwaway VM. Delete leftover Primary IPs (Hetzner bills IPv4 until you do).

Snapshots on the same hypervisor are not a disaster plan.
