Commandline - No save option?

I am having problems making the filters work, so I tried using the Commandline and Edit as Text options. That plus using the actual CMD test-filters option, I was able to figure out the exclude syntax. However, there is no way to save the job from within the Commandline page!

There is a button labeled

Run “backup” command now

Which threw an error and is not what I want to anyway, I just want to save it.

What sort of filters are you trying to apply?

Exclude folder. Despite what some posts I’ve read say, this does not work:

exclude=“C:\Users\keithdavis\AppData\Roaming\Telegram Desktop\tdata”

I have to either do this:

exclude=“C:\Users\keithdavis\AppData\Roaming\Telegram Desktop\tdata\”

Or this:

exclude=“C:\Users\keithdavis\AppData\Roaming\Telegram Desktop\tdata*”

I’m not sure how this is relevant to my question, though. I want to be able to edit on the Edit asText area. :slight_smile:

If you go to the “Commandline …” screen none of the changes you make there are saved. The intent of that subscreen is to make it easier to run some of the rarer commands without having to build the entire command line yourself.

You can edit filters in a text box method though. “Edit” your backup job, go to page 3 (Source Data), then expand the Filters section. On the right you’ll see a three-dot menu. You can click that and then pick “Edit as text”. Once you’re done you can go to page 5 and save your backup configuration.

Does that help?

You mentioned having gone to the Commandline after you couldn’t get filters to work, so what if we could get the filters to work in the GUI.

If you add an “exclude regular expression” filter in the GUI and give it this value C\:\\users\\keithdavis\\AppData\\Roaming\\Telegram Desktop\\tdata\\.* that should exclude the tdata folder from that backup job.

I’d probably just use \w\:\\users\\.*\\AppData\\.* to exclude the whole AppData folder, regardless of user or drive letter but that may exclude more than you want.

Hope that helps.

I’m a dev and a command-line person, I would much prefer to edit via a simpler interface, like Commandline. If I use the normal GUI, I have to go through all those steps each time just to add an edit filters.

Yes, I know that that works, but from posts I read on this form, “exclude folder” with this should work:

exclude=C:\Users\keithdavis\AppData\Roaming\Telegram Desktop\tdata\

But it doesn’t because of space. I made an mistake in my previous post, one method that works is this:

exclude=“C:\Users\keithdavis\AppData\Roaming\Telegram Desktop\tdata\” (note the double backslash to escalate the quotes)

This does not work:

exclude=“C:\Users\keithdavis\AppData\Roaming\Telegram Desktop\tdata\”

This works as well:

exclude=“C:\Users\keithdavis\AppData\Roaming\Telegram Desktop\tdata*”

Oh, I did not make a mistake in my previous post. Discourse is dropping the extra slash in both of my examples.

If you use `` back quote characters to surround code it will be treated as typed. The back quote key is to the left of the number 1 that is shared with the ~ symbol on a qwerty keyboard.

String surrounded \\path to nothing\\with extra slashes\\\\\\\\

Do keep in mind what drwtsn32 said previously about using the “Commandline…” option.

Ah, yes, we call that (`) the “tick”.

FYI

The usual issue that Windows command line users run into with folders that need quotes is due to
What’s up with the strange treatment of quotation marks and backslashes by CommandLineToArgvW

Knowing that a Duplicati filter for a folder on Windows ends in backslash, one adds the backslash.
Knowing that double quoting is needed to keep embedded spaces in word, one puts them outside.

The more odd Windows rule is that a backslash and a trailing double quote turns into a backslash.
You need to write a double backslash before the closing double quote to end word with backslash.

Example of what looks to me like standard Windows handling, which I think Duplicati uses as well:

C:\>ping one two\
Ping request could not find host one. Please check the name and try again.

C:\>ping "one two\"
Ping request could not find host one two". Please check the name and try again.

C:\>ping "one two\\"
Ping request could not find host one two\. Please check the name and try again.

C:\>

GUI needs no command line quoting and escaping, and Export As Command-line will add it for you.
It’s too bad GUI filter builder doesn’t work well. Double-check its work with three-dot Edit as text.