-
Notifications
You must be signed in to change notification settings - Fork 141
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 general patterns #1991
Comments
I think I am in the same situation. I wanted to backup my linux home directory without the "." files and folders. But there are exceptions like ".ssh", ".profile", ".bashrc" which I'd like to keep. If I understand the borg documentation correctly then you could potentially work with "+" and "-" to mark include and exclude rules. By orderly assembling them you could go ahead and e. g. make specific includes in a directory followed by a general exclude - like:
If that's general patterns , then I would like this feature too. I think having a separate sources tab and menu for exclusions maybe wouldn't fit in this usecase... Why not have a "raw" rules (general patterns?) tab, which can be filled like the example above to have includes and excludes together in one place. This way you would be able to manage the order of your rules. |
Another alternative until the Vorta UI supports this use case is to supply the necessary parameters directly to the borg command.
For example:
Although I've only tested the above example, you should be able to use all the patterns listed in the borg documentation and thus create more complex exclusions than this example (such as including any folder called "saved-games" no matter how deep in the folder hierarchy it is found). Don't forget to remove the exclusion from the main list of exclusions in the "Sources" tab if you've had it there previously. |
And finally, here is a comment on the use of
Example for my_pattern_example.lst:
Using |
From the discussions, it seems that the support of "includes" is a feature desired/ required by some users: |
The problem
Currently i cannot exclude a directory and then include a subdirectory of that excluded one in the backup as Vorta supports exclude patterns only.
Requested Solution
As written in the explanation to borg patterns (https://borgbackup.readthedocs.io/en/stable/usage/help.html#borg-patterns) borg supports include and exclude patterns if it is used with the "right" argument. Vorta uses the exclude-argument which prevents the usage of include patterns.
So the requested solution would be to allow the usage of the more general patterns instead of the exclude-option solely.
Alternatives
The alternative with current capabilities would be to explicitly add all subdirectories and files of my home directory without the games dir. In addition I would then select the specific paths within the games directory. This way I could work around the exclusion of "games" and have its targeted subdirectories included.
The downside is that any new directory in my home directory needs to be added manually in Vorta. So it's not a viable alternative imho.
Additional context
I use Vorta to backup my home directory. In my home directory is a subdirectory for my installed games. I do not want to include those gigabytes of game files within the backup so naturally I exclude that subdirectory. But I DO want to backup specific game related files, e.g. savegames and settings. These reside in various subdirectories of the games directory.
The text was updated successfully, but these errors were encountered: