Hi,
I am trying to implement a basic filter scheme … basically I want to exclude a specific folder entirely, except one subfolder.
I am working with duplicati version 2.0.7.1_beta_2023-05-25
So I did a simple test directory, with the following structure:
I attache a zipfile with the structure, for easy replication.
duplicati_test.zip (2.1 KB)
F:.
└───duplicati_test
├───folder 1
│ ├───folder1_1
│ ├───folder1_2
│ └───folder1_3
└───folder 2
├───folder1_1
├───folder1_2
└───folder1_3
now I want to apply a filter rule to
exclude everything in
f:\duplicati_test\folder 1
except everything under:
f:\duplicati_test\folder 1\folder1_2
so I run the following command:
F:\>Duplicati.CommandLine.exe test-filters f:\duplicati_test --include="f:\duplicati_test\folder 1\folder1_2\\" --exclude="f:\duplicati_test\folder 1\\"
which yields this output:
Including source path: f:\duplicati_test\
Excluding path due to filter: f:\duplicati_test\folder 1\ => (@f:\duplicati_test\folder 1\)
Including path as no filters matched: f:\duplicati_test\folder 2\
Including path as no filters matched: f:\duplicati_test\folder 2\folder1_1\
Including path as no filters matched: f:\duplicati_test\folder 2\folder1_2\
Including path as no filters matched: f:\duplicati_test\folder 2\folder1_3\
Including path as no filters matched: f:\duplicati_test\folder 2\folder1_3\file1.txt.txt
Including path as no filters matched: f:\duplicati_test\folder 2\folder1_2\file1.txt.txt
Including path as no filters matched: f:\duplicati_test\folder 2\folder1_1\file1.txt.txt
Matched 3 files (12 Bytes)
Basically
f:\duplicati_test\folder 1
is completely excluded
I tried to achieve the same with regexp filters, which should do the job according to here:
but basically I get the same result as above.
F:\>Duplicati.CommandLine.exe test-filters f:\duplicati_test --exclude="[^F:\\duplicati_test\\folder 1\\(?!folder1_2\\).*$]"
Including source path: f:\duplicati_test\
Excluding path due to filter: f:\duplicati_test\folder 1\ => ([^F:\\duplicati_test\\folder 1\\(?!folder1_2\\).*$])
Including path as no filters matched: f:\duplicati_test\folder 2\
Including path as no filters matched: f:\duplicati_test\folder 2\folder1_1\
Including path as no filters matched: f:\duplicati_test\folder 2\folder1_2\
Including path as no filters matched: f:\duplicati_test\folder 2\folder1_3\
Including path as no filters matched: f:\duplicati_test\folder 2\folder1_3\file1.txt.txt
Including path as no filters matched: f:\duplicati_test\folder 2\folder1_2\file1.txt.txt
Including path as no filters matched: f:\duplicati_test\folder 2\folder1_1\file1.txt.txt
Matched 3 files (12 Bytes)
Anyone has a suggestion how to achieve what I am looking for ?
Best Regards