ability to set retention by repository #608
Labels
No Label
bug
data loss
design finalized
good first issue
new feature area
question / support
security
waiting for response
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: borgmatic-collective/borgmatic#608
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?
What I'm trying to do and why
I have two repositories, one in borgbase, that I pay for, and one at home with free storage.
I would like to be able to store a minimum data in borgbase to keep the cheapest plan, and to store a lot of backups in my homeserver as main backup server.
The ability to set the retention by repository will let us adapt the amount of data per storage capacity.
The main problem to add this feature without breaking compatibility, is that the yaml structure doesn't have any id for repositories.
If you can refactor in a major version
Something like this could work with a minor update
You can accomplish this with "deep merge" includes. For example, put only repository and retention info in .yaml files in /etc/borgmatic.d, with everything else in "config.common":
I'm going to close this one "won't fix" for now. The recommended way to vary configuration options by repository is by putting those repositories into separate borgmatic configuration files. And then you can always use includes as @rettops mentions to cut down on duplication if you'd like.
The rationale is that it's not feasible to make every option in a borgmatic configuration file repository-specific—that'd either require supporting repository-specific variants of each option as per your example or nesting an arbitrary number of options under each repository definition. I feel like a separate configuration file is much cleaner than either approach.
Of course, please feel free to comment if you disagree or have any other feedback on this.
I just did modify my config to use include, and it worked like a charm, thanks !