DB Locked, backup fails with process cannot access the file

Since a few weeks now I experience an issue while performing a backup. The backup process starts, is at stage “verifying backend data” and then at some point stops with an error.

The logs then say that the stopping error is " The process cannot access the file because it is being used by another process." (unfortunately it does not say which file is affected). Looking at the verbose logs, it reveals another error occuring before it: “Failed to read local db. error: database is locked datbase is locked”. It does not seem that the process stops at the same file/folder every time, since the surrounding log messages are different every time.

A reinstall of duplicati, deletion of all local duplicati files (DBs etc.) do not work. This is now a freshly created backup instance, and the error keeps coming. Duplicati is installed as a service, and the error is occuring with and without the c:\windows\system32\config\systemprofile folder included (i.e. the location of the duplicati database).

Any ideas? :confused:

Installation details:
2.0.5.1_beta_2020-01-18

  • APIVersion : 1
  • PasswordPlaceholder : **********
  • ServerVersion : 2.0.5.1
  • ServerVersionName : - 2.0.5.1_beta_2020-01-18
  • ServerVersionType : Beta
  • StartedBy : Server
  • BaseVersionName : 2.0.5.1_beta_2020-01-18
  • DefaultUpdateChannel : Beta
  • DefaultUsageReportLevel : Information
  • ServerTime : 2020-04-19T16:42:54.7286126+02:00
  • OSType : Windows
  • DirectorySeparator : \
  • PathSeparator : ;
  • CaseSensitiveFilesystem : false
  • MonoVersion :
  • MachineName : ATWR
  • UserName : SYSTEM
  • NewLine :
  • CLRVersion : 4.0.30319.42000
  • CLROSInfo : {“Platform”:“Win32NT”,“ServicePack”:"",“Version”:“10.0.19041.0”,“VersionString”:“Microsoft Windows NT 10.0.19041.0”}
  • ServerModules :
  • UsingAlternateUpdateURLs : false
  • LogLevels : [“ExplicitOnly”,“Profiling”,“Verbose”,“Retry”,“Information”,“DryRun”,“Warning”,“Error”]
  • SuppressDonationMessages : false
  • SpecialFolders : [{“ID”:"%APPDATA%",“Path”:“C:\WINDOWS\system32\config\systemprofile\AppData\Roaming”},{“ID”:"%HOME%",“Path”:“C:\WINDOWS\system32\config\systemprofile”}]
  • BrowserLocale : {“Code”:“de-AT”,“EnglishName”:“German (Austria)”,“DisplayName”:“Deutsch (Österreich)”}
  • SupportedLocales : [{“Code”:“bn”,“EnglishName”:“Bangla”,“DisplayName”:“বাংলা”},{“Code”:“ca”,“EnglishName”:“Catalan”,“DisplayName”:“català”},{“Code”:“cs”,“EnglishName”:“Czech”,“DisplayName”:“čeština”},{“Code”:“da”,“EnglishName”:“Danish”,“DisplayName”:“dansk”},{“Code”:“de”,“EnglishName”:“German”,“DisplayName”:“Deutsch”},{“Code”:“en”,“EnglishName”:“English”,“DisplayName”:“English”},{“Code”:“en-GB”,“EnglishName”:“English (United Kingdom)”,“DisplayName”:“English (United Kingdom)”},{“Code”:“es”,“EnglishName”:“Spanish”,“DisplayName”:“español”},{“Code”:“fi”,“EnglishName”:“Finnish”,“DisplayName”:“suomi”},{“Code”:“fr”,“EnglishName”:“French”,“DisplayName”:“français”},{“Code”:“fr-CA”,“EnglishName”:“French (Canada)”,“DisplayName”:“français (Canada)”},{“Code”:“hu”,“EnglishName”:“Hungarian”,“DisplayName”:“magyar”},{“Code”:“it”,“EnglishName”:“Italian”,“DisplayName”:“italiano”},{“Code”:“ja-JP”,“EnglishName”:“Japanese (Japan)”,“DisplayName”:“日本語 (日本)”},{“Code”:“ko”,“EnglishName”:“Korean”,“DisplayName”:“한국어”},{“Code”:“lt”,“EnglishName”:“Lithuanian”,“DisplayName”:“lietuvių”},{“Code”:“lv”,“EnglishName”:“Latvian”,“DisplayName”:“latviešu”},{“Code”:“nl-NL”,“EnglishName”:“Dutch (Netherlands)”,“DisplayName”:“Nederlands (Nederland)”},{“Code”:“pl”,“EnglishName”:“Polish”,“DisplayName”:“polski”},{“Code”:“pt”,“EnglishName”:“Portuguese”,“DisplayName”:“português”},{“Code”:“pt-BR”,“EnglishName”:“Portuguese (Brazil)”,“DisplayName”:“português (Brasil)”},{“Code”:“ro”,“EnglishName”:“Romanian”,“DisplayName”:“română”},{“Code”:“ru”,“EnglishName”:“Russian”,“DisplayName”:“русский”},{“Code”:“sk”,“EnglishName”:“Slovak”,“DisplayName”:“slovenčina”},{“Code”:“sk-SK”,“EnglishName”:“Slovak (Slovakia)”,“DisplayName”:“slovenčina (Slovensko)”},{“Code”:“sr-RS”,“EnglishName”:“Unknown Locale (sr-RS)”,“DisplayName”:“Unknown Locale (sr-RS)”},{“Code”:“sv-SE”,“EnglishName”:“Swedish (Sweden)”,“DisplayName”:“svenska (Sverige)”},{“Code”:“th”,“EnglishName”:“Thai”,“DisplayName”:“ไทย”},{“Code”:“zh-CN”,“EnglishName”:“Chinese (Simplified, China)”,“DisplayName”:“中文(中国)”},{“Code”:“zh-HK”,“EnglishName”:“Chinese (Traditional, Hong Kong SAR)”,“DisplayName”:“中文(香港特別行政區)”},{“Code”:“zh-TW”,“EnglishName”:“Chinese (Traditional, Taiwan)”,“DisplayName”:“中文(台灣)”}]
  • BrowserLocaleSupported : true
  • backendgroups : {“std”:{“ftp”:null,“ssh”:null,“webdav”:null,“openstack”:“OpenStack Object Storage / Swift”,“s3”:“S3 Kompatibel”,“aftp”:“FTP (Alternativ)”},“local”:{“file”:null},“prop”:{“s3”:null,“azure”:null,“googledrive”:null,“onedrive”:null,“onedrivev2”:null,“sharepoint”:null,“msgroup”:null,“cloudfiles”:null,“gcs”:null,“openstack”:null,“hubic”:null,“b2”:null,“mega”:null,“box”:null,“od4b”:null,“mssp”:null,“dropbox”:null,“sia”:null,“jottacloud”:null,“rclone”:null}}
  • GroupTypes : [“Lokaler Speicher”,“Standardprotokolle”,“Proprietär”,“Weitere”]
  • Backend-Module:aftp azure b2 box cloudfiles dropbox file ftp googledrive gcs hubic jottacloud mega msgroup onedrivev2 sharepoint openstack rclone s3 od4b mssp sia ssh tahoe webdav
  • Kompression:zip 7z
  • Verschlüsselungen:aes gpg

The verbose log:

19. Apr. 2020 16:49: Die Operation Backup ist mit folgenden Fehler fehlgeschlagen: The process cannot access the file because it is being used by another process.
19. Apr. 2020 16:49: Fatal error
{"ClassName":"System.IO.IOException","Message":"The process cannot access the file because it is being used by another process.","Data":null,"InnerException":null,"HelpURL":null,"StackTraceString":"   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)\r\n   at System.IO.File.InternalMove(String sourceFileName, String destFileName, Boolean checkHost)\r\n   at Duplicati.Library.Main.Operation.RepairHandler.Run(IFilter filter)\r\n   at Duplicati.Library.Main.Operation.BackupHandler.PreBackupVerify(BackendManager backend, String protectedfile)\r\n   at Duplicati.Library.Main.Operation.BackupHandler.<RunAsync>d__20.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at CoCoL.ChannelExtensions.WaitForTaskOrThrow(Task task)\r\n   at Duplicati.Library.Main.Controller.<>c__DisplayClass14_0.<Backup>b__0(BackupResults result)\r\n   at Duplicati.Library.Main.Controller.RunAction[T](T result, String[]& paths, IFilter& filter, Action`1 method)\r\n   at Duplicati.Library.Main.Controller.Backup(String[] inputsources, IFilter filter)\r\n   at Duplicati.Server.Runner.Run(IRunnerData data, Boolean fromQueue)","RemoteStackTraceString":null,"RemoteStackIndex":0,"ExceptionMethod":"8\nWinIOError\nmscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\nSystem.IO.__Error\nVoid WinIOError(Int32, System.String)","HResult":-2147024864,"Source":"mscorlib","WatsonBuckets":null}
19. Apr. 2020 16:49: Including path as no filters matched: C:\Users\anied\.vscode\extensions\octref.vetur-0.24.0\server\node_modules\core-js\es\string\trim-start.js
19. Apr. 2020 16:49: Including path as no filters matched: C:\Users\anied\.vscode\extensions\octref.vetur-0.24.0\server\node_modules\core-js\es\string\trim-right.js
19. Apr. 2020 16:49: Including path as no filters matched: C:\Users\anied\.vscode\extensions\octref.vetur-0.24.0\server\node_modules\core-js\es\string\trim-left.js
19. Apr. 2020 16:49: Renaming existing db from C:\WINDOWS\system32\config\systemprofile\AppData\Local\Duplicati\DRUCXYOOHJ.sqlite to C:\WINDOWS\system32\config\systemprofile\AppData\Local\Duplicati\DRUCXYOOHJ.backup
19. Apr. 2020 16:49: Including path as no filters matched: C:\Users\anied\.vscode\extensions\octref.vetur-0.24.0\server\node_modules\core-js\es\string\trim-end.js
19. Apr. 2020 16:49: Failed to read local db C:\WINDOWS\system32\config\systemprofile\AppData\Local\Duplicati\DRUCXYOOHJ.sqlite, error: database is locked database is locked
{"errorCode":"Busy","ClassName":"System.Data.SQLite.SQLiteException","Message":"database is locked\r\ndatabase is locked","Data":null,"InnerException":null,"HelpURL":null,"StackTraceString":"   at System.Data.SQLite.SQLite3.Step(SQLiteStatement stmt)\r\n   at System.Data.SQLite.SQLiteDataReader.NextResult()\r\n   at System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCommand cmd, CommandBehavior behave)\r\n   at System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior)\r\n   at Duplicati.Library.Main.Database.ExtensionMethods.ExecuteScalarInt64(IDbCommand self, Boolean writeLog, String cmd, Int64 defaultvalue, Object[] values)\r\n   at Duplicati.Library.Main.Database.LocalDatabase..ctor(IDbConnection connection, String operation)\r\n   at Duplicati.Library.Main.Operation.RepairHandler.Run(IFilter filter)","RemoteStackTraceString":null,"RemoteStackIndex":0,"ExceptionMethod":"8\nStep\nSystem.Data.SQLite, Version=1.0.111.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139\nSystem.Data.SQLite.SQLite3\nBoolean Step(System.Data.SQLite.SQLiteStatement)","HResult":-2147481681,"Source":"System.Data.SQLite","WatsonBuckets":null}
19. Apr. 2020 16:49: Including path as no filters matched: C:\Users\anied\.vscode\extensions\octref.vetur-0.24.0\server\node_modules\core-js\es\string\sup.js
19. Apr. 2020 16:49: Including path as no filters matched: C:\Users\anied\.vscode\extensions\octref.vetur-0.24.0\server\node_modules\core-js\es\string\sub.js
19. Apr. 2020 16:49: Including path as no filters matched: C:\Users\anied\.vscode\extensions\octref.vetur-0.24.0\server\node_modules\core-js\es\string\strike.js