Skip to content

[feature] Sync gpbackup_history.db to standby coordinator after backup. #90

Description

@woblerr

The gpbackup_history.db is only stored on the active primary coordinator.
If failover occurs and the standby is promoted to primary, the backup history is lost.
The idea is to sync gpbackup_history.db to stanby coordinator after performing a backup.

After the history DB is updated during backup cleanup (DoCleanup), sync it to the standby coordinator using rsync over SSH:

  • Detect whether the cluster has a standby coordinator.
  • If standby exists — rsync to the corresponding datadir on standby coordinator.
  • If no standby — do nothing.

rsync is already used in project.
The operation should be non-fatal — if it fails, log a warning and don't break the backup.

It should be enabled by default, but could be disable by --no-sync-standby flag (or similar).

Does this approach seem valid and reasonable?

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions