Example of configuration file in the repo? #119
Reference in New Issue
Block a user
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?
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
schemais checked in to the repo, and also linked from the documentation.The
generate-borgmatic-configcommand 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-configuses 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-configisn'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 :)