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.

Using this howo, I was able to change configuration to run as service. It needed repair of each database (few seconds), but now it runs without issue.

  • install as system service should be installer option
  • (until then) this manual should me mirrored / recreated in duplicati documentation

We already got these details in the documentation:
Install to Windows
Settings for TrayIcon
About --no-hosted-server
And as a service
I can’t retrieve where I read therein that nssm ~gives more flexibility~ …oh yes: there

If we don’t yet have NSSM installed for some other app, I’d be glad to know an example were it is mandatory (won’t Duplicati.WindowService.exe install already set Environment working path to ProgramData instead of SystemProfile?). Wouldn’t --server-datafolder=%DUPLICATI_HOME% do the job ?

I am on the side of @shalmirane . The Warning Messages could be very annoying.

My problem is, that I want to backup the files of my colleagues. They have a PC with a windows account, and I have an Admin Account. They get automatically a network drive, if they use their domain-login. I want to make their backup silent in the background to this personal-network drive. If an error or a warning occurs, Duplicati should send me an E-mail.

The problem is, that it depends on the installation type, that rather I have the users password in plain text, or the user will be boarded by Warnings, if a file is opened.

Local Installation:

  • pro: the network drive of the user can be accessed automatically, without giving duplicati the users password.
  • con: I could not find any solution, to disable the warning popup for the user, when an attempt is made to backup an open file.

Service-Installation:

  • pro: The warnings for opened files are not there any more (thanks to snapshot-policy).
  • con: I could not write to the network drive, without using the users password in plain text. So I could acces the users password, which I don’t want (as this is a very important password for other services too).

So it would be good to have an “exclude-locked-windows-files” option, to keep the crying wolf silent. Then I could use a local installation, and the users and I get only messages, if a real problem occurs.

edit:
==> My problem as an own topic and in more detail here: Backup to auto-mounted network-drive (domain-accounts) without getting user PW & without Warning-Message for opened files (sry for the long title)