Verifying Backend Data

Dear Duplicati authors,

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

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

b) LocalDatabase(1301) issue commands:
PRAGMA optimize;
ANALYZE sqlite_master;
ANALYZE Block;
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 2.0.4.17 “Verifying Backend Data” takes over 24 hours before I kill service.
With changes it takes fraction of a second.

Thanks

2 Likes