EnterpriseDB / barman

Barman - Backup and Recovery Manager for PostgreSQL
https://www.pgbarman.org/
GNU General Public License v3.0
2.12k stars 193 forks source link

Make `BACKUP_ID` optional when performing PITR with barman-cloud-restore #1013

Open gbartolini opened 2 months ago

gbartolini commented 2 months ago

Currently, barman-cloud-restore requires a backup ID when performing a recovery. While this is fine, having an automated way for Barman to determine the start backup ID based on a requested target would simplify the code of client applications like CloudNativePG.

For example, this is what CloudNativePG is currently doing: https://github.com/cloudnative-pg/cloudnative-pg/blob/74886c384d318603a4cc4a96aa61b1a0f33e2584/pkg/management/catalog/catalog.go#L102

Would it be possible to have barman-cloud-restore bring that functionality inside?

martinmarques commented 1 month ago

I think we'll be making this a feature in barman, which will slip into barman-cloud. This is something that has been bugging me for a long time, especially when I see users recover with a backup that is not suitable for the recovery time selected.