I am trying to backup my files from one Storj bucket to another Storj bucket (in addition to other profiles where the backup destinations are two Synology drives), but I keep getting a “unique constraint failed” error.
How can I fix this?
Here is the log:
Jan 17, 2025 12:11 PM: The operation Repair has failed with error: constraint failed UNIQUE constraint failed: DuplicateBlock.BlockID, DuplicateBlock.VolumeID
code = Constraint (19), message = System.Data.SQLite.SQLiteException (0x800027AF): constraint failed
UNIQUE constraint failed: DuplicateBlock.BlockID, DuplicateBlock.VolumeID
at System.Data.SQLite.SQLite3.Reset(SQLiteStatement stmt)
at System.Data.SQLite.SQLite3.Step(SQLiteStatement stmt)
at System.Data.SQLite.SQLiteDataReader.NextResult()
at System.Data.SQLite.SQLiteDataReader…ctor(SQLiteCommand cmd, CommandBehavior behave)
at System.Data.SQLite.SQLiteCommand.ExecuteNonQuery(CommandBehavior behavior)
at Duplicati.Library.Main.Database.ExtensionMethods.ExecuteNonQuery(IDbCommand self, Boolean writeLog, String cmd, Object values)
at Duplicati.Library.Main.Database.LocalRecreateDatabase.CleanupMissingVolumes()
at Duplicati.Library.Main.Operation.RecreateDatabaseHandler.DoRun(LocalDatabase dbparent, Boolean updating, IFilter filter, NumberedFilterFilelistDelegate filelistfilter, BlockVolumePostProcessor blockprocessor)
at Duplicati.Library.Main.Operation.RecreateDatabaseHandler.Run(String path, IFilter filter, NumberedFilterFilelistDelegate filelistfilter, BlockVolumePostProcessor blockprocessor)
at Duplicati.Library.Main.Operation.RepairHandler.RunRepairLocal(IFilter filter)
at Duplicati.Library.Main.Operation.RepairHandler.Run(IFilter filter)
at Duplicati.Library.Main.Controller.<>c__DisplayClass21_0.b__0(RepairResults result)
at Duplicati.Library.Main.Controller.RunAction[T](T result, String& paths, IFilter& filter, Action1 method) at Duplicati.Library.Main.Controller.RunAction[T](T result, IFilter& filter, Action1 method)
at Duplicati.Library.Main.Controller.Repair(IFilter filter)
at Duplicati.Server.Runner.Run(IRunnerData data, Boolean fromQueue)
I reformatted my computer and was adding my backup profiles again after Duplicati install. I did a recreate because I got an error that there were remote files not found in local storage and that I needed to repair. The repair was not successful, so the system prompted me to recreate.
Migrating Duplicati to a new machine can also be used in a reformat situation.
If database files were not preserved, then they must be recreated somewhere.
If you have only one computer, you can probably install Canary to do recreate.
If that works, then install 2.1.0.2, as Beta is less likely to throw some surprises.
Yes, and I guess you want duplicati-2.1.0.107_canary_2025-01-17-win-x64-gui.msi assuming this is a typical Windows system. That’s the Canary version of what’s highlighted on Download page which you can install to return to Beta after seeing if today’s Canary can Recreate database for you.