i have like 300something folders for different projects in my source, around 3TB in total. I wanted to split it up, so that Folders with names that start with 0-9 get a job, Folders with names that start with a-e to get a single job and so on.
I´ve tried every way i could imagine, but i just can not get it to work right.
What would be the correct way to tackle this? Or is it just not possible?
The GUI highlighting seems a bit broken. This is disappointing because there was work meant to improve highlighting by having the GUI ask the server for server-side analysis for filtering results, thereby avoiding issues from the differences in regex support between JavaScript and C# styles.
What I actually see on the test-filter request is that a leading wildcard * gets correct limited result, then the GUI goes ahead on its own and highlights folders that are in the wrong directory.
This doesn’t seem to affect backup, which makes me wonder if you ran one or just saw highlight.
Assuming everything is at one level as seen here, you can just provide actual leading path prefix.
After that, you can pick your folders with either include or exclude rules, but exclude is easier, as
In the special case that all rules are include rules (which does not make sense when all files and folders are included per default) Duplicati assumes that all other files and folders are meant to be excluded (this had to be defined as another rule in Duplicati 1.3 but most people found that confusing so we changed that in Duplicati 2.0).
and unfortunately the above from the old docs seemingly did not make it into the current docs:
and also unfortunately the GUI code seems to actually emit an implied include rule not exclude.
You can see this in developer tools in the web browser (sometimes on F12 key), but that varies.
So if you use an include, you can satisfy Duplicati by giving your own wildcard exclude * at end.
If you use an exclude, you don’t fall into this special case, so no additional exclude is necessary.
You seem to have lower and upper case letters, so I’m going to change my 2.4.0.1 Settings like:
You can try Linux man ascii or see ASCII Table to see how numbers go first, then upper case English letters, then lower case English letters, with various things in between (if you have any).
For demo purposes, I created folders 0 1 A B a b, each with a file inside, to show filtering setup.
Both examples when actually run seem to highlight right and give a Restore view matching that.
Because you probably don’t want to test on 3TB of backup, you can set up your own small trials.
Note that your scheme is a bit rigid if you change your mind, due to old versions with old layouts.
You can certainly purge unwanted data, but you can’t move that old folder to a different backup.
Bug cases:
Here I omit the prefix path on an include, test-filter adds a seeming include-all-folders, and GUI highlights lots of extras beginning with letter a. For example, notice files from the /etc/folder:
I´ve trial&error´d another session on friday and i´ve figured it out now.
What threw me completely off, is that the source path gets ignored as soon as i use expressions in the filters. That the gui dropdowns changes itself as soon as you type something sometimes did not help either.
So basically i´ve just used these filters like this for my jobs now:
I did run multiple tests with multiple settings, i do not remember the outcome of every one.
Main issue was: my sourcefolder was /backups/Projekte/
as soon as i filtered expressions for “*/b*” or “*/P*” it marked the whole /backups folder or the whole “/backups/Projekte” folder because it ignores the source path. It backupped everything that was marked in the source folder.
Filtering out the other Folders with “*” did not work, because, of course, they were already in my include filter. That said, i would have needed to exclude the other folders by name, which was not possible because the filtering system seems to break at max 18 entries.
But your final solution used expressions, although it used path prefix not * (my suspect).
Maybe you meant that, the globbing expression (term used in docs) at start of the filter?
I consider that a bug, but maybe the developer will have an explanation of why it’s not…
There were a bunch of other things here that also look like they’re off, plus missing docs.
I think it’s trying to make its best choice for what there is so far in your incomplete typing.
A filter is just a string, dropdown display is just reverse-engineering the string built so far.
I don’t know exactly what you saw. If you like, you can see if explanation matches actual.
Also makes me think you mean a leading * broke highlighting (which I would agree with).
I think that statement means it backed up exactly correctly though, and didn’t backup the
level above the source folder even though /backup begins with a */b*, and highlighted
when it shouldn’t have. You can see the backup command in Export → As command line.
If actual backup is bad per filter rules, that’s a bigger issue than the highlighting being off.
They shouldn’t be, per your plan to have include filters for only a subset of available folders.
If you’re talking about highlighting looking off, that’s different but I don’t think it hurts backup.
Or did you mean to write that it backed up above source folder in addition to items below it?
I took your /backups/Projekte/ source folder + “marked in the source folder” to be below.
Clarify? If you have an old Duplicati, there was a bug. There is now a scrollbar to use,
however at least on my system, you need to wiggle the mouse in area to get it visible:
got fixed on Jan 27, so would be shipping in current releases. Is this some other break?
You also don’t need to exclude or include by name one-per-line, if ranges will do the job.
There might be some cases that don’t work, and I’m not certain how Unicode would run.
If you are on old release and wish to stay there, I think you can still use three-dot menu.
“Edit as text” will (I think) take a long list (and is easier for entry of lots of filters anyway).
Using exclude approach rather than an include one would avoid need to remove others.
Unfortunately it looks like perhaps I was writing that simultaneously with your own effort.
Let’s see what this does for the now-undocumented implicit exclude after a specific include:
$ duplicati-cli test-filters /backups/Projekte/ --include="*/Projekte/b*"
Including path due to filter: /backups/Projekte/a/ => (*/Projekte/b*) || (*/)
Including path due to filter: /backups/Projekte/b/ => (*/Projekte/b*) || (*/)
Including path due to filter: /backups/Projekte/b/file => (*/Projekte/b*) || (*/)
Excluding path due to filter: /backups/Projekte/a/file => null
Matched 1 files (0 bytes)
Reminds me of what I saw and mentioned on the network test-filter that seemed odd.
Regardless, I can get rid of the implicit addition by supplying my own exclude, for example:
$ duplicati-cli test-filters /backups/Projekte/ --include="*/Projekte/b*" --exclude="*"
Excluding path due to filter: /backups/Projekte/a/ => (*)
Including path due to filter: /backups/Projekte/b/ => (*/Projekte/b*)
Including path due to filter: /backups/Projekte/b/file => (*/Projekte/b*)
Matched 1 files (0 bytes)
Above looks like what I wanted, which is b folder, its file, and no other folders such as a.
This is probably the same as the GUI example I gave using include, but exclude is easier.
One concern is that another GUI bug seems to be that if you want to Exclude * you should
-* in Edit as text because typing “Exclude expression” of * seems to lose its * somewhere.
It’s gone in “Edit as list”. If I save without looking, I see it go to server, but an export lacks it.
Since I was claiming that exclude is easier (one line), let’s try some on CLI test-filters:
Let’s say I want the A-Z folders, and not the 0-9 or a-z folders, but you can set as you like.
$ duplicati-cli test-filters /test/ --exclude='[/test/[0-9a-z].*]'
Including path as no filters matched: /test/A/
Including path as no filters matched: /test/B/
Excluding path due to filter: /test/a/ => ([^(/test/[0-9a-z].*)$])
Excluding path due to filter: /test/1/ => ([^(/test/[0-9a-z].*)$])
Excluding path due to filter: /test/0/ => ([^(/test/[0-9a-z].*)$])
Excluding path due to filter: /test/b/ => ([^(/test/[0-9a-z].*)$])
Including path as no filters matched: /test/B/file
Including path as no filters matched: /test/A/file
Matched 2 files (0 bytes)
$ duplicati-cli test-filters /test/ --exclude='[/test/[^A-Z].*]'
Including path as no filters matched: /test/A/
Including path as no filters matched: /test/B/
Excluding path due to filter: /test/a/ => ([^(/test/[^A-Z].*)$])
Excluding path due to filter: /test/1/ => ([^(/test/[^A-Z].*)$])
Excluding path due to filter: /test/0/ => ([^(/test/[^A-Z].*)$])
Excluding path due to filter: /test/b/ => ([^(/test/[^A-Z].*)$])
Including path as no filters matched: /test/B/file
Including path as no filters matched: /test/A/file
Matched 2 files (0 bytes)
$
I opened two issues on the GUI yesterday, one on the highlighting, another on filter builder.
See the first edit at bottom of earlier post. If I misunderstood your issue, please clarify how.
I can’t find that anyone has opened an issue on the general issue of filter builder guessing
your intent as you go, but I don’t know if you have a specific case that looks like it’s wrong.
An example of one that looks right is if I do Excludes expression of *lock, then edit that to *.lock (maybe its new favorite default because I complained that * was too dangerous),
shows the result on the bottom line, and the prior version on next to bottom. So maybe the
idea is that if it can recognize something specific, it will show that instead of a generic term.
There have also been actual bugs, but to fix those, it helps to describe problem specifically.