Skip to content

Provide verified backups and isolated restore checks - #95

Merged
obsessixnv merged 3 commits into
mainfrom
feat/50-verified-backups
Sep 15, 2026
Merged

obsessixnv merged 3 commits into
mainfrom
feat/50-verified-backups

Conversation

@obsessixnv

@obsessixnv obsessixnv commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

pages backup and pages check-integrity previously exited as stubs. Backup now captures the installed release, database, resolved assets and recovery configuration, restores them into a private temporary PostgreSQL cluster, and publishes a completed directory only after verification succeeds. Check-integrity verifies the manifest and repeats that restore rehearsal.

The manifest records file hashes, database counts and migrations from the restored snapshot. Verification covers all immutable source hashes and referenced asset bytes, pointer ownership, schema readiness, and representative HTTP page, version, template and portal/member reads using the captured application code. It preserves legitimate published drafts, retired records and portal home fallbacks.

Capture shares the updater's lock, preserves peer authentication and configured paths, detects configuration changes, and never pauses the service or mutates source rows. Rehearsals clear database overrides, use synthetic secrets and Unix sockets, apply no migrations, and retain scratch storage if shutdown cannot be confirmed. Documentation covers recovery, storage, scheduling and required PostgreSQL tools.

Validation: 277 unit tests, 298 browser tests and the full integration suite pass on the combined P3 branch. Real backup fixtures cover pinned templates, drafts, disabled/retired content, portals and content-addressed assets; failures cover corrupt artifacts, missing secrets, update contention, invalid publication pointers and interrupted PostgreSQL startup. Dependency audit and shell syntax pass. All supported-Node CI jobs and CodeQL passed, including unprivileged restore checks. Independent review found no remaining blockers.

Closes #50.

@obsessixnv obsessixnv added enhancement New feature or request audit:2026-09-14 Functional and reliability audit of commit 420bad8; cybersecurity excluded. priority:P3 Low: usability or operational improvement. size:L Large: roughly 4+ engineering days or migration/rollout work. area:operations Pages operations functionality and maintenance. labels Sep 15, 2026
}

function run(command, args, env, timeout = 180000) {
const result = spawnSync(command, args, { cwd: ROOT, env, encoding: "utf8", timeout });
@obsessixnv
obsessixnv merged commit ab97c5e into main Sep 15, 2026
5 checks passed
@obsessixnv
obsessixnv deleted the feat/50-verified-backups branch September 15, 2026 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:operations Pages operations functionality and maintenance. audit:2026-09-14 Functional and reliability audit of commit 420bad8; cybersecurity excluded. enhancement New feature or request priority:P3 Low: usability or operational improvement. size:L Large: roughly 4+ engineering days or migration/rollout work.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[P3] Provide a working backup command with a reproducible restore check

2 participants