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

+16 -1
View File
@@ -2178,6 +2178,15 @@ export interface DuplicatiBackup {
alert: boolean;
/** Raise an alert when the last run finished with warnings. */
alertWarnings: boolean;
/** Raise an alert when the last few runs in a row all finished with warnings. */
warnStreakAlert: boolean;
/** How many of the newest runs in a row finished with warnings. */
warningStreak: number;
/** How much the backups take up where they are kept, and the room there when its storage says; null: the reports do not say. */
destinationBytes: number | null;
quotaBytes: number | null;
/** How that has grown (null without enough history); daysToFull only where the room is known. */
growth: { perDay: number; perMonth: number; fit: number; spanDays: number; latest: number; daysToFull: number | null } | null;
}
export interface DuplicatiSource {
@@ -2209,6 +2218,10 @@ export interface DuplicatiOverview {
backups: DuplicatiBackup[];
servers: { id: number; name: string }[];
defaultExpectedHours: number;
/** How many runs in a row with warnings is flagged. */
streakRuns: number;
/** How many days ahead a filling destination is flagged (the disk forecast window; 0 = off). */
forecastDays: number;
}
export interface DuplicatiRun {
@@ -2222,6 +2235,8 @@ export interface DuplicatiRun {
errors: number;
/** What this run's warnings said (up to 20). */
warningMessages: string[];
/** How much the backups took up where they are kept after this run, when the report said. */
destinationBytes: number | null;
}
export interface EndpointSuggestion {
@@ -3784,7 +3799,7 @@ export const api = {
runs: (backupId: number) => request<{ backup: { id: number; name: string }; runs: DuplicatiRun[] }>(`/api/duplicati/backups/${backupId}/runs`),
addSource: (data: { name: string; serverId: number | null }) => request<{ source: DuplicatiSource; token: string; path: string }>("/api/duplicati/sources", { method: "POST", body: JSON.stringify(data) }),
removeSource: (id: number) => request<void>(`/api/duplicati/sources/${id}`, { method: "DELETE" }),
updateBackup: (id: number, data: { expectedHours?: number; alert?: boolean; alertWarnings?: boolean }) => request<{ ok: boolean }>(`/api/duplicati/backups/${id}`, { method: "PATCH", body: JSON.stringify(data) }),
updateBackup: (id: number, data: { expectedHours?: number; alert?: boolean; alertWarnings?: boolean; warnStreakAlert?: boolean }) => request<{ ok: boolean }>(`/api/duplicati/backups/${id}`, { method: "PATCH", body: JSON.stringify(data) }),
forgetBackup: (id: number) => request<void>(`/api/duplicati/backups/${id}`, { method: "DELETE" }),
},
away: {