unable to fix database

Zotero is in a restart/backup loop. When I do anything like reindex a PDF or empty the trash, "an error occured, restart", on next startup it will inform me it's using a backup, which again doesn't allow me to work with it.

I cannot upload my database to https://www.zotero.org/utils/dbfix/ - there is an error "An internal server error occurred. Please try again later." My database is 85 MB zipped.

I tried the manual repair with the line PRAGMA/vacuum, which gave a very large output, some of which seemed like errors, also there are many "scrambled" lines involved (UTF8 issues I assume).

In the past at some point, all the umlauts in my database where replaced by unreadable signs, which I never got around fixing. I assume it happened either because of a bug in an earlier version, or going from Windows to Linux, or syncing, or a combination of those.

I installed sqliteman, which also cannot compact the database or any of its tables, the error is "primary key must be unique".

I installed Zotero standalone. It shows the same behavior as the plugin but sometimes uses different "backup" databases to fall back to, all from within the last few days (which then will crash again).

Apart from the umlaut problem, the problems started after I tried to import ~1000 PDFs (OCRed with images) including indexing them. This process took more than two days, 100% CPU usage indicating progress, and halted after about 600 with no error, I assume it crashed.

How can I fix my database reliably?

Is there a way to index PDFs with another tool and then importing the PDFs and the index separately?


thank you in advance
  • edited April 8, 2013
    I tried the manual repair with the line PRAGMA/vacuum, which gave a very large output, some of which seemed like errors, also there are many "scrambled" lines involved (UTF8 issues I assume).
    Instead of doing a vacuum, try dumping (.output and .dump) and reimporting. That's essentially what the repair tool does. (That doesn't guarantee that the resulting database will be complete or usable, since it'll just skip errors, but if the corruption is in a less-important part of the database (e.g., the full-text word index), it may do the trick.)
  • I assume it happened either because of a bug in an earlier version, or going from Windows to Linux, or syncing, or a combination of those.
    We haven't seen this before, for what it's worth.
Sign In or Register to comment.