Duplicati: flag warnings run after run, and forecast how much room backups take

A job whose last three runs in a row all finished with warnings is flagged and
raises an alert (on by default, switchable off per job). The size of the
destination, and its quota where the storage says, are read from the reports
and kept with each run; the Stored column shows the growth and, where the room
is known, when it will be full, with an alert inside the disk-forecast window.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
bobbanandClaude Sonnet 5.5 committed 2026-11-12 23:19:54 +01:00
1 parent 333146e8e3
commit 4f077d4f4a
15 files changed
+10115 -14

No files matched your search

+4
View File
@@ -1770,6 +1770,9 @@ export const duplicatiBackups = sqliteTable(
message: text("message"), // the first error, or warning
warningMessages: text("warning_messages"), // JSON string[]: what the last run's warnings said (up to 20); null: none
alertWarnings: integer("alert_warnings", { mode: "boolean" }).notNull().default(false), // raise an alert when the last run finished with warnings
warnStreakAlert: integer("warn_streak_alert", { mode: "boolean" }).notNull().default(true), // raise an alert when the last few runs in a row all finished with warnings
destinationBytes: integer("destination_bytes"), // how much the backup takes up where it is kept (Duplicati's KnownFileSize); null: not said
quotaBytes: integer("quota_bytes"), // the room the destination has, when its kind of storage says (TotalQuotaSpace); null: not said
lastSuccessAt: text("last_success_at"), // ISO; a backup with warnings still counts
consecutiveFailures: integer("consecutive_failures").notNull().default(0),
expectedHours: integer("expected_hours").notNull().default(48),
@@ -1797,6 +1800,7 @@ export const duplicatiRuns = sqliteTable(
warnings: integer("warnings").notNull().default(0),
errors: integer("errors").notNull().default(0),
warningMessages: text("warning_messages"), // JSON string[]: what this run's warnings said (up to 20); null: none
destinationBytes: integer("destination_bytes"), // how much the backup took up where it is kept after this run; null: not said
},
(t) => [index("duplicati_runs_idx").on(t.backupId, t.at)],
);