recuperation of zotero data

10 months ago a colleague reset my ultrabook to zero and I lost all data. As it was a ssd-memory the recuperation of the data took long time and was costful. Now I got the data back and want to re-establish zotero.

I connected zotero with the recuperated data base and got first this message:

"Error: Error(s) encountered during statement execution: database disk image is malformed [QUERY: DROP TABLE IF EXISTS fieldsCombined] [PARAMS: ] [ERROR: database disk image is malformed]
Zotero.DBConnection.prototype.queryAsync<@chrome://zotero/content/xpcom/db.js:668:10
From previous event:
Zotero.Schema</this.updateSchema</updated<@chrome://zotero/content/xpcom/schema.js:156:25
TaskImpl_run@resource://gre/modules/Task.jsm:319:42
TaskImpl@resource://gre/modules/Task.jsm:277:3
createAsyncFunction/asyncFunction@resource://gre/modules/Task.jsm:252:14
Task_spawn@resource://gre/modules/Task.jsm:166:12
ConnectionData.prototype<.executeTransaction/promise</transactionPromise<@resource://gre/modules/Sqlite.jsm:593:28
TaskImpl_run@resource://gre/modules/Task.jsm:319:42"

When I applied this repair tool

https://www.zotero.org/utils/dbfix/?upload=1

to the sqlite file, I could see the order of the archives, but the real citations did not come up.

Now it is hard for me to know what to do.

Can somebody help?

Thanks a lot, Wolfram
  • If you provide the Upload ID from the repair tool we can take a look, but the database is corrupted, and there's no particular reason to think you'll be able to recover the data without a backup.

    I assume the data was not synced to your online library?
  • Hello, thanks for your answer.
    You are right, at that time I did not have an online library.
    After applying the repair tool, I could see the folders, but not the citations.
    What do you mean with the Upload-ID? How can I provide it?
    Thanks a lot, Wolfram
  • It's provided by the repair tool after you upload your database.
  • edited October 28, 2018
    I did it again. Here it is:
    [removed — D.S.]
    Thanks, W
  • OK, but I've removed that link and moved the files — there's no need to link to your database publicly. The Upload ID is provided on the page, and is a way for you to point us to your database without sharing it publicly.

    We'll take a look at the database.
  • ah... ok... thanks a lot, W
  • Sorry, I'm afraid that database is corrupted beyond repair. Did you try the other zotero.sqlite* files in the recovered data directory?
  • there is one file called zotero_old.sclite
  • when I repair the zotero_old.sclite file, zotero says:
    "Das ausgewählte Datenverzeichnis ist zu alt um dies mit dieser Version von Zotero zu nutzen. Führen sie zuerst ein Upgrade des Datenverzeichnis unter Zuhilfenahme von Zotero 4.0 für Firefox durch, oder wählen sie ein anderes Datenverzeichnis für Zotero aus."
    This is German and means that the file is too old to use it with this version of Zotero. It should be upgraded first with the help of Zotero 4.0.
    How can I upgrade it?
  • edited October 28, 2018
    You can uninstall Zotero 5, download and install Zotero 4 from the download page and try the upgrade, and then upgrade to Zotero 5, but unless you were running an extremely old version of Zotero fairly recently that file is going to be years out of date.
  • is it possible to repair the file manually as described here:

    "Manual Zotero Database Repair Instructions

    Advanced (or adventurous) users can repair their databases without uploading them.

    Be sure to make a backup of your entire Zotero data directory before performing these steps.

    Windows

    Download the SQLite command-line client from the SQLite download page. Look for sqlite-tools-win32-x86-[number].zip under Precompiled Binaries for Windows.
    Extract the SQLite tools ZIP.
    From the Windows Run dialog (Search → Run or Start → Run), type 'cmd' and press Enter.
    Drag sqlite3.exe into the command window, press spacebar, drag the zotero.sqlite file from your Zotero data directory, press spacebar again, and then type "> dump.sql". The full command should be "sqlite3.exe zotero.sqlite > dump.sql", with full paths to sqlite3.exe and zotero.sqlite. Press Enter to run this command.
    If the command succeeded, there should be a new dump.sql file created in your home directory (or the path shown at the beginning of each line in the command window).
    On a new line in the command window, drag sqlite3.exe again, press spacebar, and type "zotero.sqlite.new < dump.sql". Note the less-than sign, as opposed to the greater-than sign used previously. Press Enter.
    If all went well, you should find a zotero.sqlite.new file in your home directory that is approximately the size of your damaged zotero.sqlite file. Move zotero.sqlite.new into your Zotero data directory, rename zotero.sqlite to zotero.sqlite.old, and rename zotero.sqlite.new to zotero.sqlite.
    Start Zotero to use the new database."

    Thanks, W
  • No, sorry. That’s what I checked above.
  • that is bad news :-(

    So you think there is no chance to re-activate this data base?
  • is the storage folder of any importance?
  • edited October 29, 2018
    If you had PDFs attached to your Zotero entries, the storage folder would hold these. If you're facing the task of building a new library, you could start by getting all the PDFs out of the storage folder (search for *.pdf in the root and copy them to a single folder) and into a new library. Zotero's latest version is pretty good at recognising the bibliographic metadata for PDFs, so that might give you a head start in reconstructing at least some of the papers you had in the library.

    Also, if you happen to have one or more docx documents in which you cited a good many of your references, you can extract them using this tool: https://rintze.zelle.me/ref-extractor/ . Export them to the JSON format would allow you to import these again in a new Zotero library.

    Please note that if you used Zotero for citations in Word or similar, this will mean the the citations are now no longer linked to your library (as they point to the old, missing library).
  • Thanks for this information, Mark, I will check this tool out... WM
  • also thanks to dstillman for his advice and efforts.... WM
Sign In or Register to comment.