I tried it in the GUI, but it didn’t work. And because it’s cumbersome to enter the command in the GUI multiple times and try different possibilities I switched to the command line.
I am trying to get this to work as well?
Could anyone of the developers maybe supply a complete, working syntax either for commandline or commandline gui how to remove files and or folders out of a existing backup. The documentation on purge is sparse, its not clear what options are needed, how the files have to be listed and so on and so on.
For an existing backup done from the GUI, a good way to start is Export as Command-line which should make a compatible-but-independent ready-to-run backup command, then edit syntax into what you want. Similar advice applies when using Commandline in the GUI, except there your option display is nicer and there’s no concern over getting the quoting right. And I think that’s what went wrong in the original post…
Windows treats backslashed double quotes specially, so I think that one turned into an embedded quote. Being still inside the opening double quote, the space was not a separator, so the whole second line was appended to the end of the first (thereby making it appear there was no list of paths to remove, per error).
The solution is to either double the backslash before the double quote, if you actually want a backslash, or remove it, if you don’t. Sometimes Duplicati does use a trailing slash (of the right type for your OS) to say you want to refer to a folder not a file, but I’m not seeing that as a requirement for the local folder URL and actually I’m seeing there that forward slashes should work, and would avoid the backslash quote problem.
I think this might be the relevant quoting handling, but you can see a similar-but-maybe-different style here. People who are used to fighting quoting on UNIX-like shells may sympathize even though it’s not the same.
The basic purge syntax seems right. I ran both the list of pathnames and the filter syntax as seen in Filters where its flexibility comes from the choice of wildcards such as * or by more complex regular expressions. You must provide either filename filters, or a list of paths to remove appears to be right. The find command also takes filters, and might be a good way to see what files the purge will be purging…
Exactly what other advanced options or storage options you need varies, so I suggest you export a backup. Many other commands (such as purge) have similar configuration needs to backup, so can share settings.