[Linux] zotero.sqlite become huge from one day to another

Hi!
I think I found an error. My zotero.sqlite.105.bak file from 23th january has 47.8 MB size and the next backup (zotero.sqlite.1.bak) from 30th january has 51.5 GB (!) and since then my zotero.sqlite (and its tmp backup) has this size and I think I only added 1 or 2 small PDF to the database in january.
How can I reduce the sqlite size or overcome this issue? Because in total the zotero.sqlite & zotero.sqlite.tmp and zotero.sqlite.1.bak occupy more than 150 GB space.
Since I discovered the issue in february I did not start the program, because I am afraid that the program will override my last "non-huge" database backup with the oversized one.
  • Whoa. So, first, you should obviously make a backup of the 47.8 MB one somewhere outside of that folder.

    It's somewhat hard to imagine that happening within Zotero itself. It seems more likely that that's some sort of filesystem corruption that was then just reproduced in the backup files.

    Can you open zotero.sqlite in the SQLite command-line client and run PRAGMA integrity_check;? (We can provide explicit instructions if necessary.)
  • I already did a filesystem check when I found this phenomenon, but everything was fine. The PRAGMA check found issues, thanks for the idea, so I replaced the damaged database with the "original" one and I will check from a database browser what was the few PDF what I added in the meantime.

    So, thanks for the help, problem solved. :)
  • If you're still able to open the old one, you can also just sort by Date Added, export those items to Zotero RDF, and reimport those into the backup database.

    (If you've been using syncing, you can also just sync the old database to bring it up to date.)
  • Thank you! I exported the last items from the broken database and reimported them into the backup, problem solved now. :)
Sign In or Register to comment.