Repeatedly Disappearing data with 5.0

So, I upgraded my Zotero to 5.0 yesterday and most of my data disappeared. I followed the instructions at https://www.zotero.org/support/kb/data_missing_after_zotero_5_upgrade and successfully restored the library from the Zotero for Firefox files. Everything was there at 9 PM last night.
TODAY, I am sitting down to work on my paper and the data is again all missing. Why is this happening? I need to be writing, not dinking around with my citation library.
  • If your data is going missing, there's likely something wrong with your setup — even a normal upgrade to 5.0 would preserve all data.

    What's the location of your Zotero data directory in the Advanced → Files and Folders pane of the Zotero preferences? (You can x out your username.) In that folder, what zotero.sqlite.* files do you see, and what are their sizes and timestamps? Also, how many folders do you see in the 'storage' subfolder (if one exists), and do they have recent timestamps?
  • C: > users> alxxxxx > Zotero is the location of my directory, just like the support page says.
    There are 5 .sqlite files - the zotero.sqlite is time stamped 2:45 today. The zotero.sqlite-journal is also 2:45 today. The other 3 are from 2017.
    The storage folder contains 2,743 folders (65,000 files) - Yes I LOVE my Zotero...Some of them are from today.
  • And file sizes?
  • Also, can you elaborate on "all missing"? What do you see, exactly, when you open Zotero?
  • on each of the storage files? or the storage folder as a whole?
  • Just for the zotero.sqlite.* files.
  • All missing: I have 17 folders within my library, organized by topic. When I started Zotero yesterday and clicked yes for Zotero to make changes to my computer, once the library came up, some folders (the older ones) contained no documents. I followed the instructions to restore the files from the Zotero for firefox location last night and they were all there. When I started Zotero today, the folders that were empty yesterday are empty again. Looking for the file size now....
  • Yeah, that's too small. How about the other files with .sqlite in them -- what's their file size?
  • edited July 18, 2018
    That might not be too small — it depends on past indexing settings.

    Carla, how many top-level items do you see in My Library? And how does the data compare to your online library?

    You deleted a large amount of data in your online library in February and March. If you did that on another computer (or when using a different data directory on this computer) and then synced this one for the first time, you would sync down all those deletions and the deleted items would disappear.

    To recover from that, you'd need to restore from a backup of your data directory from before the sync and then restore your online library from the local data.
  • The journal one says 88.6 KB for size and 128 KB for size on disk
  • I only have the 18 folders under my library. All of the files are organized under the folders. I don't know how to check my online library. I do know that the little green arrow has indicated that it is syncing.
  • Click on "My Library" at the top of this page to check your online library.
  • I moved a folder from My Library to a shared library in Feb or March and deleted those, but that is not the data that is missing.
  • The data is missing in the online library as well.
  • I did save the Zotero-Old file yesterday, but my understanding was that it was missing the data as well.
  • edited July 18, 2018
    So I'm still not understanding what's missing.

    Are you missing items — that is, if you look in My Library and sort by Date Added, are the items missing — or are they just not in the collections where you expect to see them?

    If you're actually missing items, when did you create them? Since March, or before then? You may just be looking at a different data directory that doesn't contain those changes. You should be able to tell by sorting the 'storage' folder by date. The timestamps will correspond to the dates you were using Zotero with this data directory. (You can do this both in 'Zotero' and in 'Zotero-Old'.)

    If you're missing 'storage' folders from dates you expect, what are some of those dates? (That will let us see if the items ever existed in your online library and we're looking at synced deletions or if you're just using a different copy of your data directory.)
  • First of all, with nearly 3000 folders, I don't know what is missing, which is the biggest issue. I know that in my collection "Expertise and Expert Performance" there should be a book entry for the Cambridge Handbook of Expertise and Expert Performance by Ericsson, et al. It is not in my library at all now.
  • There should be one for the Handbook of Usability Testing by Rubin and Chisnell and it is not there. So, I am assuming it is not that they have just come out of the collections - They are gone.
  • The storage folders are random strings of digits. I am not seeing any folders prior to May of last year. Which is in line with the age of the items that are missing.
  • I am concerned that restoring from a .bak file is then going to lose everything I have saved since then...
  • I take that back. The ones in the current directory storage only go back to Nov 2017. The storage in Zotero-old goes back to May 2017.
  • edited July 18, 2018
    I am concerned that restoring from a .bak file is then going to lose everything I have saved since then...
    Just make a backup of everything and turn off auto-sync for now in the Sync pane of the preferences. That will prevent you from losing anything while you troubleshoot this.
    The ones in the current directory storage only go back to Nov 2017.
    Right, so, recall that you had some trouble previously and possibly deleted some things or moved some things around that you didn't intend to.
    I am not seeing any folders prior to May of last year. Which is in line with the age of the items that are missing.
    Meaning that the missing items are from before then? How does that compare to what you see in Zotero when you sort by Date Added? Are you missing old items in Zotero?

    Basically, we can only explain how this works in general terms. There's no way for data to just randomly go missing.

    If you're fully in sync, items from the past are missing, and you have more recent items, you deleted those items at some point and synced down deletions.

    If you were missing only newer items, the issue could be that you created those items on a different computer or in a different data directory on this one, hadn't synced those changes up to the online library, and then simply switched to a different data directory on this computer — since those items weren't in the online library, they'd be missing now. But from what you're saying that doesn't sound like the case.

    Assuming it's the first one, you'd have to restore from a backup. Do you have a backup of the data directory you transferred from Firefox — i.e., the version you thought was correct?
  • recall that you had some trouble previously - Yes, which is why I am wanting to address this quickly. Last time, I was trying to back up my data and copied it the wrong way. I did not do that this time.

    Meaning that the missing items are from before then? How does that compare to what you see in Zotero when you sort by Date Added? Are you missing old items in Zotero?
    Yes - It is the older items that I am missing.

    looking for the backup...
  • So, even though I restored the library from Firefox yesterday, since I had deleted those items in the past, syncing with the web erased them?
  • So, even though I restored the library from Firefox yesterday, since I had deleted those items in the past, syncing with the web erased them?
    That's right. It's possible to swap in a different data directory, but you then have to take additional steps to overwrite the online library with the older local data. Otherwise it's just like you opened Zotero on a computer that hadn't synced in a while, and it will then pull down changes since the last sync, as you'd want it to.

    So I'm guessing what happened here is that you upgraded to Zotero 5 and that ended up using a new data directory rather than the Firefox one (which doesn't normally happen but can due to Windows security software or similar) and pulling down your online library. You then switched back to the directory you'd been using from Firefox (without any recent syncs) and saw your old items again. But when you synced, that pulled down the same previous deletions.

    So you'd want to find a backup of the directory from Firefox — ideally of the whole folder, but if necessary one of the zotero.sqlite.bak files that Zotero creates automatically in the directory, which generally date back a couple days.
  • OK I have found the file. Once I have it updated again, I need to follow the "additional steps" link above to keep the sync from erasing it, correct?
  • That's right.

    You should also check to make sure your attached files are all present, since if you just restore from a database backup some of those could still be missing.
  • Thanks :) I have double back-ups now and am waiting for my laptop to fully sync with the online to restore it to the online library. It could be helpful to add the instructions about the online version overwriting the local library to the page about "data missing after Zotero 5.0 upgrade". Those instructions worked perfectly until the sync erased everything ;) Thanks so much for your help.
Sign In or Register to comment.