XDG directories #562
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 project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
borgmatic-collective/borgmatic#562
Loading…
Add table
Add a link
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?
It would be nice if Borgmatic supported the XDG spec (
~/.config,~/.local, etc). There's a Python package that can be used to enable this: https://github.com/ActiveState/appdirsThanks for filing this! By default, borgmatic already looks in
~/.config/borgmatic/config.yamland~/.config/borgmatic.d/for configuration files. And the~/.configprefix is customizable via the standardXDG_CONFIG_HOMEenvironment variable. Is the idea that you'd like other paths to be used by default on non-Linux OSes, e.g. MacOS?And for
~/.local, is the the thinking that's where the existing~/.borgmaticuser data would be stored instead?Yes, sorry for the late reply.
XDG_DATA_HOME(defaulting to~/.local/share) is the XDG-compliant directory for user-specific app data. It would be nice-to-have if borgmatic fully implemented XDG.There's also
XDG_DATA_STATE_HOME, depending on whether Borgmatic'schecks/is considered "user data" or "user state".I apologize for the delay here. I think this would be a good change in terms of standardization. The main difficulty is that the
~/.borgmaticpath currently gets encoded into database backup archives in the form of dump file paths. So if changing those paths (either implicitly by default or explicitly with an option), the database restore logic might need to be updated to probe both paths within a backup archive.Note that there is an existing
borgmatic_source_directorythat configures this~/.borgmaticdirectory, and changing that will just unceremoneously break restores of any existing backups. However this is a comment warning of this above the option.Relevant reference: https://wiki.archlinux.org/title/XDG_Base_Directory
Also see #838 for a related ticket.
EDIT: #638 is also related.
Released in borgmatic 1.9.0!
There were several changes made as part of this:
/run/user/$UID#934