Verifying Backend Data

Dear Duplicati authors,

analysis of user RGupta is correct and issue of “Verifying Backend Data” is not resolved in build.

What is recommended to be changed is:
create index i1 on BlocklistHash(Hash);

b) LocalDatabase(1301) issue commands:
PRAGMA optimize;
ANALYZE sqlite_master;
ANALYZE BlocklistHash;
ANALYZE BlocksetEntry;

c) in LocalDatabase.cs(1304):
var sql = string.Format(@“SELECT ““A””.”“Hash”", ““C””."“Hash”" FROM " +
@"(SELECT bb1."“BlocksetID”", bb2."“Hash”", * FROM ““BlocklistHash”” bb1,"“Block”" bb2 WHERE bb1."“Hash”" = bb2."“Hash”" AND bb2."“VolumeID”" = ?) A, " +
@" ““BlocksetEntry”” B, ““Block”” C WHERE ““B””."“BlocksetID”" = ““A””."“BlocksetID”" AND " +
@" ““B””."“Index”" >= ("“A”"."“Index”" * {0}) AND ““B””."“Index”" < (("“A”"."“Index”" + 1) * {0}) AND ““C””."“ID”" = ““B””."“BlockID”" " +
@" ORDER BY ““A””."“BlocksetID”", ““B””."“Index”"",
blocksize / hashsize

My development laptop has over 10 million local files.
Even in “Verifying Backend Data” takes over 24 hours before I kill service.
With changes it takes fraction of a second.



this also shows in the same direction as i found out, that running an ANALYZE command on the SQLITE DB while service is stopped, was fixing the issue of long running SQL Queries for me to.

GitHub issue created here:

1 Like