Exclude as "Default options" in settings not working

I have made a regex to exclude Windows Excel and Word tmp files (~$…)

[.*\\[\x7e][\x24].*(xls|doc).*]

This works fine in a job. So I tried to use it in Defaults options so that this exclude is used for every job.

The command-line is

"C:\Program Files\Duplicati 2\Duplicati.CommandLine.exe"
backup
"googledrive://duplicati?authid=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
"\\server\share\folder\folder\\"
"\\server\share\folder\folder2\\"
"\\server\share\folder\folder3\\file"
 --exclude="[.*\\[\x7e][\x24].*(xls|doc).*]"
 --backup-name="xxxxxx"
 --dbpath="xxxxxx\xxxxxxx.sqlite"
 --encryption-module="aes"
 --compression-module="zip"
 --dblock-size="10MB"
 --passphrase="xxxxxxxx"
 --send-http-url="https://www.duplicati-monitoring.com/log/xxxx/xxxxx/xxxx"
--allow-missing-source="true"
--disable-module="console-password-input"
--exclude="*\dataConfig\\"
--exclude="*\dataEvents\\"
--exclude="**\est\content\*\\"

As you can see the exclude is added in the 7th line but I get this error

The supplied option --exclude is not supported and will be ignored,

Failed to process path: \\server\share\folder\~$MyFile.xlsx
=> The process cannot access the file '\\server\share\folder\~$MyFile.xlsx'
because it is being used by another process.

If I use the same exclude in the job it works and ~$MyFile.xlsx is excluded.

What is the problem?

I have a suspicion that you can’t make global exclude options, but I’ll have to double check (or wait for somebody wiser to confirm)…

The diffence between definition as global and added in the job is just the order of the parameters!

Global

backup
target
source, source, source,...
--exclude GLOBAL
--backup-name
...
--disable-module=
--exclude
...
--exclude

In the job

backup
target
source, source, source,...
--backup-name
...
--disable-module=
--exclude
...
--exclude somewhere in the exclude block...
...
--exclude

So there would be the need of a logical order inside the - - Parameters? This seems a little bit strange.

I is clear the the command “backup” must be the first parameter, followed by target and the sources but the different - - parameters should be free in order.

I agree, I don’t think there’s a need for an order there.

I can replicate your error in the GUI, so it’s not something you’re doing wrong.

However the fact that there are no exclude options provided in the select list on the general settings page might be an indicator that it might not be supported. I guess we’ll just have to ask @kenkendk if there’s a reason there are no --exclude options present on the main Settings page.