Even if I change the job to backup just a single file, like a word document or something, I still get the “locked file” error.
So this is not a locked file among the files to be backed up, which is more common to come across.
I can confirm that “System.IO.IOException: The process cannot access the file because it is being used by another process.” because the database file is locked by Duplicati itself can be solved by:
- First run a repair job
- Then run the backup job
If I run the backup job directly, the repair starts first in that job and then fails on the locked database file. Locked by Duplicati itself
This problem started with the 184.108.40.206 beta. The error started popping up when restarting jobs I had stopped mid run. I think but I’m not 100% sure that the jobs I stopped mid run where jobs without a local database but with a complete set of backup files.
System.IO.IOException: The process cannot access the file because it is being used by another process. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.File.InternalMove(String sourceFileName, String destFileName, Boolean checkHost) at Duplicati.Library.Main.Operation.RepairHandler.Run(IFilter filter) at Duplicati.Library.Main.Operation.BackupHandler.PreBackupVerify(BackendManager backend, String protectedfile) at Duplicati.Library.Main.Operation.BackupHandler.<RunAsync>d__19.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at CoCoL.ChannelExtensions.WaitForTaskOrThrow(Task task) at Duplicati.Library.Main.Controller.<>c__DisplayClass13_0.<Backup>b__0(BackupResults result) at Duplicati.Library.Main.Controller.RunAction[T](T result, String& paths, IFilter& filter, Action`1 method) at Duplicati.Library.Main.Controller.Backup(String inputsources, IFilter filter) at Duplicati.Server.Runner.Run(IRunnerData data, Boolean fromQueue)