VACUUM - performance improvement is huge

If you’re saying there’s a chance you ran it outside of Duplicati while Duplicati might have been at work such as doing a backup, then possibly you got into the access conflict I’d worried about, with stale data put back. Maybe there was even a problem on the data copy to a temporary file, if it could change while it was being copied. This is a deeper SQLite question than I can answer, on exactly how SQLite vacuum is implemented.

The test from @mr-flibble seems different from what I think you described, but it does answer how one can get into that unfortunate state with the database. I had hoped SQLite would be able to resist such problems. There’s currently such an error here, so if anyone is good at fixing these, please stop by to help with that…