Configuration file includes and merging #148

Closed
opened 2019-03-06 18:41:01 +00:00 by witten · 1 comment
Owner

As discussed in #73 and #3 and elsewhere, borgmatic configuration could benefit from better support for re-use of common config options across repositories. A common use case is: I have multiple different repositories and/or applications to backup, and they have some, but not all, config options in common (retention, consistency, etc). Therefore, it would be really handy to pull in and re-use common configuration.

The proposed mechanism for this is an include / inlining mechanism within borgmatic configuration files. The way that might look is:

retention:
    !include common_retention.yaml

Or, even fancier.. Includes with merging / local overrides! (Note that this is a shallow merge.)

retention:
    keep_daily: 1
    <<: !include common_retention.yaml

This is a fairly advanced feature, and so not everyone would use it. But the idea is that it'd be there for users that need it.

As discussed in #73 and #3 and elsewhere, borgmatic configuration could benefit from better support for re-use of common config options across repositories. A common use case is: I have multiple different repositories and/or applications to backup, and they have some, but not all, config options in common (retention, consistency, etc). Therefore, it would be really handy to pull in and re-use common configuration. The proposed mechanism for this is an include / inlining mechanism within borgmatic configuration files. The way that might look is: ```yaml retention: !include common_retention.yaml ``` Or, even fancier.. Includes with merging / local overrides! (Note that this is a shallow merge.) ```yaml retention: keep_daily: 1 <<: !include common_retention.yaml ``` This is a fairly advanced feature, and so not everyone would use it. But the idea is that it'd be there for users that need it.
Author
Owner

Implemented and released in borgmatic 1.3.0! And documented here: https://torsion.org/borgmatic/docs/how-to/make-per-application-backups/

Implemented and released in borgmatic 1.3.0! And documented here: https://torsion.org/borgmatic/docs/how-to/make-per-application-backups/
Sign in to join this conversation.
No Milestone
No Assignees
1 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#148
No description provided.