Backup-Heartbeat: boka infrastructure backup monitoren #2

Open
opened 2026-08-22 16:03:57 +02:00 by froxxxy · 0 comments
Owner

Kontext

Seit 2026-08-22 läuft auf boka ein tägliches rclone-Backup der Infrastruktur-Daten nach Backblaze B2 (Bucket boka-infrastructure, root cron, Log /var/log/boka-backup.log). Details: froxxxy/server Issue #9 + docs/BACKUP.md.

Fehlerfall meldet das Skript selbst per ntfy. Was fehlt: der Dead-Man-Check — wenn der Cron still stirbt (rclone kaputt, B2-Key abgelaufen, Disk voll), merkt es niemand.

Aufgabe

monitor.php erweitert um einen Heartbeat-Check:

  1. boka push-status.sh sendet im Payload zusätzlich: backup_last_run (mtime von /var/log/boka-backup.log oder Timestamp der letzten "Backup complete"-Zeile) und backup_status (ok/fail)
  2. monitor.php Alarm-Regel: backup_last_run älter als 26h → Warnmail
  3. Anzeige unter /monitor/: backup: last run X h ago · ok

Hinweise

  • Push-Skript-Änderung passiert im server-Repo (~/server/scripts/push-status.sh auf boka) — API-Änderung am Ingest zuerst hier rückwärtskompatibel akzeptieren
  • Keine Bucket-Namen, Keys oder Pfade in öffentlichem HTML — /monitor/ bleibt noindex, aber trotzdem nur Status, keine Details
## Kontext Seit 2026-08-22 läuft auf boka ein tägliches rclone-Backup der Infrastruktur-Daten nach Backblaze B2 (Bucket `boka-infrastructure`, root cron, Log `/var/log/boka-backup.log`). Details: froxxxy/server Issue #9 + `docs/BACKUP.md`. Fehlerfall meldet das Skript selbst per ntfy. Was fehlt: der **Dead-Man-Check** — wenn der Cron still stirbt (rclone kaputt, B2-Key abgelaufen, Disk voll), merkt es niemand. ## Aufgabe `monitor.php` erweitert um einen Heartbeat-Check: 1. boka `push-status.sh` sendet im Payload zusätzlich: `backup_last_run` (mtime von `/var/log/boka-backup.log` oder Timestamp der letzten "Backup complete"-Zeile) und `backup_status` (ok/fail) 2. monitor.php Alarm-Regel: `backup_last_run` älter als 26h → Warnmail 3. Anzeige unter `/monitor/`: `backup: last run X h ago · ok` ## Hinweise - Push-Skript-Änderung passiert im server-Repo (`~/server/scripts/push-status.sh` auf boka) — API-Änderung am Ingest zuerst hier rückwärtskompatibel akzeptieren - Keine Bucket-Namen, Keys oder Pfade in öffentlichem HTML — `/monitor/` bleibt noindex, aber trotzdem nur Status, keine Details
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: froxxxy/0012#2