Behavior change in 1.5.7 with missing locations #387
Labels
No Label
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#387
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
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?
Not sure if this is a bug or if the change was intented (I assume it's linked to issue #333 fixed in 1.5.7): if you have optional files to backup, missing files was not an issue until borgmatic 1.5.7.
Now it fails with:
xxx/backups/repository: Error running actions for repository
[Errno 2] No such file or directory: '/xxx/supervisor/extras'
/xxx/borgmatic.conf: Error running configuration file
I can likely workaround by using patterns in the configuration file, but I was curious if this was intented or if this is a bug / side effect of another fix.
Thanks for filing this!
Could a get a look at your configuration file, specifically your
source_directories
andone_file_system
value? And could you also let me know whether your varioussource_directories
are on different filesystems? The partial output of runningmount
might help with that.What I'm trying to figure out with all this: Would your "missing" file have been de-deduplicated prior to #333 and now is no longer deduplicated? That in theory could result in the error you're seeing, since the missing directory would now be passed to Borg... And Borg would of course get angry about it being missing.
Here's our configuration file:
And it should always be the same FS:
with:
this works without any issue.
Now I upgrade to 1.5.7:
Indeed, the file httpd_webadmin.conf is not there ; we provide a .conf.example file which can be renamed .conf if needed, and we want to backup this file if it exists.
I could not find any explicit reason for this change in change log. The new behavior seems legit (even if it would be nice to have optional file list), but I wanted to make sure this has been done on purpose (or to check if we're using borgmatic properly).
Thanks !
First of all, I sincerely apologize for letting this ticket languish for so long. I've dug into the issue, and I believe you are right—this is a regression! What happened is that in #333, introduced in borgmatic 1.5.7, the code to deduplicate source directories started calling Python's
os.stat()
on each path. Which meant that if a source directory wasn't present on the filesystem, borgmatic errored.So the fix I made is to only call
os.stat()
if the source directory is actually present. Now, all source directories get passed to Borg. And like with the pre-1.5.7 borgmatic behavior, Borg complains about missing directories but continues making the backup anyway without erroring.Hope this ends up working for you! Should be part of the next release.
The fix has been released with borgmatic 1.5.19! Thanks for your patience here.