Unexpected filesystem-crossing using glob #520
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#520
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?
What I'm trying to do and why
I want to backup both a number of directories and a database at the same time.
I am doing this via a docker container, so my files are mounted, on different paths (subpath of my source_directories).
Steps to reproduce (if a bug)
The key here is the
*
insource_directories
Actual behavior (if a bug)
Files from all the mount points are added to the repo
Expected behavior (if a bug)
I should not be able to backup files from those sub directories as those are on different filesystems, given what the doc says:
This quirk (using a
*
glob) currently allows me to do what I intend to but I am afraid this behavior might get fixed in the future and that I would silently stop backuping my files.Also, using
*
implies leaving any empty files in that folder aside.Environment
borgmatic version: 1.5.24
borgmatic installation method: pip
Borg version: 1.1.16
Python version: 3.9.2
Database version (if applicable): 10.4
operating system and version: debian:bulleyes-slim docker image
Thanks for filing this! I think this is a "works by design" thing that could perhaps be better documented. I don't see the
one_file_system
flag set totrue
in your configuration, but even if it was, it probably wouldn't prevent all of your source directories on different filesystems from being backed up. That's because the glob is expanded by borgmatic, and then your three source paths are passed to Borg individually.To confirm this behavior, you could set
one_file_system
totrue
and then observe whether all your paths get backed up.What
one_file_system
is designed to do, AFAIK, is to prevent Borg from implicitly including other off-filesystem paths it reaches within those source directories. E.g., if it found/storage/images/external
which was a mount point of another filesystem, it'd get excluded.I've clarified the
one_file_system
behavior in the schema documentation. I'll close this ticket for now, but please feel free to re-open if you have any other comments or questions related to this behavior.Thanks ; sorry for not replying earlier. The fact that one_file_system is borg-related and the source_directories is built in borgmatic wasn't clear to me.