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

support for --files-from? #44

Closed
ginabythebay opened this issue Dec 31, 2021 · 2 comments
Closed

support for --files-from? #44

ginabythebay opened this issue Dec 31, 2021 · 2 comments

Comments

@ginabythebay
Copy link

Do you have any interested in supporting the --files-from option for the backup command? I need something like that to just include certain files from a path I want to backup. If it sounds interesting to you, I could try putting together a PR (my bash-fu is a little weak compared to yours, so any guidance would be helpful).

Also, thanks for putting this together, I think this is going to work great for me.

@erikw
Copy link
Owner

erikw commented Dec 31, 2021

Hey,

I've not used the --files-from way myself but I can see how it can be useful. For this repo, I think it might be a bit too specific, as I intent that this repo is more general "tutorial" style to inspire people to make the full solution they need themselves.

However if you have an example of how you set this up for yourselves, you could share it here, and I could include a link in the README for those who are interested in this way of using restic :)

@erikw erikw closed this as completed Dec 31, 2021
@ginabythebay
Copy link
Author

...if you have an example of how you set this up for yourselves, you could share it here...

Sure....my use case is that I keep a lot of pdfs in google drive and want to back them up, but not all the other stuff that is in there. They are accessible through fuse in /home/gina/gdrive. My solution was to create the file /etc/restic/backup_files_from containing one line:

/home/gina/gdrive/**/*.pdf

Then I modified restic_backup.sh, adding this just before BACKUP_TAG is set:

BACKUP_FILES_FROM=""
[ -f /etc/restic/backup_files_from ] && BACKUP_FILES_FROM+="--files-from /etc/restic/backup_files_from"

and I modified the invocation of restic backup, adding

        $BACKUP_FILES_FROM \

after the BACKUP_EXCLUDES part.

erikw added a commit that referenced this issue Jan 1, 2022
Fixes #44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants