feat(sv): Backups card — offsite DR status (Core-4 -> Farm) + /api/backups (2.6.0)
migration 026 backup_runs; POST ingest (owner) from offsite-backup.sh, GET for the Sacred Valley card showing last run, per-guest sizes, Farm free, schedule. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
12
lib/db/migrations/026_backup_runs.sql
Normal file
12
lib/db/migrations/026_backup_runs.sql
Normal file
@@ -0,0 +1,12 @@
|
||||
-- 026_backup_runs.sql
|
||||
-- Offsite DR backup run history, fed by /usr/local/bin/offsite-backup.sh on CT 300
|
||||
-- (Core-4 vzdump -> Farm/Won). Powers the Sacred Valley "Backups" card.
|
||||
CREATE TABLE IF NOT EXISTS backup_runs (
|
||||
id serial PRIMARY KEY,
|
||||
ran_at timestamptz NOT NULL DEFAULT now(),
|
||||
ok boolean NOT NULL DEFAULT true,
|
||||
total_bytes bigint,
|
||||
won_free_bytes bigint,
|
||||
guests jsonb, -- [{vmid,name,bytes}]
|
||||
duration_sec integer
|
||||
);
|
||||
Reference in New Issue
Block a user