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>
13 lines
495 B
SQL
13 lines
495 B
SQL
-- 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
|
|
);
|