library disappeared

Not really a new discussion, but certainly unanswered. I read the many previous forum discussions about this and tried the suggestions.
Running standalone Zotero 5.0.47 on Mac OSX 10.13.4.
Backed up Zotero May 4.
Yesterday I was working on an entry, and it disappeared when I left the machine for a while. Never had happened before.
Today, I had to "restart" the Mac to get rid of an annoying desktop notification. When it restarted, the entire Zotero My Library was empty. My one collection and all 9 K+ items, all gone. 2 weeks work beyond the backup. The data directory folder "SOFDH Library" with the sqlite and sqlite.bak files has those files, but they are empty, at 926 KB each. I checked Trash (Zotero and the Mac's), Unidentified Items, Duplicate Items, and My Publications - nothing. As mentioned, the collection named "SOFDH Library" is gone. I do have the backup from 2 weeks ago, but identifying the past 2 weeks work will involve checking over 9,000 books, 1 by 1, against the backup files, assuming I can get Zotero to recognize the backup files. I have searched the entire computer for zotero, sqlite, and sqlite.bak files, and all I can find are my backup files from 2 weeks ago and the "empty" data directory.
What did I do to erase the entered data, yesterday and today?
I now have turned on Mac's time machine and hopefully will have hourly backups from this point forward, but I really would like to know what happened.
Thanks,
--Ron
  • Today, I had to "restart" the Mac to get rid of an annoying desktop notification.
    Could you say more about that? E.g. any reason you're putting "restart" in quotation marks -- was there anything special you did? Did the desktop notification suggest some sort of problem?

    Then, you didn't sync, did you? That might help here.

    And then just to confirm both the zotero.sqlite and the zotero.sqlite.bak file are 936kb (or around there) and there is no other .sqlite.bak file?

    If that's the case, this almost certainly is not your old data directory, which would contain at least one more automatic backup file.

    I'd guess your old files are still on your computer. How exactly have you searched?
  • The "restart" was the Mac's restart option. I enclosed it in quotation marks to differentiate it from my restarting the Mac after a power failure, for example. I restarted because I couldn't find a way to erase a notification that I had received a phone call. The Mac had been linked to my phone, and I turned off that notification, but the popup would not go away until I did the restart bit. No, it did not suggest a problem.
    Correct. Zotero is not synced to anything.
    Correct. Both the zotero.sqlite and the zotero.sqlite.bak files are 926 KB, and the zotero.sqlite-journal file is 29 KB. There are no other Document files in the SOFDH Library folder.
    I have searched the entire computer with the Mac Finder for zotero, sqlite, sqlite.bak, SOFDH Library, old data, and various other words and phrases suggested in other forum threads, such as source.
    I agree, the SOFDH Library folder does not appear to contain the old data directory.
    If this were a PC, I would ask the computer to show all files, in case the file extension had been changed, but I am new to Mac.
    I did notice that Firefox keeps updating itself when I call up that program for e-mail, and that that might have been a problem if Zotero had been linked to Firefox, but I don't believe that it was.
    What else could I search for? This Mac is so non-intuitive.
    Thanks,
    --Ron
  • edited May 19, 2018
    So the “SOFDH Library” is a custom data directory that you configured in Zotero’s Advanced preferences? Is this in a normal location on your hard drive or somewhere in a cloud storage folder (Dropbox, etc.) or on an external drive?

    Is there a ‘storage’ directory in that folder, and if so, if you sort it by date, do you see recently created folders?
  • That is correct. SOFDH Library is a custom data directory located on the Mac's desktop. SOFDH Library is the folder listed in Zotero as the data directory. The Mac is not linked to cloud storage, and the external drives were not plugged in during the 2 weeks that I was adding entries into the library. The only folder or directory labeled "storage" anywhere on the Mac is one in the Trash, but it is empty and dated 2 weeks ago. I cannot find another, not in SOFDH Library or in Zotero backup, a backup folder that I created 2 weeks ago. There is a "Storage Management.app" listed in the Mac's Applications, but it seems to be a Mac program. Where could the entries of the previous 2 weeks possibly have been stored?
    Thanks,
    --Ron
  • Yeah, so there's no way this was the data directory you were using previously — there'd be a 'storage' folder with folders in it, there'd be at least on additional backup file, and zotero.sqlite and the day-old zotero.sqlite.bak automatic backup wouldn't be empty. I can't tell you what happened here, but the only way Zotero itself could've done this is if you were using syncing and then switched accounts or unlinked your account and checked the box to delete all your local data.

    Note that Spotlight doesn't show results in /Users/:username:/Library by default, so you may have been using a data directory within there. Specifically, you can check the Zotero profile directory and, if you ever installed Zotero 4.0 for Firefox, the Firefox profile directory for 'zotero' subdirectories.
  • Also, isn't the desktop synced to iCloud? If so, that and the documents directory are a poor choice for Zotero _data_ files.
  • It depends on the settings, but yes, that's a possibility.
  • Good thoughts. Thanks.
    Looking for /Users//Library/Application Support/Zotero/Profiles/,
    but Zotero does not appear in the Application Support directory. In fact, there is no Profile file associated with Zotero anywhere on the computer.
    I always have refused to link my Mac to iCloud, despite the constant pop-up prompts to do so.
    No, never installed Zotero for Firefox.
    Where could my library be?
    Thanks,
    --Ron
  • I suspect you’re looking in /Library/Application Support rather than /Users/:username:/Library/Application Support. If you’ve ever started Zotero there will be a Zotero directory.
  • Cannot find "Library" under "Users/:username:/," just "Zotero," and that folder has no Profile or Storage.
    There is a "Library" folder under Macintosh HD, But there is no Zotero, or Profile, or Storage under it.
    Where else could the files be?
    Thanks,
    --Ron
  • See the note at the instructions I linked to above, which tell you how to find that directory.
  • Sorry, I must be doing something wrong. I'm new to Macs.
    The note says:
    "Note: The /Users//Library folder is hidden by default. To access it, click on your desktop, hold down Option, and click the Finder's Go menu, and then select Library from the menu."
    But the Finder's Go menu does not list a Library. How/where else could it be listed?
    Thanks,
    --Ron
  • As it says, you have to hold down the Option key.
  • Oops, wrong key. That was dumb. Okay, I found the Library directory. Searched around in it.
    Under Application Support is Zotero,/Profiles/x65maee6.default, but nothing in there is large enough to be a data file.
    Where would the data be stored?
    Thanks,
    --Ron
  • In a 'zotero' subdirectory. But that would only be the case if you were initially running Zotero 4.
  • Where would it be in standalone Zotero 5.0.47?
    Thanks,
    --Ron
  • /Users/:username:/Zotero
  • edited May 21, 2018
    Won't help you find your files, but just out of curiosity, if you do a File → Get Info on the zotero.sqlite file in "SOFDH Library" on your desktop and look at the Created timestamp, what does it say?
  • One other thing you can try: open Terminal via Spotlight, type mdfind -name zotero.sqlite, and press Return. That should show you all the copies of zotero.sqlite on your computer, including within Library.
  • Good to know. Thanks.
    These files came up:
    /Users/rh/Desktop/SOFDH Library/zotero.sqlite
    /Users/rh/Desktop/SOFDH Library/zotero.sqlite.bak
    /Users/rh/Zotero/zotero.sqlite
    /Users/rh/Zotero/zotero.sqlite.1.bak
    /Users/rh/Zotero/zotero.sqlite.bak
    /Users/rh/Desktop/Zotero backup/zotero.sqlite
    /Users/rh/Desktop/Zotero backup/zotero.sqlite.1.bak
    /Users/rh/Desktop/Zotero backup/zotero.sqlite.bak
    The Desktop/SOFDH Library files are marked for today and May 18 and are empty. These are the ones I am seeking. I keep opening Zotero from the desktop and this empty file comes up.
    The Zotero files are marked May 2 and May 4 and contain the records entered up to May 4. When I open Zotero from the Finder results, this is the file that comes up.
    The Desktop/Zotero backup files are marked May 2 and May 4 and contain the records entered up to May 4.
    I checked Trash again and found a smaller file called zotero.sqlite.
    I have dragged it to the desktop, but how do I open it to check its contents?
    Thanks,
    --Ron
  • What's up with these, though --you haven't mentioned these before:

    /Users/rh/Zotero/zotero.sqlite

    how large is that file?
  • Indeed. Thank you for helping me find /Users/rh/Zotero/zotero.sqlite, although this is not the file that disappeared.
    /Users/rh/Zotero/zotero.sqlite appears to have been my first attempt to import an EndNote file. It had thousands of tags that made it incredibly slow and not useful when displayed, so I went back to EndNote and transferred all my "Keywords" to the "Abstract" field and re-imported the EndNote file to Zotero. That was 2 weeks ago.
    I would like to check the Zotero.sqlite file that I dragged from Trash to Desktop, without endangering other files (e.g., by putting it in the SOFDH Library folder and later deleting the wrong file).
    Can you tell me how to open it?
    Thanks,
    --Ron
  • If you just close down Zotero, rename the current zotero.sqlite in the SOFDH folder to zotero.sqlite.old, the copy (not move) the zotero.sqlite file you want to test to that folder and restart Zotero, there's no risk of breaking anything.
  • Thank you, adamsmith. Good to know.
    Turns out that the questioned filed was an old import attempt from May 4.
    Any idea where else Zotero could have been storing the last 2 weeks of entries?
    Thanks again,
    --Ron
  • The command I gave you shows you all the zotero.sqlite files on your computer, so if it's none of those, then I'm afraid you (or something on your system) somehow deleted the files that were in use previously.
  • Okay, I give up trying to find the zotero.sqlite file with the last 2 weeks of work.
    So I go to the Zotero backup folder, where the file from 2 weeks ago should be, and there it is, "zotero.sqlite" at 25.9 MB, which seems about right.
    I re-set Zotero to the default rh/zotero directory. I remove the zotero.sqlite file from the rh/zotero directory. Now I've got the quick start message.
    I check, and zotero.sqlite at 922 KB is back. Reappears every time I remove it and re-start Zotero.
    Okay, it won't go away.
    I drag the proper "zotero.sqlite" file to that directory.
    "The selected file is not in a supported format." Oh yeah. You can't drag; you have to import.
    So I file-import the proper zotero.sqlite file from the Zotero backup folder.
    "The selected file is not in a supported format."
    I rename the empty zotero.sqlite as zotero.sqlite.old and restart.
    An empty zotero.sqlite reappears.
    How do I get Zotero to access the proper file if import and dragging do not work?
    Why is the proper zotero.sqlite not in a supported format?
    Thanks,
    --Ron
  • You don't open, drag, or import a database, and it doesn't say to do so anywhere.

    Zotero will use the files that are present in the data directory when it starts up. If you delete the database and start it up, it will create an empty one.

    https://www.zotero.org/support/zotero_data#restoring_your_zotero_library_from_a_backup1
Sign In or Register to comment.