Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

restic forget --keep-tag NonExistingTag drops all snapshots #4569

Open
schoettl opened this issue Nov 18, 2023 · 0 comments · May be fixed by #4764
Open

restic forget --keep-tag NonExistingTag drops all snapshots #4569

schoettl opened this issue Nov 18, 2023 · 0 comments · May be fixed by #4764

Comments

@schoettl
Copy link

Output of restic version

restic 0.16.2-dev (compiled manually) compiled with go1.20.8 on linux/amd64

What backend/service did you use to store the repository?

local fs / applies to all

Problem description / Steps to reproduce

restic forget --keep-tag=SomeUnusedTag --dry-run

This command would drop all snapshots. This is very dangerous and probably unwanted.

A suggested fix (see forum) is to only allow --keep-tag together with other --keep-* options.

While working on this, I noticed that another if case seem to have no effect, see comment in diff.
Was the change previously discussed in an issue or on the forum?

See also https://forum.restic.net/t/delete-all-snapshots-in-one-command-is-this-feature-intentional/6923/3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants