Extra slash symbol in bucket/prefix options breaks PBM ability to save or discover backups on storage

Description

Problem description

I am trying to set up a backup retention schedule, and I encountered a strange issue.

For example, when I execute the command:
pbm cleanup --older-than 4d,
PBM correctly displays the list of backups that should be deleted. However, it actually forgets about all backups — pbm list shows no backups at all.
Setting date instead of days count gives the same result.


Additionally, the backup files are not actually got deleted from Minio during this process.

PBM Version 2.7.0.
S3 storage - minio

Extra slash symbol in bucket/prefix options breaks PBM ability to save or discover backups on storage.

Steps to reproduce 1:

  1. Set up remote backup storage and add “/” AFTER bucket name

  2. Configuration is successfully saved, however PBM fails to perform backup with completely unclear reason

 

Steps to reproduce 2:

  1. Set up remote backup storage and add “/” BEFORE prefix name

  2. Configuration is successfully saved, backup is successfully completed, however it disappears on re-sync

 

Acceptance criteria

Expected behavior:

  1. PBM validates bucket/prefix options and returns error about incorrect format

AND/OR

  1. PBM removes extra / from option values

 

Proposed solution:

  • Validate the path (check if new AWS SDK for go version 2 can help).

Environment

None

Activity

Sandra Romanchenko January 22, 2025 at 3:25 PM

You’re right, thanks for the note and report itself. I’ve meant that if there is an extra / in bucket name, PBM is also unable to save backups, so handling of both option should be addressed within this ticket.

Pavel January 22, 2025 at 3:20 PM

just to fix. Backup are getting stored okay even with slash. Problem only with resync triggered by cleanup.

Pavel January 22, 2025 at 1:24 PM

you're right. After removal '/' cleanup start working as intended.

Thank you.

Sandra Romanchenko January 22, 2025 at 12:39 PM
Edited

yeah, storage config change triggers resync. So in your case the issue isn’t with cleanup but rather with resync - PBM can’t locate backups on storage to show them on resync or delete them.

Can you please provide your storage config, especially these 2 fields?

It seems that you have “/“ before name of the prefix like this “/data/pbm/test“, if so - please remove “/” (name should look like in the sample above) and try to perform the test with backup cleanup again.

Pavel January 22, 2025 at 7:42 AM

is it possible that setting s3 debug triggers resync?

Because enabling s3 debug makes all backups gone too.

Details

Assignee

Reporter

Labels

Needs QA

Components

Affects versions

Priority

Created January 9, 2025 at 11:37 AM
Updated February 4, 2025 at 12:34 PM