From 3f468088983177d3b87b009ddd8c489a91a3ffc6 Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Sun, 19 May 2024 00:26:12 +0200 Subject: [PATCH] add forget safety net changelogs --- changelog/unreleased/issue-4568 | 13 +++++++++++++ changelog/unreleased/pull-4764 | 8 ++++++++ 2 files changed, 21 insertions(+) create mode 100644 changelog/unreleased/issue-4568 create mode 100644 changelog/unreleased/pull-4764 diff --git a/changelog/unreleased/issue-4568 b/changelog/unreleased/issue-4568 new file mode 100644 index 000000000..4d44809c5 --- /dev/null +++ b/changelog/unreleased/issue-4568 @@ -0,0 +1,13 @@ +Bugfix: Prevent `forget --keep-tags invalid` from deleting all snapshots + +Running `forget --keep-tags invalid`, where the tag `invalid` does not +exist in the repository, would remove all snapshots. This is especially +problematic if the tag name contains a typo. + +The `forget` command now fails with an error if all snapshots in a snapshot +group would be deleted. This prevents the above example from deleting all +snapshots. + +https://github.com/restic/restic/issues/4568 +https://github.com/restic/restic/pull/4764 +https://forum.restic.net/t/delete-all-snapshots-in-one-command-is-this-feature-intentional/6923/3 diff --git a/changelog/unreleased/pull-4764 b/changelog/unreleased/pull-4764 new file mode 100644 index 000000000..61b2edac9 --- /dev/null +++ b/changelog/unreleased/pull-4764 @@ -0,0 +1,8 @@ +Enhancement: Remove all snapshots using `forget --unsafe-allow-remove-all` + +The forget command now supports the `--unsafe-allow-remove-all` option. It must +always be combined with a snapshot filter (by host, path or tag). +For example the command `forget --tag example --unsafe-allow-remove-all`, +removes all snapshots with tag `example`. + +https://github.com/restic/restic/pull/4764