I got a failure in my last backup job where Duplicati complained that it couldn’t access one of the temp files created by Office (in this case Excel) while a normal document is open. These files begin with “~$” followed by some version of the normal file’s filename. I created a filter
attempting to exclude any such file, without having to exclude all hidden/system files (though I’d be willing to be convinced to hide system files anyway, i’m not sure what I feel on the matter…)
Anyway, I ran it again with the same file open and still got the same error message on that file. I’m pretty sure the syntax is correct at least for traditional windows filesearch conventions, but I guess it didn’t work for Duplicati - anyone have any advice?
Cool, that expression seems to be accepted. I still seem to get the “unable to access” error message though:
The process cannot access the file ‘C:\Work\Projects\~$MyExcelFile.xlsx’ because it is being used by another process. [edit: corrected the missing backslash here]
Also out of curiosity - it occurred to me that selecting to exclude “system files” might also work for this use case, but there’s not much explanation given as to what this will actually exclude (is it only the system-attribute windows files that are hidden by default unless you override them in explorer’s settings) - I’m nervous that checking this option will exclude some specific files that I’d really want to back up, and/or not exclude ones I’d expect to be excluded (such as above) - is there a place with any sort of in-depth explanation for this option?
Edit to add: I tried enabling the setting to exclude System files, and still got this warning - but I checked and the temp file is just hidden, not a system file as far as I can see, and I really don’t want to exclude hidden files from general backup.
Nothing - the file in question gets its own “Including file:…” line, and no mention in any of the “Excluding” lines. I even added a different filter to the test set to see what the functionality would do (excluded all files with a certain normal string in the filename).
I now notice it also works if I just filter on $ - but of course that would accidentally risk filtering out legit files that happen to have a “$” character in the filename.
When I set it up like you (with the path in the Target URL and the exclude in the Commandline arguments box) i now get the same result. But the way I’ve been running the test up until now (since this is the only way I can figure out to get to the commandline easily) is by selecting “Commandline…” on an existing backup –
Here I get the Target URL pointing to my backup file location, the Commandline Arguments pointing to all the folders I’m backing up, and the “exlude” is one of the members of the “advanced options” list. When I have the “exclude” listed here, it seems to not work at all still (even though it appears exactly the same way in its command line argument). I just tried removing the other “exclude” statements from the list in “edit as text”, since i’m overriding the “commandline arguments” box to point only at the one folder contianing the file in question, and it works that way. I’m a little confused as to what’s happening to it otherwise.
Edit: i’ve updated the regex exclusion on the backup set with your newest version and it does appear to work (regardless of the confusion when doing test-filters). I never thought of escaping the ‘$’ character for some reason. Thanks for the help!
BTW, is there any way to edit the files a backup job points to without needing to run all the way through the configuration wizard over and over? That gets pretty tedious, and is a good way to accidentally let errors creep in…
That pre-fills the commandline screen, which is supposed to make it easier to run the exact command that the backup operation runs.
I could not find a good place to put in the “clean” commandline link, so there is none, but you can just remove the number at the end of the url to get a clean commandline page. The url would then look like:
Not sure exactly what happens there, but perhaps there is some mix of options and arguments that messes things up.
I’ve tried with the filters, it doesn’t seem to be excluding these files. I’m still ending up with the same error. It seems to revert back to “exclude file” instead of “exclude expression” even after I save the settings.