-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
A user reported that forget --keep-tag
is not clearly defined. The manual says:
--keep-tag
keep all snapshots which have all tags specified by this option (can be specified multiple times).
The help text is:
--keep-tag tag keep snapshots with this tag (can be specified multiple times)
At the moment it's implemented this way: When just one tag to keep is specified (--keep-tag foo
) restic won't touch any snapshots that have tag foo
. For multiple tags to keep (e.g. --keep-tag foo --keep-tag bar
) restic won't remove snapshots which have both tag foo
and tag bar
, but can forget snapshots which just have tag foo
.
The manual states this (more or less clearly), but the help text is not clear.
I'd like to propose the following change: --keep-tag foo
will work as is. --keep-tag foo,bar
instructs restic to keep all snapshots that have both foo
and bar
. --keep-tag foo --keep-tag bar
will not touch any snapshots that have either foo
or bar
set.
@middelink What do you think?