Prune deletes all backup archives despite retention policy
After upgrading Borg Backup Server to v2.17.7, prune removes all backup archives immediately after the backup job finishes.
• Backup job runs once per day
• Prune job runs right after the backup
• Retention policy:
• Daily: 7
• Weekly: 2
• Monthly: 1
• Hourly: 0
Prune Mar 15 5:25pm PostgreSQL-Storage-1 · -- Backup Mar 15 5:24pm PostgreSQL-Storage-1 · 9 files · 16s Prune Mar 15 10:01am PostgreSQL-Storage-1 · -- Backup Mar 15 10:00am PostgreSQL-Storage-1 · 9 files · 17s Update_borg Mar 15 4:00am · 2s Prune Mar 14 10:01am PostgreSQL-Storage-1 · 1s Backup Mar 14 10:00am PostgreSQL-Storage-1 · 9 files · 17s Update_borg Mar 14 4:00am · 2s Compact Mar 14 3:01am PostgreSQL-Storage-1 · --
It seems the path was wrong in the prune function.
In my docker-compose.yml I had:
- ./bbs:/var/bbs
- /mnt/nas:/nas
After I changed the path and mounted it under /var/bbs, which seems to be a requirement:
- ./bbs:/var/bbs
- /mnt/nas:/var/bbs/nas
After that change the jobs were kept and prune no longer removed them.
Thanks for following up with the root cause! You're right — this was a volume mount path issue, not a bug in BBS or borg prune.
Borg needs the repository path inside the container to match what's stored in the BBS database. Mounting the NAS at /nas instead of under /var/bbs/ meant borg prune couldn't resolve the repo correctly, so it saw no matching archives and pruned everything.
Your fix (mounting at /var/bbs/nas) is the correct approach. Closing as resolved — glad you got it sorted!