XDG directories #562
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?
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.yaml
and~/.config/borgmatic.d/
for configuration files. And the~/.config
prefix is customizable via the standardXDG_CONFIG_HOME
environment 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~/.borgmatic
user 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
~/.borgmatic
path 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_directory
that configures this~/.borgmatic
directory, 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: