Duplicati: know when a backup failed or has gone quiet

Duplicati reports each operation to a secret address (its own send-http-url option), so
nothing calls Duplicati and no password for it is kept. Each machine is a source; each job
is learned by name and shows its last result, duration, size, changes and a history.
A failed run is a warning (critical from the second in a row); one that has not succeeded
for longer than expected (per job, 2 days by default) is a warning, critical at three
times that. Maintenance on the machine's server silences them; /metrics series added.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
bobbanandClaude Sonnet 5.5 committed 2026-10-24 21:36:13 +02:00
1 parent 12f2662465
commit 2f082ca5c2
23 files changed
+8047 -4

No files matched your search

+64
View File
@@ -1195,6 +1195,62 @@ export interface MonthlyReport {
}
/** A check the app could set up for you, from what it already knows. */
/** A backup job Duplicati reported, as the page shows it. */
export interface DuplicatiBackup {
id: number;
sourceId: number;
sourceName: string;
name: string;
state: "ok" | "warning" | "failed" | "stale";
/** What is wrong, in a sentence, when something is. */
problem: string | null;
lastReportAt: string | null;
lastResult: string | null;
lastSuccessAt: string | null;
durationSeconds: number | null;
examinedFiles: number | null;
sizeBytes: number | null;
addedFiles: number | null;
modifiedFiles: number | null;
deletedFiles: number | null;
warnings: number;
errors: number;
message: string | null;
consecutiveFailures: number;
expectedHours: number;
alert: boolean;
}
export interface DuplicatiSource {
id: number;
name: string;
tokenPrefix: string;
serverId: number | null;
serverName: string | null;
createdBy: string | null;
createdAt: string;
lastReportAt: string | null;
backups: number;
}
export interface DuplicatiOverview {
sources: DuplicatiSource[];
backups: DuplicatiBackup[];
servers: { id: number; name: string }[];
defaultExpectedHours: number;
}
export interface DuplicatiRun {
id: number;
at: string;
result: string;
durationSeconds: number | null;
sizeBytes: number | null;
filesChanged: number | null;
warnings: number;
errors: number;
}
export interface EndpointSuggestion {
key: string;
kind: "http" | "tls";
@@ -2580,6 +2636,14 @@ export const api = {
create: (label: string) => request<{ token: MetricsToken; secret: string }>("/api/metrics-tokens", { method: "POST", body: JSON.stringify({ label }) }),
remove: (id: number) => request<void>(`/api/metrics-tokens/${id}`, { method: "DELETE" }),
},
duplicati: {
overview: () => request<DuplicatiOverview>("/api/duplicati"),
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 }) => 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: {
get: () => request<AwayView>("/api/away"),
start: (data: { until: string; from?: string | null; criticalThrough: boolean; note?: string }) => request<AwayView>("/api/away", { method: "PUT", body: JSON.stringify(data) }),