Restore from zotero.org?

I ran Clean My Mac today, and it appears to have deleted my local Zotero files. When I opened Zotero on my desktop just now, I got a warning that says, "You are about to sync [your account] to an empty Zotero database. This could happen if you removed your previous database or if the location of your Zotero data directory changed. If your Zotero data exists elsewhere on this computer, you should move it to the current data directory or change the data directory location to point to your existing data."

My library appears to be intact on Zotero.org. Is it possible to restore my desktop library from Zotero.org?
  • Yes, you can just sync. Depending on whether you need all attached files locally, you might want to adjust the file syncing settings to download files "as needed" instead of "at sync time".

    (It's odd that Clean My Mac would've deleted your Zotero data, though. You might want to look through Locating Missing Zotero Data before syncing to see if it's elsewhere on your computer.)
  • There is still a folder titled "storage" within the "Zotero" folder on my hard drive, but Zotero on my desktop does not want me to direct the data directory to it. I get an error message that says, "The directory you selected is not empty and does not appear to be a Zotero data directory. Create Zotero files in this directory anyway?"

    When you say that I can just sync, does that mean that I should initiate a sync from Zotero desktop, even though that's the Zotero component that is telling me it has no data?
  • There is still a folder titled "storage" within the "Zotero" folder on my hard drive, but Zotero on my desktop does not want me to direct the data directory to it.
    Right, don't do that. The storage directory is part of the data directory. It's not the data directory itself. See the instructions I linked to:
    If you see only 1 MB or 5 MB zotero.sqlite files, look in the 'storage' folder (if one exists) for folders with timestamps corresponding with your previous usage of Zotero. If you see them, this is likely the Zotero data directory you were using previously, but something happened to the Zotero database, so you may need to restore a zotero.sqlite file from a backup.
    Do you see these types of folders in 'storage'? If so, what are the names, dates, and sizes of all the zotero.sqlite* files in the data directory?
    When you say that I can just sync, does that mean that I should initiate a sync from Zotero desktop, even though that's the Zotero component that is telling me it has no data?
    It's just warning you that it's an empty database because you've previously synced and your data might be elsewhere on your computer. But if you can't find it, you can still just sync to pull down data from your online library.
  • It appears what happened is that when I installed Gemini (a Clean My Mac product that looks for duplicate files), it found a bunch of Zotero folders and deleted them. I can find the following items on my hard drive:

    1) Two small (~100 KB) sqlite files
    2) A folder called Zotero that was last modified in 2017 and just contains a folder called "profile" (with a bunch of useless looking files in it)
    3) Another folder called Zotero from 2019 that contains a folder called "storage" that appears to have all the PDFs from my library in it.

    Should I delete my local files & folders, reinstall Zotero, and then sync with my online library?
  • Yeah, you really don't want to just delete duplicate files from across your disk indiscriminately — I'd strongly encourage you to limit that to folders like Documents containing files you created yourself where you know exactly what they're for.

    In any case, you didn't answer my question:
    If so, what are the names, dates, and sizes of all the zotero.sqlite* files in the Zotero data directory?
    We need an answer to that to tell you what to do. Don't just delete files.
  • Here's what I can find:

    1. org.zotero.SafariExtensionApp.SafariExtension-beta

    2. org.zotero.SafariExtensionApp.SafariExtension-beta

    3. org.zotero.zotero - modified in 2019
    a) WebsiteData - no further folders/files at this level
    a1) IndexedDB
    a1.1) v0 - empty
    a2) LocalStorage - empty
    a3) MediaKeys - empty
    a4) ResourceLoadStatistics - empty
    a5) WebSQL - empty

    4. Zotero - modified in 2017
    a) Profiles
    a1) 4gxdfg12.default - no other folders/files at this level
    a2) crashes
    a3) gmp
    a4) storage - no further folders/files at this level
    a4.1) default - six files with structure below for google, tandfonline, etc.
    a4.1.1) https+++www.google.com
    a4.1.1.1) idb
    a4.1.1.1.1) 713543746LePgSaercoutrSe.files
    a4.1.1.1.2) 2713543746LePgSaercoutrSe.sqlite
    b) profiles.ini

    5. Zotero - modified in 2019
    a) locate
    a.1) engines.json
    a.2) Google Scholar Search.ico
    b) pipes - empty
    c) storage - many folders with the structure below, which look like my library
    c.1) 2A2V758C
    c.1.1) Cohen-Kettenis - 1998 - Medical treatment for.pdf
    c.2) 2A2V758F
    c.2.1) Cohen-Kettenis and Goozen - 1999 - Investigating the effect.pdf
    d) styles - csl files
    e) translators - js files
    f) pdfinfo-MacIntel
    g) pdfinfo-MacIntel.version
    h) pdfinfo.sh
    i) pdftotext-MacIntel
    j) pdftotext-MacIntel.version
    k) zotero.sqlite - modified yesterday evening, 971 KB
    l) zotero.sqlite.bak - modified yesterday afternoon near problem time, 971 KB
  • (Just to clarify, you didn't need to provide all of that — I was asking a very specific question about the files with names starting with "zotero.sqlite" specifically in your Zotero data directory.)

    Those two zotero.sqlite files are both empty databases, so you deleted any real copies of your database that you had. You should just sync to restore your data from your online library.
  • Thank you!
Sign In or Register to comment.