Repository navigation
Make PostgreSQL Point-in-Time Recovery (PITR) actually work and tested in the new backups API #2774
Copy link
Copy link
Closed
cozystack/website
#629Labels
area/databaseIssues or PRs related to managed databases (postgres, mariadb, redis, etcd, kafka, clickhouse)Issues or PRs related to managed databases (postgres, mariadb, redis, etcd, kafka, clickhouse)kind/featureCategorizes issue or PR as related to a new featureCategorizes issue or PR as related to a new featurepriority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to completeImportant over the long term, but may not be staffed and/or may need multiple releases to completetriage/acceptedIndicates an issue is ready to be actively worked onIndicates an issue is ready to be actively worked on
Description
Activity
- addedkind/featureCategorizes issue or PR as related to a new featureCategorizes issue or PR as related to a new feature
on Jun 1, 2026 - addedarea/databaseIssues or PRs related to managed databases (postgres, mariadb, redis, etcd, kafka, clickhouse)Issues or PRs related to managed databases (postgres, mariadb, redis, etcd, kafka, clickhouse)triage/acceptedIndicates an issue is ready to be actively worked onIndicates an issue is ready to be actively worked onpriority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to completeImportant over the long term, but may not be staffed and/or may need multiple releases to complete
on Jul 1, 2026 - added 6 commits that reference this issue
on Jul 21, 2026 - added a commit that references this issue
on Jul 24, 2026
Metadata
Metadata
Labels
area/databaseIssues or PRs related to managed databases (postgres, mariadb, redis, etcd, kafka, clickhouse)Issues or PRs related to managed databases (postgres, mariadb, redis, etcd, kafka, clickhouse)kind/featureCategorizes issue or PR as related to a new featureCategorizes issue or PR as related to a new featurepriority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to completeImportant over the long term, but may not be staffed and/or may need multiple releases to completetriage/acceptedIndicates an issue is ready to be actively worked onIndicates an issue is ready to be actively worked on
Important
Needs verification. The failure modes listed below are based on field observation and may not all reproduce on current
main. Before implementation, verify each against the latest backups controller and CNPG strategy — confirm which still hold and which are already fixed.Summary
The new backups API (
backups.cozystack.io/v1alpha1) exposes aRestoreJob.spec.options.recoveryTimefield for PostgreSQL PITR, but PITR is not functionally supported today: there is no end-to-end test, the example keeps it commented out, and known failure modes make a real point-in-time restore unreliable. This issue tracks making postgres PITR a genuinely supported, verified capability.What exists today
RestoreJob.spec.options.recoveryTime(RFC3339) is intended to map onto CNPGbootstrap.recovery.recoveryTarget.targetTime.examples/backups/postgres/35-restorejob-in-place.yamlships withrecoveryTimecommented out.hack/e2e-apps/backup.bats.disabled) is disabled and never exercises a point-in-time restore.Why it isn't really supported yet
Observed failure modes that prevent a reliable PITR (see Needs verification notice above):
recoveryTimepast the last archived WAL leaves the restore hanging with no clear surfaced error.Goals / acceptance criteria
options.recoveryTimebetween the two writes → assert pre-marker data present and post-marker data absent.recoveryTimepast the available WAL fails fast with a clear status/condition rather than hanging.recoveryTimeexample inexamples/backups/postgres/.Out of scope