# Filters, Regex, glob? What do i do to make it work?

**URL:** <https://forum.duplicati.com/t/filters-regex-glob-what-do-i-do-to-make-it-work/22791>\
**Category:** Support\
**Created:** [October 15, 2026, 6:35am UTC](https://forum.duplicati.com/t/filters-regex-glob-what-do-i-do-to-make-it-work/22791 "2026-10-15T06:35:14Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![x86](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/x/b5a626/32.png) [@x86](https://forum.duplicati.com/u/x86)\
**Post date:** [October 15, 2026, 6:35am UTC](https://forum.duplicati.com/t/filters-regex-glob-what-do-i-do-to-make-it-work/22791/1 "2026-10-15T06:35:14Z")

</div>

Hello,

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?

any help would be appreciated

 ![Duplicati](https://forum.duplicati.com/uploads/default/original/2X/3/303e8c86e8d85e1e6b6fdd91bce7464bb4920630.png)

---

<div class="post-metadata">

**Author:** ![ts678](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/t/8491ac/32.png) [@ts678](https://forum.duplicati.com/u/ts678)\
**Post date:** [October 17, 2026, 12:33am UTC](https://forum.duplicati.com/t/filters-regex-glob-what-do-i-do-to-make-it-work/22791/2 "2026-10-17T00:33:59Z")

</div>

> [@x86](#):
>
> i just can not get it to work right.

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](https://github.com/duplicati/ngclient/commit/720a6fa342a92721d7231932519d246734f8f393#diff-e3d642ff1186773d8546e4ca41ef7dfab3c9e5d44158879538db7d0e84a4ccb6) for [server-side analysis](https://github.com/duplicati/duplicati/pull/6955) 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

[Filters](https://prev-docs.duplicati.com/en/latest/appendix-d-filters/)

> 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:

[Filters in Duplicati](https://docs.duplicati.com/security-and-secrets/filters-in-duplicati)

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:

![image](https://forum.duplicati.com/uploads/default/optimized/2X/f/f06e73ae01d531bbc5c3a0e75d613decad9ef8f9_2_690x72.png)

You can try Linux `man ascii` or see [ASCII Table](https://www.asciitable.com/) 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.

 ![image](https://forum.duplicati.com/uploads/default/original/2X/6/67a0bea241c4bcc3c9a77512eec3cdaa3e273053.png)

Or, if you prefer to say what you want using a single character class, at expense of an exclude:

 ![image](https://forum.duplicati.com/uploads/default/original/2X/5/50984118cc7a48309b08ffeb3ef986fa804b9608.png)

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:

 ![image](https://forum.duplicati.com/uploads/default/original/2X/b/bbb1aa55782caac4354e007c7b4a756fbefbda25.png)

Here’s the regular expression version of the weird GUI highlighting:

 ![image](https://forum.duplicati.com/uploads/default/original/2X/d/d45d2dde11e244eff43b52b25539cb67de330d60.png)

EDIT 1:

Although a path prefix seems safer, this case seems to work without highlighting extra “a” files:

 ![image](https://forum.duplicati.com/uploads/default/original/2X/8/883ef67d7bc16b787e8ebc47eefde79f0cff562e.png)

But the non-regex version goes wandering with its highlight into some folders it shouldn’t be in:

 ![image](https://forum.duplicati.com/uploads/default/original/2X/0/085b0e4ab482bd4a45657f076d5728fffc9d641e.png)

EDIT 2:

Weird highlighting doesn’t seem to hurt the actual backup, e.g. the one I just did has Restore of:

 ![image](https://forum.duplicati.com/uploads/default/original/2X/7/758cda5444ca27842b2f5ada4a4aa022fd8fd3b6.png)

---

<div class="post-metadata">

**Author:** ![x86](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/x/b5a626/32.png) [@x86](https://forum.duplicati.com/u/x86)\
**Post date:** [October 19, 2026, 6:26am UTC](https://forum.duplicati.com/t/filters-regex-glob-what-do-i-do-to-make-it-work/22791/3 "2026-10-19T06:26:17Z")

</div>

Hey man,

thanks for your excellent reply.

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:

+/backups/Projekte/k\*  
+/backups/Projekte/K\*  
+/backups/Projekte/l\*  
+/backups/Projekte/L\*  
+/backups/Projekte/m\*  
+/backups/Projekte/M\*  
+/backups/Projekte/n\*  
+/backups/Projekte/N\*  
+/backups/Projekte/o\*  
+/backups/Projekte/O\*  
-\*\*/

thats not pretty, but it works for me.

---

<div class="post-metadata">

**Author:** ![x86](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/x/b5a626/32.png) [@x86](https://forum.duplicati.com/u/x86)\
**Post date:** [October 19, 2026, 6:37am UTC](https://forum.duplicati.com/t/filters-regex-glob-what-do-i-do-to-make-it-work/22791/4 "2026-10-19T06:37:48Z")

</div>

> [@ts678](#):
>
> This doesn’t seem to affect backup, which makes me wonder if you ran one or just saw highlight.

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.

---

<div class="post-metadata">

**Author:** ![ts678](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/t/8491ac/32.png) [@ts678](https://forum.duplicati.com/u/ts678)\
**Post date:** [October 19, 2026, 8:06pm UTC](https://forum.duplicati.com/t/filters-regex-glob-what-do-i-do-to-make-it-work/22791/5 "2026-10-19T20:06:32Z")

</div>

> [@x86](#):
>
> the source path gets ignored as soon as i use expressions in the filters.

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.

> [@x86](#):
>
> That the gui dropdowns changes itself as soon as you type something sometimes did not help either.

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.

> [@x86](#):
>
> So basically i´ve just used these filters like this for my jobs now:
> 
> +/backups/Projekte/k\*

> [@x86](#):
>
> 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.

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.

> [@x86](#):
>
> Filtering out the other Folders with “\*” did not work, because, of course, they were already in my include filter.

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.

> [@x86](#):
>
> 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.

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:

 ![image](https://forum.duplicati.com/uploads/default/original/2X/a/a15f6a4b78c25600d09121df75d67f5b17576099.png)

[19th and Later Filters Hidden and Inaccessible while Creating/Editing Backup Set #435](https://github.com/duplicati/ngclient/issues/435)

[Source filter display has limit – some say 18, some say 10 #407](https://github.com/duplicati/ngclient/issues/407)

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.

[The TEST-FILTERS command](https://prev-docs.duplicati.com/en/latest/04-using-duplicati-from-the-command-line/#the-test-filters-command) (from old docs, and I don’t think I see it in the new docs):

> Scans the source files and tests against the filters specified, the console output shows which files and folders are examined and the result. Usage:

`Duplicati.CommandLine.exe test-filters <source-path> [<options>]`

```plaintext
$ find /backups
/backups
/backups/Projekte
/backups/Projekte/a
/backups/Projekte/a/file
/backups/Projekte/b
/backups/Projekte/b/file
$ 

```

Let’s see what this does for the now-undocumented implicit exclude after a specific include:

```plaintext
$ 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:

```plaintext
$ 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.

EDIT 1 on ngclient issues I just opened.

[include filter with \* at start may highlight source outside of selection #580](https://github.com/duplicati/ngclient/issues/580)

[typed filter expression \* is ignored, then taken, then not sent to server #579](https://github.com/duplicati/ngclient/issues/579)

---

<div class="post-metadata">

**Author:** ![ts678](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/t/8491ac/32.png) [@ts678](https://forum.duplicati.com/u/ts678)\
**Post date:** [October 19, 2026, 10:23pm UTC](https://forum.duplicati.com/t/filters-regex-glob-what-do-i-do-to-make-it-work/22791/6 "2026-10-19T22:23:11Z")

</div>

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.

[Character classes in regular expressions](https://learn.microsoft.com/en-us/dotnet/standard/base-types/character-classes-in-regular-expressions)

[Positive character group: []](https://learn.microsoft.com/en-us/dotnet/standard/base-types/character-classes-in-regular-expressions#positive-character-group--) where you exclude what you don’t want:

```plaintext
$ 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)

```

[Negative character group: [^]](https://learn.microsoft.com/en-us/dotnet/standard/base-types/character-classes-in-regular-expressions#negative-character-group-) exclude everything except desired range:

```plaintext
$ 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)
$ 

```

---

<div class="post-metadata">

**Author:** ![x86](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/x/b5a626/32.png) [@x86](https://forum.duplicati.com/u/x86)\
**Post date:** [October 20, 2026, 6:58am UTC](https://forum.duplicati.com/t/filters-regex-glob-what-do-i-do-to-make-it-work/22791/7 "2026-10-20T06:58:55Z")

</div>

I think we can agree that filters are kinda funky or at least the folder marker in the GUI is.

---

<div class="post-metadata">

**Author:** ![ts678](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/t/8491ac/32.png) [@ts678](https://forum.duplicati.com/u/ts678)\
**Post date:** [October 20, 2026, 1:43pm UTC](https://forum.duplicati.com/t/filters-regex-glob-what-do-i-do-to-make-it-work/22791/8 "2026-10-20T13:43:21Z")

</div>

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](https://forum.duplicati.com/t/filters-regex-glob-what-do-i-do-to-make-it-work/22791/5). 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),

![image](https://forum.duplicati.com/uploads/default/original/2X/0/0a49a497890bf4ef97939af631c642b3343c63d9.png)

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.
