spot check fails when backup contains symlinks #1050
Labels
No labels
blocked
breaking
bug
data loss
design finalized
good first issue
new feature area
question / support
security
waiting for response
No milestone
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
borgmatic-collective/borgmatic#1050
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What I'm trying to do and why
I am trying to run a spot check on a recently written archive.
The spot check always fails if the backup contains symlinks.
This is part of my config:
Steps to reproduce
borgmatic check -v2 --only spotNo hash computed - remote borg is unable to compute the hash of a symlink
Actual behavior
Example log (edited):
Inspect some files:
Hash is computed for non-symlink only.
Expected behavior
Spot check should not fail if
borgis unable to compute the hash.Other notes / implementation ideas
Spot check sampling routine should skip symlinks if
borgis unable to compute the hash.borgmatic version
1.9.14
borgmatic installation method
Debian package
Borg version
1.4.0 (local)/1.2.4 (remote)
Python version
2.13.2
Database version (if applicable)
No response
Operating system and version
PRETTY_NAME="Debian GNU/Linux trixie/sid" NAME="Debian GNU/Linux" VERSION_CODENAME=trixie ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/"
Thanks for filing this and providing all the diagnostics! I will look into this when I get the chance.
This is fixed in main and will be part of the next release! I went with a slightly different approach than your suggestion though. The issue with skipping symlinks entirely in the spot check is it doesn't catch a few legitimate failing spot check cases:
So instead, the fix treats symlinks in the source directories as having empty hashes, thereby matching the empty hashes Borg provides for archive symlinks and addressing the above use cases. More importantly, symlinks within an archive no longer break the spot check.
Thanks again!
Released in borgmatic 2.0.0!