Hi,
Just a quick question. Do restic support filter which exclude tag/host/path from search?
For eg: I have 10 different set of tags, and I want to exclude only 2 tags from the result.
Thanks
Hi,
Just a quick question. Do restic support filter which exclude tag/host/path from search?
For eg: I have 10 different set of tags, and I want to exclude only 2 tags from the result.
Thanks
What command are you talking about?
For my use case, it would be on snapshots
, stats
and forget
. I want to get all snapshots that don’t have a certain tag. Same goes to stats
and forget
.
Thanks
The answer is no - restic does not support excluding tags, the options for tags in those commands are about including them.
However, you can probably run e.g. snapshots
with the --json
and then filter the JSON output using jq
to get a list of snapshots which does not include one or two tags (assuming jq
has a “not” operator, which is something I haven’t checked).
Yeah, I figured jq
would be a perfect alternative too, but that will apply to only snapshots
. It can’t be applied to stats
and forget
.
But its okay. I’ll try to find another way.
Thanks
Another ways might be using snapshots
to get list of snapshots, filter them using jq
and pass the filtered ids to stats
or forget
.