Ignore locked files

When I do backup, I always get a bunch of warnings like this:

2018-08-09 08:00:39 -07 - [Warning-Duplicati.Library.Main.Operation.Backup.FileBlockProcessor.FileEntry-PathProcessingFailed]: Failed to process path: D:\foobar2000\running, 

I understand I can use --snapshot-policy=on to take snapshot to avoid the warning, but what I really want is to simply ignore these locked files. There is no use to backup these locked file.

Is it possible to achieve this in the current 2.0.3.9 canary version?

Put these locked files as Exclusion in backup config.
User has to be notified if some of files he want to be backed-up has some problems - ignoring is not good approach.

1 Like

But there are already options to ignore hidden or system files. If I have many applications running at the time of backup, user has to exclude 100+ paths, many of which are randomly generated. It is not good user experience. Plus user made the choice to ignore them. If any, put these file in INFO level, not WARNING.

I know there is the “filter group” concept: Filters - Duplicati 2 User’s Manual . Is it possible to add “Locked files” to this list?

Probably, the question is whether most users can be trusted to understand the repercussions of using it.

By adding “Locked files” to either the “Exclude filter group” or the older “Exclude” check boxes (see below) we run the risk of a user’s files not being backed up because they’re locked (potentially without the user even realizing it) at which point Duplicati is accused of not backing things up.

I don’t dislike the suggestion - I’m just worried it has to be handled differently (more warnings, confirmations, logging, etc.) than other exclude filter types.

image

Only other option is to block all notifications from duplicati, as otherwise it will beep windows notification every hour while (unsurprisingly) failing to backup temporary Office files for opened files in my working directory…

Those aren’t recognized as temporary and filter -~$ doesn’t ignore them either.

Today I blocked duplicati from system notifications because I’m tired of this crying wolf.

Of course game save files are in use, when I’m playing the game. I’m not surprised they aren’t backed up, I don’t want to system bell raise a alarm that they aren’t backed up. If they’re backed up when the backup runs in a hour (yes, I got save games on “incremental every hour backup” as I want game progression backed up) it’s totally expected.

What I’m unhappy about is, that now I wont know about actual failure, but duplicati unfortunately leaves me with no other option.

Have you considered using snapshots to avoid the locked file issue entirely?

Oh yes, snapshot-policy=Auto is in my default settings for whole duplicati.

Doesn’t seem to have any real effect.

Duplicati must run with elevated rights for it to be able to utilize snapshots. If you have a default Duplicati install that runs under your user process, it won’t have permission.

One method is to switch to running Duplicati as a service. This may require you to move your Duplicati configuration and sqlite folder.

An alternative (the one I use) is to leave Duplicati as something that runs in my profile, but instead of using the shortcut in Startup, use Task Manager to launch it. You can configure a task to be triggered at your user logon, and the task can be configured to run with elevated rights (without a UAC prompt).

Preventing the error to happen, as @drwtsn32 suggested, is the best way to handle this.

Adding an exclusion filter to silently skip locked files is too tricky to implement. Ignoring locked files is completely different from ignoring system or hidden files. Files that have a certain attribute (temp, hidden, system) have that attribute assigned more or less statically. They keep that attribute until someone (or some process) changes it.
File locks are very dynamic. You never know which files are in use and thus how (in)complete your backup is. If you ever want to restore a folder from a backup, you can’t be sure that any version contains the complete folder. So a warning has to be given if files are locked.

Can’t the savegame files be excluded based on filename? Regex is very versatile, give this a try if creating snapshots is not an option.

@drwtsn32 Thanks, I’ll look upon it- probably try onlogon event first, even though I do have configs exported (and backed up :slight_smile: ).

@kees-z I don’t want to exclude the savegames - I want them backed up when possible (whole backup is called SaveGames :slight_smile: ) so I can return to overwritten gamesaves and alike. But I’m OK if Game.save4 is not backed up while playing, because that one is currently opened. Game.save3 and Game.save5 will be backed and Game.save4 will get backed up a hour later. Totally ok with it.

Warning every hour about locked gamesave is crying wolf - read that story - it defeats purpose of the warnings. Later, some work document will be eaten by wolves but nobody will know, since duplicati cried too much about nothing relevant.

Note, that I’m ok with warning in logfile - what I hate is windows system notification.