I am getting failed message on pruning with the following settings: -keep 365:365 -keep 30:30 -keep 7:28 -keep 1:1 -a
show_log.txt (61.4 KB)
Log showing chunks already fossilised.
Check job also errors with missing chunks message.
What am I doing wrong?
From your log:
2026-01-16 01:28:20.003 ERROR SNAPSHOT_DELETE Failed to delete the snapshot PMA-Duplicacy-PMADATA at revision 22: URL request 'https://api003.backblazeb2.com/b2api/v1/b2_delete_file_version' returned 401 Access Denied
Failed to delete the snapshot PMA-Duplicacy-PMADATA at revision 22: URL request 'https://api003.backblazeb2.com/b2api/v1/b2_delete_file_version' returned 401 Access Denied
Why Backblaze returning access denied?
- Maybe the key lacks deleteFile capability (how was the key created? Can you inspect keys and confirm? If not, create a new key and ensure deleteFiles capability is present.)
- Maybe object lock is enabled on a bucket?
The failed check is result of failed prune — snapshot file is still present but chunks it refers to have been fossilized.
Backblaze key is fine for deleting but yes we do have object lock in place set to 30 days.
To confirm, check when was the file snapshots/PMA-Duplicacy-PMADATA/22 uploaded on the backblaze side. If it’s les than 30 days – then that’s the answer.
Then adjust your prune policy accordingly. Alternative solution is to avoid object lock and to use two sets of keys as described here How secure is duplicacy? - #30 by tallgrass
Yes, I believe that is the problem. I think it stems from the prune settings:
-keep 365:365 -keep 30:30 -keep 7:28 -keep 1:1 -a
Which translates to:
Keep 1 snapshot every 365 day(s) if older than 365 day(s)
Keep 1 snapshot every 30 day(s) if older than 30 day(s)
Keep 1 snapshot every 7 day(s) if older than 28 day(s)
Keep 1 snapshot every 1 day(s) if older than 1 day(s)
It’s the 7 days if older that 28 that’s the problem I believe? This was to achieve a weekly retention for 4 weeks before monthlies kick in.
I assume I should change that to 7:30 instead?
Remove these completely. You can’t have anything that affects revisions younger than your lock period.
OK, so what pruning commands do I use to achieve the following retention with the Backblaze 30 day object lock in place?:
Every day kept for 30 days (in line with Backblaze object lock)
A weekly for 4 weeks after 30 days
A monthly for 12 months after 30 days
An annual forever
[quote=“james4, post:7, topic:10846”]
Every day kept for 30 days
[/quote
Can’t prune that alt all. Can’t keep only one every day. Must keep everything.
Can’t have both. It’s either one or the other. Duplicacy goes left to right and marches revision age to the second number in the keep statement. If you have two of them the same only first will match.
If you modify last sentence to
A monthly for 12 months after 60 days
Then it’s possible. Which is effectively what you are probably intending to do anyway.
prune -a -keep 365:365 -keep 30:60 -keep 7:30
Now I get it. Many many thanks. I have set to this now for all backups:
-keep 365:365 -keep 30:60 -keep 7:30 -a
In English:
Keep 1 snapshot every 365 day(s) if older than 365 day(s)
Keep 1 snapshot every 30 day(s) if older than 60 day(s)
Keep 1 snapshot every 7 day(s) if older than 30 day(s)
Hi all,
Since implementing this pruning setup it seems to be working ok - now have 30 days and now 2 weeklies retained.
However, my check task is reporting one of my revisions as missing chunks - see attached log file - I assume this was due to me changing pruning commands perhaps?.
check.txt (1.1 MB)
How do I get rid of that revision (32) so that the check command does not report any problems any more?