Unable to delete PBM backups (both PITR and full backups)

Hi Team,

We are currently using PBM version 2.0

Issue#1 (without PITR)
I am unable to delete PBM backups that are older than ‘X’ number of days.

Command I’m using for deleting the backups older than 5 days.
pbm delete-backup -f --older-than $(date -d ‘-5 days’ +%Y-%m-%d);

How can we setup backup retention policy in PBM?
Can we setup a cron to delete the backups in parallel with the backup schedule job?

For a replicaset on which PITR is enabled, we are unable to delete the PITR chunks manually.

Example command that doesn’t work
pbm delete-pitr --older-than=“2022-09-24T18:49:36Z” # will delete [2022-09-17T17:39:12Z - 2022-09-18T17:44:51Z]

Please help me on this.

I see an open JIRA for ability to delete older backups/pitr chunks. Any Idea when will this JIRA gets resolved?


Hey, @kirangelli

Sorry for the delay. We discussed your case and required changes to PBM logic. We will provide solution to simply/easy maintain retention policy in the next release.

You can track the progress here [PBM-850] Add ability to delete older backups - Percona JIRA

For now, PBM does not allow to delete old backups if they are the base snapshot for Point-in-Time restore. You have to delete oplog ranges that covers these snapshots first. Valid ranges for deletion are before/older than the latest/recent full backup.

1 Like

Hey @Dmytro_Zghoba

Thank you for your response.