backup docs: record live 2/day 48h config and the whale-orphan residue

This commit is contained in:
inference-bot committed 2026-11-21 16:56:35 +00:00
1 parent f738b855b0
commit a40f54ef20
1 file changed
+23 -11
+23 -11
View File
@@ -10,10 +10,10 @@ mistake — they do not back each other up, and neither one covers the other's h
| Machine | Agent host `ov-0f018e` (`179.237.103.165`) | The Cloudron server `179.237.86.116` |
| Tool | `restic` (client-side encrypted, run nightly by a systemd timer) | Cloudron's built-in backup (dashboard-configured) |
| Target | Infomaniak **Swiss Backup** (S3-compatible) | Infomaniak **Swiss Backup** (S3-compatible, `s3-v4-compat`) |
| Schedule | 04:30 UTC + up to 5 min jitter (`agent-backup.timer`) | daily 23:00 UTC (`00 00 23 * * *`) |
| Retention | 7 daily / 4 weekly / 3 monthly, no grouping | 7 days (`keepWithinSecs: 604800`) |
| Schedule | 04:30 UTC + up to 5 min jitter (`agent-backup.timer`) | 02:00 + 14:00 UTC (`00 00 2,14 * * *`) |
| Retention | 7 daily / 4 weekly / 3 monthly, no grouping | 48 h (`keepWithinSecs: 172800`) |
| Config lives | installed as `/usr/local/sbin/agent-backup` (root-owned) from `~/.hermes/scripts/backup.sh`; unit at `/etc/systemd/system/agent-backup.*` | Cloudron dashboard (no write API — see below) |
| Last verified | 2026-11-04 (13 snapshots in the repo) | 2026-11-02 (runs 2026-10-30 → 11-03 all `normal`, ~5.4 GB) |
| Last verified | 2026-11-04 (13 snapshots in the repo) | 2026-11-21: 5 retained runs / 5.72 GB, but bucket 23.70 GB — 16.76 GB is orphan/mirror residue (see below) |
Nothing on the Cloudron **host OS** is backed up by either system (netplan, sshd,
`authorized_keys`, hand-edited `/etc`) — build the box, do not expect to restore
@@ -112,20 +112,32 @@ having failed.
- Configured in the **dashboard** (*Settings → Backups*). There is **no write
API**: `GET /api/v1/backup_sites` works, but `PUT`/`POST` on it and
`POST /backups` all 404. Schedule and retention are dashboard-only.
- **Two sites exist:** the live one (`s3-v4-compat`, daily 23:00, 7-day
retention, id `03cfbdca-88fc-4ccc-97c3-7e1b58cf892d`) and an inactive
`filesystem` site with schedule `never`. Do not be alarmed by the second one.
- **Two sites exist:** the live one (`s3-v4-compat`, **two runs/day at
02:00 + 14:00 UTC**, **48 h** retention, id
`03cfbdca-88fc-4ccc-97c3-7e1b58cf892d`) and the `filesystem` update site
(`/mnt/data/backups`, schedule `never`, 7 d). Do not be alarmed by the second one.
- **Quota math must be measured bucket-side, not derived from `/backups`.** On
2026-11-21 the retained set was 5 runs / 5.72 GB while the bucket held 23.70 GB
and rejected a 1 MB PUT. The gap was residue the retained set cannot see:
registry mirror `snapshot/app_c257ba3c…` 8.12 GB (left after `enableBackup=false`),
orphan session `2026-11-10-140000-961/` 8.12 GB (registry tar, no box record),
orphan session `2026-11-13-140002-574/` 0.53 GB (chat-legacy tar, no box record).
Disabling an app's backup stops future uploads but never deletes its last mirror
object; a copy-phase failure leaves a session dir that retention never prunes.
Decompose the bucket by top-level dir against retained `remotePath`s before
believing a capacity fix worked.
- **A run reads `state=normal` even when it failed.** The failure's real error
text is in `GET /api/v1/tasks` (task id `backup_<siteId>`, field `error.message`),
not in the run list. `/events` needs a `?since=` range and `/system/logs` does
not exist — a 404 there is not "no failures".
- `/backup_sites` carries `schedule` as a 6-field cron and `retention.keepWithinSecs`.
Check retention **before** claiming it needs changing.
- **Quota math:** a failure whose upload pushed the retained set over the
provider ceiling is the signature. The old box's `EntityTooLarge` failures came
from a 4.82 GB run twice daily against the ceiling; the ceiling was raised and
the schedule moved to once daily. Per-run size still grows (mostly registry
image blobs) — watch the number.
- **Quota math:** the failure signature is a provider-side rejection while the
account is at its effective ceiling, not necessarily a large latest run. Current
run size is ~1.06–1.22 GB after the registry was excluded (`enableBackup=false`),
and 48 h retention keeps ~5 runs (5.72 GB). One scheduled run fits in the remaining
headroom; the next fails. Never size the plan from the retained set — 2026-11-21
rejected a 1 MB PUT at 23.70 GB actual usage.
- **Two boxes on one S3 bucket interleave and prune each other's backups.** The
old box's schedule must stay **disabled** while it is kept for rollback.
- **Cross-check `siteId` per run:** runs on an old site id are pre-migration