diff --git a/CHANGELOG.md b/CHANGELOG.md index 1bc9fe5..9b873a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,31 @@ ## Changelog +### v0.46.0 — fix: /backups 500 (template referenced disk-tier fields stripped in 8C) (2026-06-12) + +`GET /backups` returned **HTTP 500**. Root cause (from the live log, not guessed): +`backups.html:64: executing "backups" at <.Backup.RepoStats>: can't evaluate field RepoStats in type +interface {}`. The 8C de-privileging slimmed `FullBackupStatus` to **app-data only** (DB dumps + +Docker-volume tars; the disk-tier restic/cross-drive backup moved to the host agent), but +`backups.html` still carried the full pre-8C restic UI. It referenced `.Backup.X` struct fields that no +longer exist: `RepoStats, LastBackup, ResticSchedule, NextBackup, PruneSchedule, Retention, +SnapshotHistory, LastCheckTime, LastCheckOK`. While those fields existed-but-nil, `{{if .Backup.X}}` +short-circuited safely; once the fields were *removed from the struct*, the field access itself errors → +500. (Not a panic, not a funcmap/nil-subfield issue; root-level map keys like `.PerDriveRepoStats` are +map lookups → nil on miss → safe, and the `Tier1*/Tier2*` fields are on `AppBackupRows`, still supplied.) + +Fix — removed the dead disk-tier UI from `backups.html`, keeping the app-data backup view: +- Section 0 storage-stats: dropped "Mentési tároló" + "Pillanatképek" (RepoStats); kept "DB mentések". +- Section 1 cards: the status card now keys on `.Backup.LastDBDump` (was `.Backup.LastBackup`); removed + the "Tároló méret" card. +- Section 2 schedule: removed the "Restic pillanatkép" + "Karbantartás" rows and the + restic-last-backup/retention summary; kept the DB-dump schedule + a DB-dump last-run summary. +- Section 5 "Pillanatképek" (restic snapshot history): removed entirely. +- Section 6 "1. szint" tier: removed the per-drive/repo-stats + integrity rows (relabeled "(restic)" → + "(adatbázis + konfiguráció)"); kept the DB-dump-count row. + +No Go change (`FullBackupStatus` was already correct); template-only. `settings.html`'s `.ResticSchedule`/ +`.LastCheckTime` are unaffected — they're root-map lookups (nil-safe), not struct-field access. + ### v0.45.0 — storage UX polish: deterministic order, init filter, register shortcut, system-storage clarity (2026-06-12) Builds on v0.44.0's role-aware drive management. Pairs with felhom-agent v0.24.0 (the eject role-gate diff --git a/controller/internal/web/templates/backups.html b/controller/internal/web/templates/backups.html index d9fe375..55a90a2 100644 --- a/controller/internal/web/templates/backups.html +++ b/controller/internal/web/templates/backups.html @@ -61,42 +61,32 @@ {{end}}
- {{if .Backup.RepoStats}} -
- Mentési tároló - {{.Backup.RepoStats.TotalSize}} -
- {{end}}
DB mentések {{if .Backup.DumpFiles}}{{len .Backup.DumpFiles}} fájl{{else}}–{{end}}
-
- Pillanatképek - {{if .Backup.RepoStats}}{{.Backup.RepoStats.SnapshotCount}}{{else}}0{{end}} -
- {{if .Backup.LastBackup}} - {{if .Backup.LastBackup.Success}} + {{if .Backup.LastDBDump}} + {{if .Backup.LastDBDump.Success}}
-
Helyi mentés aktív
+
Adatmentés aktív
{{else}}
-
Helyi mentés sikertelen
+
Adatmentés sikertelen
{{end}} {{else}}
-
Helyi mentés
+
Adatmentés
{{end}} @@ -111,15 +101,6 @@
Adatbázis mentve
- -
-
- {{if .Backup.RepoStats}}{{.Backup.RepoStats.TotalSize}}{{else}}–{{end}} -
-
Tároló méret - {{if .Backup.RepoStats}}
{{.Backup.RepoStats.SnapshotCount}} pillanatkép{{end}} -
-
@@ -131,37 +112,19 @@ {{.Backup.DBDumpSchedule}} Következő: {{nextRunLabel .Backup.NextDBDump}} -
- Restic pillanatkép - {{.Backup.ResticSchedule}} - Következő: {{nextRunLabel .Backup.NextBackup}} -
-
- Karbantartás - {{pruneLabel .Backup.PruneSchedule}} - Következő: {{nextPruneLabel .Backup.PruneSchedule}} -
- {{if .Backup.LastBackup}} + {{if .Backup.LastDBDump}}
- Utolsó sikeres mentés: - {{fmtTime .Backup.LastBackup.LastRun}} ({{timeAgo .Backup.LastBackup.LastRun}}) -
-
- Mentés időtartam: - {{fmtDuration .Backup.LastBackup.Duration}} + Utolsó adatbázis mentés: + {{fmtTime .Backup.LastDBDump.LastRun}} ({{timeAgo .Backup.LastDBDump.LastRun}})
{{else}}
- Utolsó sikeres mentés: + Utolsó adatbázis mentés: Még nem futott
{{end}} -
- Megőrzés: - {{.Backup.Retention.KeepDaily}} napi · {{.Backup.Retention.KeepWeekly}} heti · {{.Backup.Retention.KeepMonthly}} havi -