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

The db service dumped the DB on backup (pg_dump pre-hook) but shipped no
restore hook, and a file-level restore does not reload into the running
postgres, so a restored backup silently kept the live (un-restored) state.
Add pg_backup.sh (backup=pg_dump|gzip into the postgresql_data volume;
restore=terminate conns + DROP DATABASE WITH FORCE + createdb + reimport),
mount it via a config, and wire the backupbot backup/restore hooks. Same
fix as the immich / mattermost-lts / ghost recipes.
This commit is contained in:
autonomic-bot
2026-05-30 14:03:18 +00:00
parent 7b7ddd70bc
commit c8ba2e4e2b
4 changed files with 47 additions and 4 deletions

View File

@ -19,3 +19,5 @@ LETS_ENCRYPT_ENV=production
#SECRET_SMTP_PASSWORD_VERSION=v1
SECRET_DB_PASSWORD_VERSION=v1
# APP_START_PERIOD=5m # healthcheck start_period; raise on slow hosts (cc-ci sets larger for Rails cold boot)