feat(lab-health): alert on stale backups (backup step 10) #45

Merged
adam merged 1 commit from feat/scan-backup-checks into main 2026-10-24 21:12:15 -05:00
Owner

Backup step 10, the last one: scan.py now warns when a backup goes stale. Step 0 (backups) is complete.

New checks in the backups group:

  • backup.dumps: reads dumps/latest/STATUS over SSH. Flags failures != none, and age > 26 h (amber) / > 50 h (red).
  • backup.ha: the newest *.tar in backups/homeassistant, with the same age limits. Red if there are none.
  • backup.snapshot: Backrest GetOperations API for plan foundry (basic auth with the backrest_ui_* creds already in 1Password). Flags the newest backup if it failed, and the age of the last success.
  • backup.flash: the git copy of the flash drive drops to info, because /boot/config is already in every nightly snapshot.

Each part reports on its own, so if SSH fails the snapshot check still runs, and vice versa.

Tested: all green on live state (1.6 s). Mutation runs fire every path: tiny threshold → amber dump, missing HA dir → red, wrong plan → red, missing STATUS → red, bad password → amber scan.backups.

Docs: lab-health skill table + triage rows, backups.md step 10 ✅, and rebuild.md with step 0 ✅ and NEXT = step 1 (lane rule).

🤖 Generated with Claude Code

Backup step 10, the last one: `scan.py` now warns when a backup goes stale. **Step 0 (backups) is complete.** New checks in the `backups` group: - `backup.dumps`: reads `dumps/latest/STATUS` over SSH. Flags `failures != none`, and age > 26 h (amber) / > 50 h (red). - `backup.ha`: the newest `*.tar` in `backups/homeassistant`, with the same age limits. Red if there are none. - `backup.snapshot`: Backrest `GetOperations` API for plan `foundry` (basic auth with the `backrest_ui_*` creds already in 1Password). Flags the newest backup if it failed, and the age of the last success. - `backup.flash`: the git copy of the flash drive drops to **info**, because `/boot/config` is already in every nightly snapshot. Each part reports on its own, so if SSH fails the snapshot check still runs, and vice versa. **Tested:** all green on live state (1.6 s). Mutation runs fire every path: tiny threshold → amber dump, missing HA dir → red, wrong plan → red, missing STATUS → red, bad password → amber `scan.backups`. Docs: lab-health skill table + triage rows, `backups.md` step 10 ✅, and `rebuild.md` with step 0 ✅ and NEXT = step 1 (lane rule). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The backups group now checks the nightly-dumps STATUS (age +
failures), the newest Home Assistant backup on the share, and the
newest successful Backrest snapshot via its GetOperations API.
Amber after 26 h, red after 50 h. The flash-in-git check drops to
info, since /boot/config rides in the nightly snapshot. Each part
reports on its own so one broken surface can't hide the others.

Closes backup step 0 in the rebuild tracker; NEXT is step 1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
adam merged commit f697e16eb1 into main 2026-10-24 21:12:15 -05:00
Sign in to join this conversation.
No reviewers
No labels
lab-honing
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
adam/foundry!45
No description provided.