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

Add --include-if-present or a way to generate list of files to backup #1382

Open
dionorgua opened this issue Dec 8, 2024 · 0 comments
Open
Labels
C-enhancement Category: New feature or request

Comments

@dionorgua
Copy link

Hi,

Finally I've got some time to try migrating backups from restic to rustic again. Right now it's big enough amount of shell code that generates CLI opts for restic. I'm very impressed with rustic config file and would like to use it. Ideally without passing any extra CLI args if possible

One of features that I use extensively is --exclude-if-present. Basically I've a few 'tiers' of data on all machines that I backup:

  • CACHEDIR.TAG -- cache and stuff that I don't want to backup
  • .bckexclude_garbage -- I don't backup this to main repo. But it still has some value. For example ~/tmp or ~/Downloads.

So for my main repo I will exclude both. But at the same time I've second repository that I don't mirror to cloud. And I would like to backup only directories that were skipped due to .bckexclude_garbage. Yes. It makes restore more difficult. But still better than not have this data at all.

For restic I'm doing this using find /path -name ... and generating CLI args. For rustic I think that I can generate' profile.toml file before doing actual backup. But maybe it makes sense to have it in rustic itself. For example that --include-if-present option.

Basically such --include-if-present <filename> should assume everything as exclude unless there is filename in any parent directory.

I'm not fully aware of all rustic features. Maybe it's easier to achieve same results using other ways.

@github-actions github-actions bot added the S-triage Status: Waiting for a maintainer to triage this issue/PR label Dec 8, 2024
@aawsome aawsome added this to the Rework includes/excludes milestone Jan 19, 2025
@aawsome aawsome added C-enhancement Category: New feature or request and removed S-triage Status: Waiting for a maintainer to triage this issue/PR labels Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants