Error while running Backup

Hi,
after installation of the new Duplicati - 2.0.5.1_beta_2020-01-18 version, the Duplicati backup stops with the following messages
“constraint failed UNIQUE constraint failed: FilesetEntry.FilesetID, FilesetEntry.FileID”

Do have any idea what’s wrong? How can it be solved?

Best regards
Dieter

Can you open two tabs to the Duplicati Web UI: One tab navigavte to About -> Show Log -> Live -> and set the dropdown to Verbose.

Now on the second tab, start the backup job that causes the error.

Then go back to the first tab and watch the log. When the error finally appears, can you copy several lines up to and including the failure message, and paste them here?

Also, do you recall what version you upgraded from? What operating system are you using?

Hi,
Duplicati runs under Windows 10 Pro 1909.
The last Duplicati 2 version before the upgrade was 2.0.4.23 14.07.2019.
With this version I had no problem, the last backup was 17.01.2020.

There are 3 error messages

                      • Message #1 - - - - - - - - - - - - - - -
  1. Jan. 2020 19:49: Die Operation Backup ist mit folgenden Fehler fehlgeschlagen: constraint failed UNIQUE constraint failed: FilesetEntry.FilesetID, FilesetEntry.FileID
    {“errorCode”:“Constraint”,“ClassName”:“System.Data.SQLite.SQLiteException”,“Message”:“constraint failed\r\nUNIQUE constraint failed: FilesetEntry.FilesetID, FilesetEntry.FileID”,“Data”:null,“InnerException”:null,“HelpURL”:null,“StackTraceString”:" bei System.Data.SQLite.SQLite3.Reset(SQLiteStatement stmt)\r\n bei System.Data.SQLite.SQLite3.Step(SQLiteStatement stmt)\r\n bei System.Data.SQLite.SQLiteDataReader.NextResult()\r\n bei System.Data.SQLite.SQLiteDataReader…ctor(SQLiteCommand cmd, CommandBehavior behave)\r\n bei System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior)\r\n bei System.Data.SQLite.SQLiteCommand.ExecuteNonQuery(CommandBehavior behavior)\r\n bei Duplicati.Library.Main.Database.ExtensionMethods.ExecuteNonQuery(IDbCommand self, Boolean writeLog, String cmd, Object values)\r\n bei Duplicati.Library.Main.Database.LocalBackupDatabase.AddFile(Int64 pathprefixid, String filename, DateTime lastmodified, Int64 blocksetID, Int64 metadataID, IDbTransaction transaction)\r\n bei Duplicati.Library.Main.Database.LocalBackupDatabase.AddFile(String filename, DateTime lastmodified, Int64 blocksetID, Int64 metadataID, IDbTransaction transaction)\r\n bei Duplicati.Library.Main.Operation.Backup.BackupDatabase.<>c__DisplayClass8_0.b__0()\r\n bei Duplicati.Library.Main.Operation.Common.SingleRunner.<>c__DisplayClass3_0.b__0()\r\n bei Duplicati.Library.Main.Operation.Common.SingleRunner.d__21.MoveNext()\r\n--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---\r\n bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n bei Duplicati.Library.Main.Operation.Backup.MetadataPreProcess.<AddFolderToOutputAsync>d__5.MoveNext()\r\n--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---\r\n bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n bei Duplicati.Library.Main.Operation.Backup.MetadataPreProcess.<ProcessMetadata>d__3.MoveNext()\r\n--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---\r\n bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n bei Duplicati.Library.Main.Operation.Backup.MetadataPreProcess.<>c__DisplayClass2_0.<<Run>b__0>d.MoveNext()\r\n--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---\r\n bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n bei CoCoL.AutomationExtensions.<RunTask>d__101.MoveNext()\r\n— Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde —\r\n bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n bei Duplicati.Library.Main.Operation.BackupHandler.d__13.MoveNext()\r\n— Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde —\r\n bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n bei Duplicati.Library.Main.Operation.BackupHandler.d__20.MoveNext()\r\n— Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde —\r\n bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n bei CoCoL.ChannelExtensions.WaitForTaskOrThrow(Task task)\r\n bei Duplicati.Library.Main.Controller.<>c__DisplayClass14_0.b__0(BackupResults result)\r\n bei Duplicati.Library.Main.Controller.RunAction[T](T result, String& paths, IFilter& filter, Action`1 method)\r\n bei Duplicati.Library.Main.Controller.Backup(String inputsources, IFilter filter)\r\n bei Duplicati.Server.Runner.Run(IRunnerData data, Boolean fromQueue)",“RemoteStackTraceString”:null,“RemoteStackIndex”:0,“ExceptionMethod”:“8\nReset\nSystem.Data.SQLite, Version=1.0.111.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139\nSystem.Data.SQLite.SQLite3\nSystem.Data.SQLite.SQLiteErrorCode Reset(System.Data.SQLite.SQLiteStatement)”,“HResult”:-2147473489,“Source”:“System.Data.SQLite”,“WatsonBuckets”:null}
            • End of Message #1 - - - - - - - - - - - - - - -
                      • Message #2 - - - - - - - - - - - - - - -
  1. Jan. 2020 19:49: Fatal error
    {“errorCode”:“Constraint”,“ClassName”:“System.Data.SQLite.SQLiteException”,“Message”:“constraint failed\r\nUNIQUE constraint failed: FilesetEntry.FilesetID, FilesetEntry.FileID”,“Data”:null,“InnerException”:null,“HelpURL”:null,“StackTraceString”:" bei System.Data.SQLite.SQLite3.Reset(SQLiteStatement stmt)\r\n bei System.Data.SQLite.SQLite3.Step(SQLiteStatement stmt)\r\n bei System.Data.SQLite.SQLiteDataReader.NextResult()\r\n bei System.Data.SQLite.SQLiteDataReader…ctor(SQLiteCommand cmd, CommandBehavior behave)\r\n bei System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior)\r\n bei System.Data.SQLite.SQLiteCommand.ExecuteNonQuery(CommandBehavior behavior)\r\n bei Duplicati.Library.Main.Database.ExtensionMethods.ExecuteNonQuery(IDbCommand self, Boolean writeLog, String cmd, Object values)\r\n bei Duplicati.Library.Main.Database.LocalBackupDatabase.AddFile(Int64 pathprefixid, String filename, DateTime lastmodified, Int64 blocksetID, Int64 metadataID, IDbTransaction transaction)\r\n bei Duplicati.Library.Main.Database.LocalBackupDatabase.AddFile(String filename, DateTime lastmodified, Int64 blocksetID, Int64 metadataID, IDbTransaction transaction)\r\n bei Duplicati.Library.Main.Operation.Backup.BackupDatabase.<>c__DisplayClass8_0.b__0()\r\n bei Duplicati.Library.Main.Operation.Common.SingleRunner.<>c__DisplayClass3_0.b__0()\r\n bei Duplicati.Library.Main.Operation.Common.SingleRunner.d__21.MoveNext()\r\n--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---\r\n bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n bei Duplicati.Library.Main.Operation.Backup.MetadataPreProcess.<AddFolderToOutputAsync>d__5.MoveNext()\r\n--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---\r\n bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n bei Duplicati.Library.Main.Operation.Backup.MetadataPreProcess.<ProcessMetadata>d__3.MoveNext()\r\n--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---\r\n bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n bei Duplicati.Library.Main.Operation.Backup.MetadataPreProcess.<>c__DisplayClass2_0.<<Run>b__0>d.MoveNext()\r\n--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---\r\n bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n bei CoCoL.AutomationExtensions.<RunTask>d__101.MoveNext()\r\n— Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde —\r\n bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n bei Duplicati.Library.Main.Operation.BackupHandler.d__13.MoveNext()\r\n— Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde —\r\n bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n bei Duplicati.Library.Main.Operation.BackupHandler.d__20.MoveNext()\r\n— Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde —\r\n bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n bei CoCoL.ChannelExtensions.WaitForTaskOrThrow(Task task)\r\n bei Duplicati.Library.Main.Controller.<>c__DisplayClass14_0.b__0(BackupResults result)\r\n bei Duplicati.Library.Main.Controller.RunAction[T](T result, String& paths, IFilter& filter, Action`1 method)\r\n bei Duplicati.Library.Main.Controller.Backup(String inputsources, IFilter filter)\r\n bei Duplicati.Server.Runner.Run(IRunnerData data, Boolean fromQueue)",“RemoteStackTraceString”:null,“RemoteStackIndex”:0,“ExceptionMethod”:“8\nReset\nSystem.Data.SQLite, Version=1.0.111.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139\nSystem.Data.SQLite.SQLite3\nSystem.Data.SQLite.SQLiteErrorCode Reset(System.Data.SQLite.SQLiteStatement)”,“HResult”:-2147473489,“Source”:“System.Data.SQLite”,“WatsonBuckets”:null}
                  • End of Message #2 - - - - - - - - - - - - - - -
                      • Message #3 - - - - - - - - - - - - - - -
  1. Jan. 2020 19:49: Operation Put with file duplicati-b0cc9aec2182b4f4787098f89843b8fc4.dblock.zip.aes attempt 1 of 5 failed with message: Der Vorgang wurde abgebrochen.
    {“ClassName”:“System.OperationCanceledException”,“Message”:“Der Vorgang wurde abgebrochen.”,“Data”:null,“InnerException”:null,“HelpURL”:null,“StackTraceString”:" bei System.Threading.CancellationToken.ThrowOperationCanceledException()\r\n bei Duplicati.Library.Main.Operation.Common.SingleRunner.d__2`1.MoveNext()\r\n— Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde —\r\n bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n bei Duplicati.Library.Main.Operation.Backup.BackendUploader.d__21.MoveNext()\r\n— Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde —\r\n bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n bei Duplicati.Library.Main.Operation.Backup.BackendUploader.<>c__DisplayClass17_0.<b__0>d.MoveNext()\r\n— Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde —\r\n bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n bei Duplicati.Library.Main.Operation.Backup.BackendUploader.d__18.MoveNext()",“RemoteStackTraceString”:null,“RemoteStackIndex”:0,“ExceptionMethod”:“8\nThrowOperationCanceledException\nmscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\nSystem.Threading.CancellationToken\nVoid ThrowOperationCanceledException()”,“HResult”:-2146233029,“Source”:“mscorlib”,“WatsonBuckets”:null}
                  • End of Message #3 - - - - - - - - - - - - - - -

