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 prune should refuse to work on repositories without snapshots #4619

Open
MichaelEischer opened this issue Jan 6, 2024 · 0 comments
Open
Labels
category: prune type: discussion undecided topics needing supplementary input

Comments

@MichaelEischer
Copy link
Member

What should restic do differently? Which functionality do you think we should add?

Currently prune will wipe a repository, if there are no snapshots in it. If a problem while listing the snapshots occurs, this could even cause prune to completely break a repository. (see #4612 for an example).

As suggested in https://forum.restic.net/t/prune-suspicious-state-detection/7084 , prune could refuse to process a repository without snapshots in it, unless a special flag is passed to it. So far, I've only encountered repositories without snapshots during testing, but I wonder whether there are some valid use cases for this?

An alternative might be that prune retries listing the snapshots multiple time, if an empty list was returned. That would be able to protect against temporary errors, but a persistent error would still be a problem.

@MichaelEischer MichaelEischer added type: discussion undecided topics needing supplementary input category: prune labels Jan 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: prune type: discussion undecided topics needing supplementary input
Projects
None yet
Development

No branches or pull requests

1 participant