Provide verified backups and isolated restore checks - #95
Merged
Merged
Conversation
| } | ||
|
|
||
| function run(command, args, env, timeout = 180000) { | ||
| const result = spawnSync(command, args, { cwd: ROOT, env, encoding: "utf8", timeout }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pages backupandpages check-integritypreviously 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.