rustic
rustic copied to clipboard
Option to merge tags in config files
When backing up using config files, I would expect multiple tags declarations to be merged together. Instead, the first, most specific declaration is the only one considered. Some example cases:
# A.toml
[backup]
tags = [ "tag-A" ]
# B.toml
[backup]
tags = [ "tag-B" ]
# C.toml
[[backup.snapshots]]
tags = [ "tag-C" ]
rustic backup -P A -P Bresults intag-A.rustic backup -P A -P Cresults intag-C.rustic backup -P A -P C --tag tag-Dresults intag-D.rustic backup -P A -P C --tag tag-D --tag tag-Eresults intag-D, tag-E.
I would expect every tag and --tag option to append to other tag declarations, both with multiple declarations and using use-profiles imports.
More specific use cases:
- I want to create a config file with many snapshot declarations, where every snapshot is tagged with a common tag, but some might have extra tags.
- I have a few modular config-files that I might apply on some backups, and want to tag those backups with each optional config used. For example, some combination of
auto, manual, no-gitignore, no-backupignore, test, important
Overwriting tags may also be useful, of course. So maybe rustic would need to implement some kind of append-tags, exclude-tags, or something similar.