Closed x80486 closed 4 years ago
Could you add .nobackup to Exclude if Present, and put .nobackup in .gradle and .terraform?
Indeed, I explored that also, but turns out a good amount of the subdirectories I have in the exclusion list are wiped out and recreated with some frequency, so I would have to come back and copy again the .nobackup
file on all of them.
What I put is just a very small amount of folder/files that I'm excluding.
Try making .nobackup undeletable (chattr +i .nobackup)
Found this https://manpages.debian.org/testing/borgbackup/borg-patterns.1.en.html. Path prefix and path full-match might be useful
@x80486 isn't that what you need?:
/home/x80486/**/.idea
/home/x80486/**/node_modules
/home/x80486/.gradle
/home/x80486/.terraform
Untested, please carefully try yourself.
Indeed, but what I was saying was that since we already provided the source path, there shouldn't be a need to specify it again on every exclude entry because it should be inferred, right? Although reading through Borg I can see that it should be done in such way.
In any case, what you wrote there (augmented) works for me :partying_face: :trophy: :tropical_drink:
/home/x80486/.asdf
/home/x80486/.cache
/home/x80486/.gradle
/home/x80486/.gradle-kotlin-dsl
/home/x80486/.java
/home/x80486/.local/share/Trash
/home/x80486/.m2
/home/x80486/.nix-defexpr
/home/x80486/.nix-profile
/home/x80486/.swt
/home/x80486/.terraform.d
/home/x80486/.var
/home/x80486/.vgrive
/home/x80486/.bash_history
/home/x80486/.esd_auth
/home/x80486/.ICEauthority
/home/x80486/.node_repl_history
/home/x80486/HalfAssAppImages
/home/x80486/Desktop
/home/x80486/Workshop/**/.idea
/home/x80486/Workshop/**/node_modules
/home/x80486/Workshop/**/*.iml
/home/x80486/Workshop/**/*.ipr
There's no relationship between roots and exclude patterns in borg.
And changing that would be a major change of behaviour (although not a total compatibility break), which we could only do when doing a new release, like 1.2 or 1.3.
But there is nobody working on that and it is also not a topic for the vorta issue tracker.
OK, @ThomasWaldmann, I get your point. I think I'll leave it open but feel free to close if you think it's not an issue or unrelated with Vorta somehow...by the way, before leaving you alone, is there a way to exclude a directory, but include some parts/paths of it at the same time? Something like:
/home/x80486/.local # Exclude .local/
!/home/x80486/.local/share/JetBrains # ...but include what's in .local/share/JetBrains/
borg takes the first matching rule, so more special / strict matches need to come before more general / less strict matches. read the borg help patterns
output or the docs on the web.
Closing, since it's not really related to Vorta.
There is another issue to discuss GUI exclude improvments: #399
Is your feature request related to a problem? Please describe.
I recently started using Vorta (and Borg); it's great, but I don't find the exclude patterns business very friendly or intuitive — compared to other applications I've used that employ "similar approaches".
For instance, if I add my home folder as part of the source files/folders to backup, let's say:
/home/x80486
, and then use these patterns:...Vorta (or Borg) will scan, recursively, every single subdirectory (starting from
/home/x80486
) and exclude everything that looks like.gradle
and.terraform
. The issue is, I just want to exclude those two at the/home/x80486
level, but not at any other depth/level.Also, using:
...doesn't do anything, which is what I would expect to work because I'm giving the root path to start scanning from already.
Describe the solution you'd like
To be able to accept relative and absolute paths accordingly to the input in the sources. For instance, if I provide
/home/x80486
as source, and the following list as patterns:...I would expect Vorta to backup everything inside
/home/x80486
except:.idea
subdirectory found (recursively) in any subdirectorynode_modules
subdirectory found (recursively) in any subdirectory.gradle
subdirectory found at/home/x80486
level, but not any other.terraform
subdirectory found at/home/x80486
level, but not any otherDescribe alternatives you've considered
None :rofl: