Prevent snapshot deletion?

Is there a way to protect (some) snapshots from being deleted/forgotten? For example Kopia allows to “pin” snapshots to prevent snapshot deletion.

I run rest-server

with --append-only option. This way clients can only add but not delete items to the repository.

This way forget/prune commands will fail to complete.

Be aware that you can always delete with the restic command directly onto the repository, so you would want to prevent that access from any client.

1 Like

The forget command has an option --keep-tag. So you can add a tag of your choice to this snapshot, let’s say “preserve”:

restic tag --add preserve 1234abcd

and prevent the deletion with

restic forget --keep-tag preserve [... forget scheme ...]