feat: test a database backup without touching the install
CI and images / lint (push) Successful in 2s
CI and images / extension-version (push) Successful in 2s
CI and images / frontend-build (push) Successful in 22s
CI and images / extension-test (push) Successful in 24s
CI and images / backend-lint-and-test (push) Failing after 47s
CI and images / integration (push) Failing after 2m42s
CI and images / sign-extension (push) Skipped
CI and images / build-web (push) Skipped
CI and images / smoke-web (push) Skipped
CI and images / promote (push) Skipped
CI and images / refresh-dev (push) Skipped
CI and images / unattended-failure (push) Skipped
CI and images / build-agent (push) Skipped
CI and images / lint (push) Successful in 2s
CI and images / extension-version (push) Successful in 2s
CI and images / frontend-build (push) Successful in 22s
CI and images / extension-test (push) Successful in 24s
CI and images / backend-lint-and-test (push) Failing after 47s
CI and images / integration (push) Failing after 2m42s
CI and images / sign-extension (push) Skipped
CI and images / build-web (push) Skipped
CI and images / smoke-web (push) Skipped
CI and images / promote (push) Skipped
CI and images / refresh-dev (push) Skipped
CI and images / unattended-failure (push) Skipped
CI and images / build-agent (push) Skipped
"Test a backup" on the Backups card loads a dump into a separate, temporary database on the same Postgres server, the same way a restore does, checks every table against the row counts recorded with the dump, brings the copy up to this version, and drops it. The live database is only read. Every dump now records its row counts, read in the snapshot pg_dump dumps from (pg_export_snapshot + --snapshot), so the comparison is exact. Off-site the counts sit beside the dump as <name>.counts.json; locally they go in the manifest file. A dump taken before this is compared with the live database instead. A test cut off by a restart is ended, and its database dropped, when the long maintenance lane starts. A test doesn't block backups; a restore and a second test wait for it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -197,6 +197,14 @@ goes again in the next run. When the newest database backup is more than a day
|
||||
old or failed, or the check found files missing, the **Backups** row on
|
||||
**Settings → System** and the dot beside the brand turn amber and say why.
|
||||
|
||||
**Test a backup** proves a dump restores without touching your install: the dump
|
||||
is loaded into a separate, temporary database on the same Postgres server,
|
||||
every table is checked against the row counts recorded as the dump was taken,
|
||||
the copy is brought up to this version, and then it is deleted. It needs about
|
||||
as much free space on the database's disk as the database itself, while it
|
||||
runs. A dump taken before counts were recorded is shown beside the live
|
||||
database instead.
|
||||
|
||||
To rebuild after losing the server, start a fresh install (first boot as
|
||||
above), enter the same destination, and under **Restore from the bucket** choose
|
||||
a dump. The database is replaced, then every file is fetched back to its place
|
||||
|
||||
Reference in New Issue
Block a user