fix(backup): reimport the postgres dump on restore (restore was a no-op) #1

Open
autonomic-bot wants to merge 1 commits from ci/pg-restore into main

The recipe dumped the DB on backup but shipped no backupbot.restore.post-hook, and archived the whole live PGDATA dir — so a restore extracted files under the running postgres without reloading them, silently keeping the un-restored state. A restored backup lost all data since the snapshot. Switches to the coop-cloud /pg_backup.sh convention (as matrix-synapse): backup = pg_dump|gzip; restore = terminate connections, FORCE-drop, recreate, reimport. Caught + validated by the cc-ci recipe CI loop (a seeded marker now survives backup→restore).

The recipe dumped the DB on backup but shipped no `backupbot.restore.post-hook`, and archived the whole live PGDATA dir — so a restore extracted files under the running postgres without reloading them, silently keeping the un-restored state. A restored backup lost all data since the snapshot. Switches to the coop-cloud `/pg_backup.sh` convention (as matrix-synapse): backup = pg_dump|gzip; restore = terminate connections, FORCE-drop, recreate, reimport. Caught + validated by the cc-ci recipe CI loop (a seeded marker now survives backup→restore).
autonomic-bot added 1 commit 2026-05-30 00:38:54 +00:00
fix(backup): reimport the postgres dump on restore (restore was a no-op)
All checks were successful
cc-ci/testme cc-ci: success
4ca7f4182d
The recipe dumped the DB on backup but shipped NO backupbot.restore.post-hook, and
archived the whole live PGDATA dir — so a restore extracted files under the running
postgres without reloading them, silently keeping the un-restored (live) state. A
restored backup therefore lost all data written since the snapshot.

Switch to the coop-cloud /pg_backup.sh convention (as matrix-synapse): backup =
pg_dump|gzip -> backup.sql; restore = terminate connections, FORCE-drop, recreate,
reimport the dump deterministically. Archive just backup.sql, not the whole PGDATA dir.
Author
Owner

@notplants — flagging this open PR from the cc-ci build for your review. Per the updated mirror workflow we no longer auto-close superseded/unrelated PRs, so it's left open for you to merge or close at your discretion.

@notplants — flagging this open PR from the cc-ci build for your review. Per the updated mirror workflow we no longer auto-close superseded/unrelated PRs, so it's left open for you to merge or close at your discretion.
Author
Owner

!testme

!testme
Author
Owner

🌻 cc-cimattermost-lts @ 4ca7f418 passed

cc-ci result card

level

full logs · dashboard

<!-- cc-ci:testme --> 🌻 **cc-ci** — `mattermost-lts` @ `4ca7f418` ✅ **passed** [![cc-ci result card](https://ci.commoninternet.net/runs/901/summary.png)](https://drone.ci.commoninternet.net/recipe-maintainers/cc-ci/901) [![level](https://ci.commoninternet.net/runs/901/badge.svg)](https://drone.ci.commoninternet.net/recipe-maintainers/cc-ci/901) [full logs](https://drone.ci.commoninternet.net/recipe-maintainers/cc-ci/901) · [dashboard](https://ci.commoninternet.net/)
All checks were successful
cc-ci/testme cc-ci: success
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin ci/pg-restore:ci/pg-restore
git checkout ci/pg-restore
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: recipe-maintainers/mattermost-lts#1
No description provided.