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
--name option to rustic ls. Then I could use rustic ls --name Dotfiles to 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).
Hi there.
I’m using rustic 0.11.0 and trying to use
rustic lsto 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.tomlcontains:(I’m using both
iglobsandglobsso that one doesn't overwrite the other, see #1647 about that.)With
0.11.0I can userustic ls ./.configto list files, but this will only use thebackup.iglobsconfig, and it will ignore theglobsconfig for theDotfilessnapshot. Which means the produced list of files does not match whatrustic backuporrustic backup --name Dotfileswould do.Possible fixes:
--nameoption torustic ls. Then I could userustic ls --name Dotfilesto get the result I want.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
--nameoption, which removes ambiguity (and enables listing files from multiple source paths, when a snapshot is configured with multiple sources).