Skip to content

postiz: add a temporal-db backup participation for temporal-postgres #153

Description

@pofallon

Context

postiz runs two Postgres services — its own application database and a separate temporal-postgres database backing its Temporal workflow engine — but its manifest's backup block only declares one hook, for its own database. The second database is currently backed up as a live file copy with no quiesce, which is only crash-consistent, not transaction-consistent.

Hola server spec 004 (try-hola/hola#426) makes the dashboard's backup-coverage view aware of this: a deployment shaped like postiz today (accepts backup@1, one participation, two recognised database services) now renders as partially covered ("1 of 2 databases quiesced") rather than the misleading fully-covered state it showed before. This is the acceptance test for that feature (spec 004 FR-019) — postiz is used deliberately as the example of the gap, precisely because it's real and already in the catalog.

What's needed here

Add a second backup participation to postiz's manifest, once the plural backup form is accepted by the catalog schema/validator (see the companion issue, blocks this one):

"accepts": ["backup@1"],
"backup": [
  { "id": "app-db",
    "preHook":  { "service": "postiz-postgres",   "command": ["sh", "-c", "pg_dump -U <user> <db> > /backups/postiz.sql"] },
    "postHook": { "service": "postiz-postgres",   "command": ["rm", "-f", "/backups/postiz.sql"] } },
  { "id": "temporal-db",
    "preHook":  { "service": "temporal-postgres", "command": ["sh", "-c", "pg_dump -U <user> <db> > /backups/temporal.sql"] },
    "postHook": { "service": "temporal-postgres", "command": ["rm", "-f", "/backups/temporal.sql"] } }
]

(Adjust service names, users, and database names to whatever postiz's actual compose declares — check the compose bundle for the real temporal-postgres service name and credentials.)

Why

Until this lands, postiz's coverage state is honestly reported as partial by the dashboard rather than falsely reported as fully quiesced — see spec 004's Assumptions: "the catalog will adopt the plural backup form and add postiz's second participation on its own cadence; nothing here depends on it landing first. Until it does, postiz reads as partial, which is the honest state."

Depends on

  • The companion issue: manifest schema + validator accepting the plural backup form.

References

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions