TL;DR request for anyone who has urbackupclient working in visual studio:
Please ensure you have at least one backup exclude rule, then make a breakpoint at client.cpp line 3713
bool b=amatch(wpath.c_str(), exclude_dirs[i].c_str());
I need to know exactly what the string
wpath looks like in this moment.
I’m setting up urBackup for my environment, going through all the options meticulously. I am trying to set some complex exclude rules, but I need to know the specifics of the syntax to know what is possible. I figure the best way to do this is directly from the source. I pulled the amatch function from glob.cpp and wrapped it in a command line tool to experiment. Either I am totally off on something, or Windows (backslash) matching is broken:
$ ./m "c:\\test.sys" "*.sys" Excluded $ ./m "c:\\test.sys" "test.sys" No match $ ./m "c:\\test.sys" "c:\\test.sys" No match $ ./m "c:/test.sys" "c:/test.sys" Excluded
Even the windows paths in
test_amatch break if you reverse the slashes
$ ./m "Users/Bernd/bla/Documents/xyz" "Users/:/:/Documents/*" Excluded $ ./m "Users\\Bernd\\bla\\Documents\\xyz" "Users\\:\\:\\Documents\\*" No match
The only way this makes sense is if all backslashes are changed to forward slashes before comparison in both the file path and exclude filter, but that seems to contradict the help page
“Use a backslash for Windows clients (
"\") and a forward slash for Linux clients (
"/") to separate folders.”
and makes half the tests in test_amatch pointless.