admin: backup logs via parameters.php, nextcloud secondary backup

- surface backup/cleanup cron logs + backup freshness status
- email xamxam@erg.be when SQLite backups go stale (backup watchdog)
- sync SQLite snapshots to Nextcloud WebDAV + remote-freshness watchdog
- precise retention pruning, manual sync in check recipe, and Nextcloud-sync docs
This commit is contained in:
Pontoporeia
2026-08-24 11:34:57 +02:00
parent 3e721b19f0
commit fb5e856288
12 changed files with 823 additions and 35 deletions
+4
View File
@@ -7,6 +7,10 @@
- [x] Fix language metadata link using wrong `query=` param instead of dedicated `language=` filter
- [x] Sort TFE files by display category on public page (note d'intention → TFE → image → video → audio → website → annexes)
- [x] Fix CSV import: VALUES had 24 ? placeholders but execute array has 23 values → 27 total for 26 columns
- [x] Surface backup/cleanup cron logs in the admin system log viewer: add `backup` + `cleanup` channels to SystemController::LOG_FILES (date-in-filename resolution), friendly empty-state for cron channels, and a `Sauvegardes SQLite` freshness status check in the system status grid
- [x] Add backup watchdog: email xamxam@erg.be (or notify_email) when SQLite backups go stale — `scripts/backup-watchdog.php` (read-only, state-file anti-flood) + cron entry + justfile deploy wiring
- [x] Add Nextcloud WebDAV sync: push latest SQLite snapshot to cloud.erg.school `/XAMXAM-BCK` (PHP curl, reuses SMTP creds, timestamped + keep 7) — `scripts/nextcloud-sync.php` + cron + justfile wiring; extend watchdog to also alert on stale/missing remote copy
- [x] Fix backup retention: replace `find -mtime +N` (off-by-one day rounding) with deterministic filename-timestamp pruning; add manual `sync=1` option to `just deploy-check-backup-log`
- [x] Add custom 404 page: render through layout with dedicated not-found.css, register in build, return HTTP 404
- [x] Remove "Mo" option from duration — keep only minutes and pages
- [x] Combine pages and minutes as separate fields (both can be set simultaneously)