Files
panel/controller/internal/db/migrations/005_backups.sql
T
dbledeez 4ccccc6fe2 panel v0.9.2 — public release
Self-hostable game server control panel: Go controller + agent, 26 game
modules, embedded web UI. One-line install via install.sh / install.ps1.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-15 00:43:35 -07:00

19 lines
772 B
SQL

-- 005_backups.sql — instance backups (tar.gz of volumes).
--
-- The agent writes the archive to disk under its --backup-dir and
-- reports back path + size. Controller persists the row so operators
-- can list / restore / delete later.
CREATE TABLE backups (
id TEXT PRIMARY KEY, -- bkp_<hex16>
instance_id TEXT NOT NULL,
agent_id TEXT NOT NULL,
path TEXT NOT NULL, -- absolute path on the agent
size_bytes BIGINT NOT NULL DEFAULT 0,
description TEXT NOT NULL DEFAULT '',
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);
CREATE INDEX idx_backups_instance ON backups(instance_id);
CREATE INDEX idx_backups_created ON backups(created_at DESC);