-
Notifications
You must be signed in to change notification settings - Fork 117
Description
Hi there.
I’m using rustic 0.11.0 and trying to use rustic ls to check which files are considered (i.e. not ignored), based on #1645 which suggests this would be possible.
Indeed it does work, but my issue is that it ignores snapshot-specific configuration.
My rustic.toml contains:
[backup]
iglobs = ["!.DS_Store", "!._*"]
[[backup.snapshots]]
name = "Dotfiles"
sources = ["$HOME/.config"]
globs = ["!raycast/", "!zed/"](I’m using both iglobs and globs so that one doesn't overwrite the other, see #1647 about that.)
With 0.11.0 I can use rustic ls ./.config to list files, but this will only use the backup.iglobs config, and it will ignore the globs config for the Dotfiles snapshot. Which means the produced list of files does not match what rustic backup or rustic backup --name Dotfiles would do.
Possible fixes:
- Add support for the
--nameoption torustic ls. Then I could userustic ls --name Dotfilesto get the result I want. - Automatically detect that the provided path is a source for a specific snapshot, and apply its config.
Second one looks error-prone, and tricky when a path is a source in more than one configured snapshot. So my vote would be on the --name option, which removes ambiguity (and enables listing files from multiple source paths, when a snapshot is configured with multiple sources).