[Idea] Separate configs in one file #504
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
Split backups, some repositories get everything, some only configs, etc.
Current behaviour
Borgmatic requires a configfile passed in, to run a separate or specific backup.
Other notes / implementation ideas
Currently, the YAML for configuration is flat, all repositories are in a single configuration.
My suggestion/idea, is to allow the following:
With this configuration, borgmatic, without any specifications, should run all the backups (kinda like it does now)
However, if I run
borgmatic -t mount
, (-t is fictional, in my head it stands for "target"), it only runs the first configuration, and with-t remote
, it (obviously) then only runs the second configuration.This would give more flexibility with having multiple configurations in one place.
An shared configs would be imported just like any other yaml.
Interesting! What's the benefit of this approach over the existing support for separate configuration files? For instance, if you put a
mount.yaml
and a separateremote.yaml
in/etc/borgmatic.d
, you can run them both by invokingborgmatic
.. or target one of them individually with, e.g.borgmatic --config /etc/borgmatic.d/mount.yaml
.Is it just that the
-t
approach is easier to type at the command-line?Besides the import, which would make life easier...
I hadn't seen documentation where it said that
/etc/borgmatic.d/name.yaml
would work, from the docs I understood it had to be/etc/borgmatic/config.yaml
. Did I overlook something?Because then, my only reason would be that it's nice inside a single file, to more easily edit.
The documentation covering that is in this how-to guide. Based on that, let me know if you think that'd work for your use case. I hear you about editing in a single file being more convenient though.
I'm closing this ticket due to inactivity, but if you have any follow-ups, please feel free to post them here! I'm happy to reopen if needed.