V2.0.9 regex filters not working on OS X

I’ve just downloaded the CLI version on my mac (OS X 10.13). Storage initialisation etc seems to go fine.

However, I can’t get filters to work as per the documentation at duplicacy/GUIDE.md at master · gilbertchen/duplicacy · GitHub

I’m editing .duplicacy/filters directly, and running the backup command with -debug. Wildcard matching works fine. For example a filters file containing only the line

+Documents/

matches all subfolders under Documents.

However, regular expression matching does not seem to work. A filters file containing only the line

i:.*

Results in everything in the repository being excluded.

Example output as follows:


Indexing /Users/nathan
Loaded 1 include/exclude pattern(s)
Pattern: +i:.*
Listing
.CFUserTextEncoding is excluded
.DS_Store is excluded
.bash_history is excluded
.viminfo is excluded
backup.sh is excluded
.Trash/ is excluded
.bash_sessions/ is excluded
.config/ is excluded
.cups/ is excluded
.dropbox/ is excluded
.local/ is excluded
.ssh/ is excluded
.vscode/ is excluded
Applications/ is excluded
Desktop/ is excluded
Documents/ is excluded
Downloads/ is excluded
Dropbox/ is excluded
Library/ is excluded
Movies/ is excluded
Music/ is excluded
Pictures/ is excluded
Public/ is excluded
Pattern: +i:.*

Did you have an extra + for the pattern? The correct one should be i:.*.

No extra plus sign in the filters file. The log output lists it though, I assume the plus sign is just in the log output.

I forgot that the regex support was merged after version 2.0.9 has been released. You need to build from the latest source to make it work.

Ok that makes sense. Just built from source and regex filters work as expected. Thanks!

Interestingly I haven’t yet installed Xcode (although I do have xcode command line tools installed), just ran the command go get -u github.com/gilbertchen/duplicacy/ from the wiki, and keychain seems to be working on OS X 10.13.

What is actually needed is the Xcode command line tools – github.com/gilbertchen/keyring requires cgo to compile.