Skip to content

fix: barman-to-barman sync for incremental backups (#1115)#1159

Open
jonatas-rp wants to merge 1 commit into
EnterpriseDB:masterfrom
jonatas-rp:fix/barman-to-barman-sync-incremental-backups
Open

fix: barman-to-barman sync for incremental backups (#1115)#1159
jonatas-rp wants to merge 1 commit into
EnterpriseDB:masterfrom
jonatas-rp:fix/barman-to-barman-sync-incremental-backups

Conversation

@jonatas-rp

@jonatas-rp jonatas-rp commented Feb 15, 2026

Copy link
Copy Markdown

Fix barman-to-barman sync for incremental backups #1115

When syncing incremental backups from a primary barman server to a passive barman server, a KeyError was raised in is_backup_locally_obsolete because the parent backup info did not contain the reference to the children_backup_ids and the field was not loaded correctly when building a BackupInfo object.

Changes:

  • Added sync_parent_backup_info method to Server class
  • Call sync_parent_backup_info in sync_cron before check_sync_required
  • Fixed children_backup_ids deserialization in BackupInfo.from_json
  • Added tests for sync_parent_backup_info

When syncing incremental backups from a primary barman server to a
passive barman server, a KeyError was raised in is_backup_locally_obsolete
because the parent backup info did not contain the reference to the
children_backup_ids and the field was not loaded correctly when building
a BackupInfo object.

Changes:
- Added sync_parent_backup_info method to Server class
- Call sync_parent_backup_info in sync_cron before check_sync_required
- Fixed children_backup_ids deserialization in BackupInfo.from_json
- Added comprehensive tests for sync_parent_backup_info
@mike-broughton

Copy link
Copy Markdown

I think this change does not deal with the situation where you have synced backups that are beyond the retention period on the primary? So even when this change gets merged, the only way to cleanup an existing barman backup server is to rerun the sync from scratch?

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.

2 participants