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.
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.
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?
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.
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.
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.)
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?
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 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.
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.