borgmatic runtime directory error when running spot check with a database hook enabled #965
Loading…
x
Reference in New Issue
Block a user
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'm reproing an error mentioned in the comments on #947.
Steps to reproduce
Run a spot check, e.g.:
Actual behavior
Expected behavior
Spot checks run without that error.
Other notes / implementation ideas
When I ran a spot check, what happens is that the spot check calls
borgmatic.borg.create.make_base_create_command()
so it can collect the paths from the filesystem to spot check.make_base_create_command()
callscollect_special_file_paths()
, which among other things, checks to see if the borgmatic runtime directory is effectively excluded from the filesborg create
consumes from the filesystem. If it is, then it errors—to prevent potential Borg hangs when borgmatic writes to a database dump named pipe in the runtime directory and Borg never reads from it because the runtime directory isn't included in thepatterns
/source_directories
given to Borg!The problem is that when going through the spot check code path, the borgmatic runtime directory never gets injected into the patterns or source directories.. That only happens during the
create
code path when any given database hook is asked to dump its databases and therefore appends a path containing the borgmatic runtime directory tosource_directories
.I'm not sure what the solution is here to this unfortunate confluence of factors. I could remove the check and error message, but that would open us back up to potential Borg hangs. Maybe the cleanest thing would be to only run this code path during
create
rather thancheck
? After all, there's no risk of these particular hangs during acheck
by itself.borgmatic version
1.9.5 or main
borgmatic installation method
pipx
Borg version
1.4.0
Python version
3.12.7
Database version (if applicable)
14.3
Operating system and version
Manjaro stable
Yes that's exactly my configuration, database backup plus spot check.
Great. Now that I have a repro, I'll see what I can do about the error. Thanks for your patience.
Also, you can temporarily disable the spot check if you like so as not to block your borgmatic use until this is fixed!
Okay, this should be fixed now in main and will be part of the next release.
Released in borgmatic 1.9.6!