I am using Duplicati to create backups of my Mozilla Firefox folder. Since the backup task often runs whilst I’m using Firefox, Duplicati tries to back up the lock file “parent.lock” (which fails, since the file is locked), emitting a warning.
2023-11-14 15:30:02 +01 - [Warning-Duplicati.Library.Main.Operation.Backup.FileBlockProcessor.FileEntry-PathProcessingFailed]: Failed to process path: C:\Users<user>\AppData\Roaming\Mozilla\Firefox\Profiles\da51vajc.default-release\parent.lock
Wanting to remove that warning, I added “parent.lock” to the Filters list:
But it does not work the way I expect: the warning is still emitted.
Yes, if you use this criterium you need to specify the whole path to the file. If you want to exclude all files whose name is parent.lock whatever the location, you can use the ‘exclude files whose name contains’ criterium. Or use a regular expression if you are motivated enough.
Edit: I forgot that you can also use ‘*’ in the ‘exclude file’ criterium (as if this whole business was not complicated enough…)
The manual is unfortunately quite weak on what exactly the dropdown menu items do, however clicking three-dot menu and selecting
Edit as text will show you, and you can read Filters if it’s still not clear. Syntax explains globbing such as the *, and regular expressions for when something heavier is needed.
Because it would be nice if the GUI got more self-explanatory, maybe it could add “full path” as needed? “Exclude folder” seems to have the same pitfall as “Exclude file”, because you have to give it a full path.
One trick the manual does document in Creating a new backup job is:
If you deselected one or more files or folders in the file picker (marked with a red cross), they show up in the list under Filters.
but now that you’ve perhaps fixed things already, you could go back to the selection tree to see red box.
Using a full path is not a good idea in this situation because the folder I am backing up can contain several lock files. They all would share the “parent.lock” name, but they would be in different folders.
What I have done is I have chosen “Exclude file extension” and added “lock” (and prayed no files other than lock files are created using that extension.)
Note that the exclude applies to the whole source selection, if it’s more than just Firefox.
Windows File Explorer’s search box will let you search for file names, e.g.
The TEST-FILTERS command can also be run to see exactly which things got excluded.
Duplicati.CommandLine.exe test-filters "C:\Users\User\AppData\Roaming\Mozilla\Firefox\Profiles" --exclude="*\parent.lock" | findstr "Excluding"
Excluding path due to filter: C:\Users\User\AppData\Roaming\Mozilla\Firefox\Profiles\jsfl09pk.default-release-1607050191453\parent.lock => (*\PARENT.LOCK)
Excluding path due to filter: C:\Users\User\AppData\Roaming\Mozilla\Firefox\Profiles\186j0kxo.default-release-1\parent.lock => (*\PARENT.LOCK)
Excluding path due to filter: C:\Users\User\AppData\Roaming\Mozilla\Firefox\Profiles\0o1kzrw7.default-release-2-1607095340711\parent.lock => (*\PARENT.LOCK)
Exclude files whose names contain parent.lock would work, but is a bit looser than above.