Example of configuration file in the repo? #119
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#119
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?
Where can I find an example of the latest configuration file in the repo?
It seems like it's generated upon installation but there could be an example in the repo directly, please :)
There are two things right now:
The full configuration
schema
is checked in to the repo, and also linked from the documentation.The
generate-borgmatic-config
command mentioned in that documentation generates an example configuration file.The reason that there isn't an example configuration file directly checked into the repo is that it would be duplicative with the schema (
generate-borgmatic-config
uses the schema to generate the config file), and both would have to be updated in lockstep or risk drifting out of sync.Do you have a use case where
generate-borgmatic-config
isn't convenient enough for getting an example config file, and an example file directly in the repo would be better?Well when I set borg instalaltion with ansible, I do'nt necessarily have borgmatic on my local computer, so it means I need to generate a configuration (considering I remember that I have to generate a default configuration file unlike other programs :P) then open it in nano and copy paste to my IDE. :D quite unpractical but well as you wish
Gotcha. I wonder if there'd be some way to make a generated example config file available online, perhaps as a borgmatic build artifact, so you could download to your local machine and edit it in an IDE there. That might satisfy your need without having to maintain both the schema and the config file duplicatively in the same repo.
Why you don't just run the generate script and include the result in the git repo? or even automate it? Maybe with a git hook before creating a release? (dunno if possible)
But yes, it would work too.
That might work, but it'd be a little tricky. For instance, with a git hook, you'd have to be careful so that checking in the result of the generate script doesn't itself trigger a git hook and get into an infinite loop! It may just be more straightforward to publish the example config somewhere in the form of a build artifact, and then link to it from the README.
Done! https://torsion.org/borgmatic/docs/reference/configuration/
That's linked from the main documentation page: https://torsion.org/borgmatic/
It's also mentioned in the borgmatic set up docs: https://torsion.org/borgmatic/docs/how-to/set-up-backups/
Thanks for the suggestion.
thank you :)