Very slow database recreation

If Duplicati had to download dblocks during a database recreation, there is a way to fix this from my experience. The procedure requires an in-tact, functioning local database.

I have tested db recreation on all my machines and where dblocks needed to be downloaded, I’ve run through this procedure and then retested. Afterward db recreation would no longer require dblock processing, and would therefore recreate the database much, much faster.

Procedure:

  • Again, you must have a functioning database. Do not do proceed otherwise.
  • Delete all the dindex files on the back end. (For added safety, you could move the files and not delete until procedure is successful.)
  • Run “Repair” in the Duplicati Web UI.
  • Duplicati will regenerate and reupload all of the dindex files based on information in the database.
  • Retest database recreation. (For added safety, you could move the database and not delete until procedure is successful.)
  • Watch the Live Log / Verbose to watch if dblocks still need to be downloaded.

On one of my machines the database recreation time went from over 5 days to 15 minutes.

The root cause of the issue seems to be due to some bugs in older versions of Duplicati that wrote dindex files incorrectly, but I’m not entirely sure.