Best regards
Dieter

Hmm, I was hoping we might see some file paths that triggered the issue. Do you see anything like that?

Maybe I can help. I have exactly the same problem since the update.
I’ve created a log when the error occurs and it seems like it’s caused by my WSL Debian installation. Since I haven’t used this Debian installation this year, it’s very unlikely that the files have changed since the last working backup with the previous version.

https://pastebin.com/bZ1gYmpt

If you need more information let me know.

Hi,
I couldn’t solve the problem.

  1. I deinstall the Duplicati 2.0.5.1_beta_2020-01-18 version.
    I install the latest version of Duplicati 2 “Duplicati - 2.0.5.101_canary_2020-01-23”.
    Start the backup test, but after a certain time --> error “constraint failed UNIQUE constraint
    failed: FilesetEntry.FilesetID, FilesetEntry.FileID”.

  2. I delete the complete backup (maybe there is a problem with the datebase) and start with a
    complete new backup, but after 30min I got the same error.
    error “constraint failed UNIQUE constraint failed: FilesetEntry.FilesetID, FilesetEntry.FileID”.

Now I haven’t a idea, what can I do to solve the problem.

Best regards
Dieter

I encountered this same issue on one of my Windows computers after updating to the 2.0.5.1_beta_2020-01-18 version from the previous beta.

The way that I solved it was to turn on logging to file in Verbose mode and look at what files were being added to the backup just prior to the error. I found that one of my Temporary Internet Files directories (%localappdata%\Microsoft\Windows\Temporary Internet Files\) had been inadvertently included in the backup. After excluding it, the backup completed successfully.

This doesn’t explain the regression that caused this error to manifest in the first place (this directory was included in the backup set prior to the update), but hopefully it can help anyone else encountering it.