Persist dashboard backup metrics separately

This commit is contained in:
Mikei386
2026-07-13 20:39:31 +02:00
parent 2ecdcdf602
commit b1fba3ed16
15 changed files with 183 additions and 14 deletions
+17
View File
@@ -173,6 +173,23 @@ type Run struct {
Restore *RestoreTask `json:"restore,omitempty"`
}
// BackupMetric is the durable, compact source for dashboard history. It is
// intentionally stored separately from Run so clearing activity history does
// not erase the backup charts.
type BackupMetric struct {
SchemaVersion int `json:"schemaVersion"`
RunID string `json:"runId"`
JobID string `json:"jobId"`
SnapshotID string `json:"snapshotId,omitempty"`
FinishedAt time.Time `json:"finishedAt"`
Status string `json:"status"`
BytesProcessed int64 `json:"bytesProcessed"`
FilesProcessed int64 `json:"filesProcessed"`
BytesAdded int64 `json:"bytesAdded,omitempty"`
FilesNew int64 `json:"filesNew,omitempty"`
FilesChanged int64 `json:"filesChanged,omitempty"`
}
type RestoreTask struct {
SchemaVersion int `json:"schemaVersion"`
ID string `json:"id"`