Skip to content

feat(pitr): periodic pgBackRest catalog verification in backup watcher#79

Closed
paulocsanz wants to merge 1 commit into
mainfrom
pc/pitr-catalog-verify
Closed

feat(pitr): periodic pgBackRest catalog verification in backup watcher#79
paulocsanz wants to merge 1 commit into
mainfrom
pc/pitr-catalog-verify

Conversation

@paulocsanz
Copy link
Copy Markdown
Contributor

Summary

  • Adds a periodic (once/hour) check that verifies the pgBackRest catalog agrees with the local state file
  • If last_full_at is set but pgbackrest info shows 0 full backups (path mismatch, stanza recreated, etc.), clears last_full_at so NEEDS_INITIAL_BACKUP fires on the next poll
  • Probe returns early on any pgbackrest error so transient S3 failures don't incorrectly reset state
  • No new dependencies — pure bash/grep
  • Complements the backboard-side fix that gates triggerGapRecoveryBackupActivity on the 24h grace period

Test plan

  • bash -n pgbackrest-backup-watcher.sh passes
  • With a state file containing a stale last_full_at and an empty pgBackRest catalog, watcher resets state and takes a new full within one poll cycle

@paulocsanz
Copy link
Copy Markdown
Contributor Author

Superseded by #80 which also includes the matching Rust implementation in postgres-ha (#40).

@paulocsanz paulocsanz closed this May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant