Only "exclude file" filter works

Using on Windows 10 x64.

It appears that “Exclude expression”, “Exclude regular expression”, and “Exclude folder” all do nothing, while “Exclude file” works for both files and folders. This is confusing and frustrating. It would be better to not have the broken features visible in the web UI at all if they’re not going to do anything.

Edit: Additionally, excluding folders via the “Exclude file” filter works only if the path has a backslash at the end.

Yeah, the GUI for building filters is a bit buggy. The beta version you are using sometimes adds too many trailing slashes behind the scenes and it makes the filter not work.

Some improvement made in the Canary channel but it’s still not perfect.

In the meantime, I recommend using the “Edit as text” option (click the 3 dot menu to the right of the filter option) and manually entering your filters. Let me know if you need any assistance with that.

1 Like

Thanks. I did make use of the “edit as text” option, but still ran into some problems. Here is what I have been able to get working so far:

  1. Minus - followed by full path to a file to be excluded. Shows up as an “Exclude file” rule.
  2. Minus - followed by full path to a folder to be excluded, with one trailing slash. Shows up as an “Exclude file” rule.
  3. Minus - followed by open+close square bracket pair [] containing a regular expression. Shows up as an “Exclude regular expression” rule.

What doesn’t work:

  1. Minus - followed by path with two or more slashes at the end. Shows up as “Exclude folder” but accomplishes nothing.
  2. Minus - followed by a pattern like C:\*.dat. Shows up as “Exclude expression” but accomplishes nothing. This type of filter does not seem to be documented at Filters - Duplicati 2 User's Manual and might be better called “Exclude pattern”.

I haven’t tested any of the other filter types.

It’s also weird that there are both “Exclude filter group” options and an entire separate “Exclude” fold with checkboxes. Seems like it would be better to combine both into a single approach.

When you use the Edit as text option, don’t switch back to Edit as list to see what it looks like - that action can foul up the filters. Just leave it on Edit as text, enter them correctly, and proceed to the next pages and save.

There’s ultimately only two types of filters… standard and regex (with the square brackets). And two modes, include or exclude. (Prefix with either a plus or a hyphen, respectively.) Edit: plus the special “exclude filter group” option.

A bug was inadvertently made in Canary, and fixed in Canary (newer than Beta):

Improved regexp magic for parsing Windows, thanks @drwtsn32x

You can see a comment by the original Duplicati author that this round-trip dropdown choosing is iffy.
Nevertheless, next Beta should pick up the fix, so at least the dropdown-to-text way will run better…

It’s also confusing to someone who did read the Filters manual because it tries to shield them from it.

Filter group is complex and very different. You can see what it does in a command prompt by running.

Duplicati.CommandLine.exe help filter-group

Or the GUI Commandline can also be asked to run the help command.

1 Like

Here’s what I’m talking about in regards to “Exclude filter group” versus the separate Exclude section. There’s even overlap (“System files” and “Temporary files”) but also non-overlapping items:

Historical questions are often difficult to research, however I will point to some things I came across. looked like below. I have begun an add filter dialog, to give a glimpse of it:

image looked like below. There appear to be checkboxes for OS-specific filters. has Exclude filter group on the dropdown for the first time, as per:

  • Added filter groups and a UI for it, thanks @tygill


For discussions and code changes, see Revise default backup filter UI #3030 and also follow its links.

But having traced the evolution of the UI a bit, and not having written or read the code, I wonder if the bottom section is what one might call file attributes (see Windows and probably DOS attrib command) being formalized as attributes that the Microsoft .NET design makes available in per-file FileAttributes.

The upper section looks path-oriented, so System Files would be path patterns you see in the help, whereas the lower section would be the file attribute as in attrib command (and also dir command).

My thoughts on the lower section are a guess, but you can do some testing of it, or maybe find a post.
Actually I think the lower section is documented in a Filters manual section which explains it as below:

Besides filter rules there are settings that can exclude specific files by their attributes. Those settings are --skip-files-larger-than and --exclude-files-attributes . The latter is able to exclude files that have any of the following attributes: ReadOnly , Hidden , System , Directory , Archive , Device , Normal , Temporary . Those settings are applied to all files of the backup.

Bug #3030 is closed. Looks like Expose full filter group contents in UI #3180 is an open followup, so I’m tagging it here.

If there’s anything more to tagging than you like the idea, please clarify. This topic has rambled a bit.