fix(backup): back up the postgres database (was unprotected)
Some checks failed
cc-ci/testme cc-ci: failure

The immich recipe declared backupbot.backup only on the app service (whose volumes
are all excluded), so the postgres database — all of immich users metadata, albums,
people, settings — was NOT backed up at all. Restoring a backup yielded an empty DB.

Add a database-service postgres backup mirroring the coop-cloud convention
(matrix-synapse, keycloak, ...): a /pg_backup.sh config-mounted hook driven by
backupbot pre/restore hooks. backup = pg_dump | gzip -> backup.sql in the postgres
volume; restore = terminate immich-server connections, FORCE-drop, recreate, reimport
(the VectorChord/pgvecto.rs extensions and all data round-trip cleanly).
This commit is contained in:
autonomic-bot
2026-05-29 22:56:10 +00:00
parent 7eb3937a82
commit a846cf38dc
3 changed files with 49 additions and 0 deletions

1
abra.sh Normal file
View File

@ -0,0 +1 @@
export PG_BACKUP_VERSION=v1