Skip to content

delete plan and data files on repo #606

Answered by garethgeorge
nocivo72 asked this question in Q&A
Discussion options

You must be logged in to vote

Hey, this sort of thing is what the Run Command feature aims to support. Easiest way to do this is to get familiar with the restic CLI. https://restic.readthedocs.io/en/stable/060_forget.html#removing-all-snapshots .

In your case, you'll want something like

  • forget --tag plan:<your plan ID> --keep-last-n 1 --dry-run which previews what would be forgotten but removes nothing -- check the output to be sure everything you expect is getting picked up.
  • forget --tag plan:<your plan ID> --keep-last-n 1 to actually do the delete.

And then you'll need to manually delete the last snapshot with the tag (restic blocks operations that would delete every snapshot as a safety measure).

It's not a capa…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@nocivo72
Comment options

Answer selected by nocivo72
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants