v0.142.0: offsite repo continuity — orphaned-repo guard (A) + run-status auto-refresh (C)
- Part A: classify restic cat-config failure (wrong-password=orphaned vs no-repo vs other); ORPHANED state + Hungarian card + offbox_repo_orphaned/reset events (once, not nightly); reset = move-aside (never delete) + init, unclaimed auto / claimed confirm. Red-proofs TestOffbox_OrphanDetection_* + ConfirmedReset. - Part C: GET /backup/offbox/status + poll on backups_remote → flips Fut→Rendben/Hiba without manual reload.
This commit is contained in:
@@ -588,6 +588,18 @@ func main() {
|
||||
"A(z) %s teljes távoli mentése (~%s) túllépné a tárhelykeretet (%d/%d GB). A konfiguráció és az adatbázis továbbra is mentésre kerül; nagyobb kerethez vedd fel velünk a kapcsolatot.",
|
||||
stack, appbackup.HumanizeBytes(estBytes), usedGB, quotaGB))
|
||||
})
|
||||
// v0.142.0 offsite-repo continuity: push a hub event on the orphaned/reset transitions (once per
|
||||
// transition — the Manager guards nightly re-fire). Operator-visible on the customer page.
|
||||
backupMgr.SetOffboxOrphanEvent(func(eventType, renamedTo string) {
|
||||
switch eventType {
|
||||
case "offbox_repo_orphaned":
|
||||
notifier.PushEvent("offbox_repo_orphaned", "warning",
|
||||
"A távoli mentési tároló elárvult: a benne lévő mentések egy korábbi, már nem elérhető kulccsal készültek (újratelepítés). Új mentés a tároló visszaállításáig nem készül.", nil)
|
||||
case "offbox_repo_reset":
|
||||
notifier.PushEvent("offbox_repo_reset", "info",
|
||||
"A távoli mentési tároló visszaállítva: a régi előzmény félretéve (nem törölve), és egy üres, új tároló jött létre a mostani kulccsal.", map[string]string{"renamed_to": renamedTo})
|
||||
}
|
||||
})
|
||||
sched.Daily("offbox-backup", "04:15", func(ctx context.Context) error {
|
||||
t := sett.GetOffboxTarget()
|
||||
if t == nil || !t.Enabled || t.Schedule != "daily" || !backupMgr.OffboxConfigured() {
|
||||
|
||||
Reference in New Issue
Block a user