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

Allow finding large files and removing them from existing snapshots. #200

Closed
ibash opened this issue May 17, 2022 · 2 comments
Closed

Allow finding large files and removing them from existing snapshots. #200

ibash opened this issue May 17, 2022 · 2 comments
Labels
question Further information is requested

Comments

@ibash
Copy link

ibash commented May 17, 2022

Is your feature request related to a problem? Please describe.
I don't use autorestic right now, but restic with my own scripts. I'm planning on switching over when I find the time. Something I've found very useful is to be able to automatically find large files and then use restic rewrite command to remove them from my backups.

Describe the solution you'd like
Currently this is my workflow:

  1. For each snapshot run restic ls --json -l ${snapshotId} and write it to a file
  2. I do some light processing to produce sizes of directories
  3. Then sort by the largest files and directories
  4. At this point I manually look through for directories / files that are large and I didn't want to backup anyway. I add them to a list of files to clean.
  5. Then run restic rewrite all --dry-run --exclude-file clean-excludes.txt --verbose=3 to spot check
  6. Then run restic rewrite all --exclude-file clean-excludes.txt --verbose=3 --forget to remove them

This does require relying on a fork of restic, but I find this very useful for my backups. Would love if something like this was available in autorestic (maybe opt-in?).

@cupcakearmy
Copy link
Owner

I think this is a bit of a niece case for an actual implementation on autorestic side.
However: you can run any restic command with autorestic with the exec command. This should enable your workflow

@cupcakearmy cupcakearmy added the question Further information is requested label May 24, 2022
@ibash
Copy link
Author

ibash commented May 25, 2022

Agree, it's probably too niche!

@ibash ibash closed this as completed May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants