Error uploading file

Hello,

I am getting the below error and I am not able to resolve this.

I have tried:
Restarting Duplicati.
Changing the Number of async upload to 1.
Restarting the system.

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.d__20.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__DisplayClass14_0.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)

Thanks,
Sanatan

Hello

You are trying to backup the Duplicati database. This is of limited utility since it’s changed during the backup process and it can be recreated (has to be recreated if you are restoring on a new computer). You should add an exclusion for the Duplicati database directory (you can get it from any job, open it and click ‘database’).

Another possibility (I see both RepairHandler and BackupHandler in the stack trace) is that you have --auto-cleanup on. That option tries to open the database for repair, while the backup already has a lock on the database. Unfortunately you will need to remove that option and repair manually.

I made a fix, but it is not in the released version yet (#4971).

Thanks. The database was never a part of the backup. I checked the job and it didn’t include it.

Thanks! This helped. I did have a auto-cleanup option enabled. I disabled it, and repaired the database.
Then backup worked fine.