EnterpriseDB / barman

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

Fix bug in `is_full_and_eligigle_for_incremental` method #971

Closed andremagui closed 2 months ago

andremagui commented 2 months ago

While working on the new list-backup (BAR-207), a bug was spotted in the method is_full_and_eligible_for_incremental from the LocalBackupInfo class.

The method was using the volatile information backup_method of the server configuration. This would be harmful if the user creates backups with backup_method='postgres' and changes to 'rsync'. When using list-backup or show-backup commands, the user would get an error. To fix this, we just need to use the mode field from the backup.info object, which is what this commit is doing.

References: BAR-228