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

How to delete backups from old plan? #76

Closed
modem opened this issue Feb 8, 2024 · 4 comments
Closed

How to delete backups from old plan? #76

modem opened this issue Feb 8, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@modem
Copy link

modem commented Feb 8, 2024

During my tests, I created 2 plans to backup to the same repository. I then deleted one of the plans, but the repository still shows the old backup.
Is there a way to remove that data without deleting the repository? I see no option for this in the interface...
image

@garethgeorge
Copy link
Owner

garethgeorge commented Feb 8, 2024

You're right that backrest will retain these forever so long as the snapshots are retained in your repo (and with the plan deleted backrest is no longer managing forgets / prunes for snapshots created by that plan).

If you go ahead and delete those snapshots with the restic cli, backrest will pick this up after the next backup and will garbage collect the associated UI entries.

I can see the argument for this being a UI capability, but I'd like to hold off on adding it for now. With the exception of managed forget operations (which restic ensures will always keep at least one copy of your data) backrest today executes very few destructive operations on your behalf and that's an important part of ensuring it's safe for your data.

@garethgeorge
Copy link
Owner

use restic forget --keep-last 1 --tag plan:yourplanID to forget all but the most recent snapshot in that set, then find the snapshot ID of the last remaining snapshot and run restic forget <snapshotID> to finish cleanup.

@modem
Copy link
Author

modem commented Feb 8, 2024

I can't run this on the official backrest container... We need shell support.

@garethgeorge garethgeorge added the enhancement New feature or request label Feb 14, 2024
@garethgeorge
Copy link
Owner

#72 adds a button for manually forgetting individual snapshots.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants