When editing a backup Source I can use something like the %MY_DOCUMENTS% to back up the “My Documents” folder of the current user. Are those same variable expansions available in filters?
Specifically, I’m wondering if I can add an “Exclude File” parameter such as --exclude="%dbpath%" to tell Duplicati not to back up the currently in use sqlite file (thus avoiding “file in use” errors when not using VSS).
One reason is that I did not think of doing it , another reason is that all backups run in the same process, so we would need to ensure that environment variables are removed after the process completes (otherwise we could get the old values in a new run, which would be really bad).
Anyway, the right place to inject and remove environment variables is here:
Unfortunately, the filter strings are already parsed here, so it will not work for filters. I think the filters are created in a few different places and they are currently not tied to a backup, which would be required for dbpath to be known.