-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Exclude everything except one #2434
Comments
Any ideas about this? |
This does not look like a bug - I suggest you head over to https://forum.restic.net |
As @uok wrote, this would have been a better fit for the forum, as it is simply a usage question and not a bug report or feature request. There is no |
@rawtaz So... if this option doesn't exist, can this be a feature request, then? |
@nunoperalta What you want to do is already doable, so in that case you'd have to clarify what actual feature you want to add. If you are looking for an |
@rawtaz I want to be able to include EVERYTHING from: /opt But I want to exclude ALL from: /opt/someApp/ With the exception that I want to include the subfolder: /opt/someApp/data/ How do I do this? |
You:
One option is to use No, you don't have to maintain it manually, you can simply generate this exclude file dynamically right before you back up using something like It shouldn't be a problem, you can have a huge number of lines in an exclude file. It's not what you were looking for, but it does work. |
Ok. I guess I can live with an auto-generation script right before the backup, which will loop through the folder and add all the files (except the subfolder I want) to the excludes file. However, this is over-engineering for something that restic could provide with a simple option... |
On behalf of the restic community, let me deeply apologize for the inconvenience that the lack of these features has caused you. We should have done better in order to serve you a free software that more precisely meet your needs and requirements. |
@rawtaz It's ok - I'm not complaining about restic not currently having this feature. If no one ever requested it in the past, I can't blame you for not have developed it yet. Thank you very much. |
No worries, I wasn't being overly serious :-) It's already tracked in a feature request, see the issue I linked to earlier. |
Output of
restic version
restic 0.9.5 compiled with go1.12.4 on linux/amd64
What are you trying to do?
Trying to exclude everything from one directory except one sub-directory.
For example,
I want to backup everything under /etc/
I want to exclude all files and folders in /etc/pgname/ EXCEPT /etc/pgname/data/
What I tried:
restic.include:
/etc
/etc/pgname/data
restic.exclude:
/etc/pgname
Result is that "pgname" folder is empty in the snapshot.
Any ideas? Is what I want possible at the moment with Restic?
Thank you.
The text was updated successfully, but these errors were encountered: