Phase: Database Backup Verification

phase-pal-e-platform-backup-verification Phase

phase

Phase 13: Backup Verification

Goal: Automated verification that CNPG Postgres backups in MinIO are present and recent.
Owner: Dev agent
Repo: forgejo_admin/pal-e-platform
Depends on: Phase 3 (CNPG operator + MinIO backup infra)

Scope

CronJob that runs daily, checks MinIO postgres-wal bucket for recent WAL files under each CNPG cluster prefix. Follows the tf-state-backup CronJob pattern. Uses existing cnpg MinIO IAM user — no new infrastructure.

Deliverables

  • PR #61 merged (2026-03-14) — kubernetes_cron_job_v1.cnpg_backup_verify
  • Schedule: 03:00 UTC daily (1h after tf-state-backup)
  • Checks both pal-e-postgres and woodpecker prefixes
  • Verifies WAL files present and within 25h freshness window
  • Alpine 3.20 + mc client, Forbid concurrency, 2 retries
  • References existing cnpg_s3_creds secret in postgres namespace

Nits

  • woodpecker prefix check will fail until Woodpecker Postgres migration (PR #59) is merged. Expected behavior — not a bug.
  • plan-pal-e-platform — parent plan
  • Forgejo issue: forgejo_admin/pal-e-platform #60 (closed)
  • PR #59 — Woodpecker Postgres migration (creates the woodpecker backup path)