Include Filter on GUI For a Range of Characters

I’m trying to implement an include filter on a source directory.

My folder structure looks like this:

/path/
     Adirectory/
         file.txt
     Bdirectory/
         file2.txt
     Cdirectory/
         file3.txt

Using the GUI, I use include expression and put in /path/[A-B]* to try to include Adirectory and Bdirectory; however, no files are included in the backup. Could someone help me figure out how to format the include filter?

You should be able to do this with a regular expression.

Depending on what version of Duplicati you are using, you may have trouble with the filter builder in the web UI (page 3 of your backup configuration). As a workaround try clicking the three-dot menu to the right of the “Filters” section and click “Edit as text”. Then in the text field add this include filter:

+[/path/[A-B].*]

The + means it’s an include expression, and putting square brackets around the filter indicates it’s a regular expression. I have used your example but added a missing dot in front of the asterisk.

Then click Next a couple times and Save your backup job and see if it works now.

Ah thanks. That fixed it. It was my confusion between using the include expression vs include regular expression and the missing period.

1 Like