Example of configuration file in the repo? #119

Closed
opened 2018-12-20 11:45:59 +00:00 by patricko · 7 comments

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 :)

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 :)
witten added the
question / support
label 2018-12-24 20:46:13 +00:00
Owner

There are two things right now:

  1. The full configuration schema is checked in to the repo, and also linked from the documentation.

  2. 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?

There are two things right now: 1. The full configuration `schema` is [checked in to the repo](https://projects.torsion.org/witten/borgmatic/src/branch/master/borgmatic/config/schema.yaml), and also linked from the [documentation](https://torsion.org/borgmatic/#configuration). 2. 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?
Author

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

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
Owner

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.

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.
witten removed the
question / support
label 2018-12-26 00:36:42 +00:00
Author

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.

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.
Owner

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.

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.
Owner

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.

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.
Author

thank you :)

thank you :)
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: borgmatic-collective/borgmatic#119
No description provided.