Fix backup/restore #14

Merged
notplants merged 4 commits from fix-restore into main 2026-06-15 17:33:39 +00:00
Owner

I have been using Salami (some call it llm) to make automated tests to test backup and restore for co-op cloud recipes (more info on this coming soon), and have been finding some bugs in backup/restore that don't actually work and probably have not been tested

this recipe was one of them. before the fix, the restore was appearing to restore but was I believe a silent no-op. this PR has a fix for it (based on pg_backup.sh of other recipes, with one additional safeguard of killing any live connections to the database before doing the database recreate)

notes:

  • also increased postgres version (I wanted to use pgautoupgrade, but it looks like the bitnami image bundles a plugin that requires pgvector as the database... and couldn't find a version of pgautoupgrade that also had pgvector without a custom image... so including pgvector as the image and using the homegrown auto-upgrader seems like the easiest path for now... until perhaps in a future PR switching to a non-bitnami image)
  • also increased start_period for healthcheck to make automated tests easier
  • https://hub.docker.com/r/bitnami/discourse now requires a paid subscription. this PR switches to use https://hub.docker.com/r/bitnamilegacy/discourse, which also says it will no longer be updated.
    ... probably we should switch to using https://github.com/discourse/discourse_docker published somewhere else... but will save that for another PR as this was a few other bits
I have been using Salami (some call it llm) to make automated tests to test backup and restore for co-op cloud recipes (more info on this coming soon), and have been finding some bugs in backup/restore that don't actually work and probably have not been tested this recipe was one of them. before the fix, the restore was appearing to restore but was I believe a silent no-op. this PR has a fix for it (based on pg_backup.sh of other recipes, with one additional safeguard of killing any live connections to the database before doing the database recreate) notes: - also increased postgres version (I wanted to use pgautoupgrade, but it looks like the bitnami image bundles a plugin that requires pgvector as the database... and couldn't find a version of pgautoupgrade that also had pgvector without a custom image... so including pgvector as the image and using the homegrown auto-upgrader seems like the easiest path for now... until perhaps in a future PR switching to a non-bitnami image) - also increased start_period for healthcheck to make automated tests easier - https://hub.docker.com/r/bitnami/discourse now requires a paid subscription. this PR switches to use https://hub.docker.com/r/bitnamilegacy/discourse, which also says it will no longer be updated. ... probably we should switch to using https://github.com/discourse/discourse_docker published somewhere else... but will save that for another PR as this was a few other bits
notplants added 3 commits 2026-06-02 19:23:47 +00:00
notplants changed title from Fix backup/restore to WIP: Fix backup/restore 2026-06-02 19:55:06 +00:00
notplants added 1 commit 2026-06-02 20:18:52 +00:00
fix(db): switch postgres image to pgvector/pgvector:pg17 + bump PG_BACKUP_VERSION
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/tag Build is passing
b0f9ae743a
Author
Owner

I realize this PR contains a few different things and might be hard to read.

If someone else is also wanting to collab on maintaining this recipe, then I can break it into parts. Or I can just merge it as its probably all stuff that should happen at some point.

I realize this PR contains a few different things and might be hard to read. If someone else is also wanting to collab on maintaining this recipe, then I can break it into parts. Or I can just merge it as its probably all stuff that should happen at some point.
notplants changed title from WIP: Fix backup/restore to Fix backup/restore 2026-06-02 20:41:56 +00:00
Author
Owner

cc recent committers if you want to weigh in @decentral1se @jeppebundsgaard @3wordchant

cc recent committers if you want to weigh in @decentral1se @jeppebundsgaard @3wordchant
notplants merged commit 7e4d85a810 into main 2026-06-15 17:33:39 +00:00
notplants deleted branch fix-restore 2026-06-15 17:33:45 +00:00
Author
Owner

ran into an issue in the old bespoke upgrade script while deploying this change to an old deployment (with a different database install user). created a fix and explanation here: #15 and releasing a patch release shortly

ran into an issue in the old bespoke upgrade script while deploying this change to an old deployment (with a different database install user). created a fix and explanation here: https://git.coopcloud.tech/coop-cloud/discourse/pulls/15 and releasing a patch release shortly
Sign in to join this conversation.
No description provided.