Update and sync removed one year of data
I use the standalone app for Windows, and recently renewed a subscription for 2gb of storage. When I opened the app, my library was empty. I hit the button to sync from the cloud, my library was repopulated with an iteration from at least a year ago. As a result, I've potentially lost over a hundred entries. My library on the website also reflects this older version.
Is there any way to undo the sync and retrieve my missing entries?
Is there any way to undo the sync and retrieve my missing entries?
This is an old discussion that has not been active in a long time. Before commenting here, you should strongly consider starting a new discussion instead. If you think the content of this discussion is still relevant, you can link to it from your new discussion.
It's basically this:
https://www.zotero.org/support/kb/data_missing_after_zotero_5_upgrade
If you weren't using Zotero for Firefox previously it's not totally clear where your old data directory is or why it would've happened now, but you should be able to find your previous data directory elsewhere. Start by checking what your current Zotero data directory is, and then look for a 'zotero' directory within your Zotero profile directory or Firefox profile directory, and let us know the timestamps and sizes of the zotero.sqlite* in those directories and whether there are 'storage' subdirectories with more directories within them.
https://www.zotero.org/support/kb/restore_after_firefox_reset
https://www.zotero.org/support/kb/data_missing_after_zotero_5_upgrade
Thanks for your help. Problem is still unresolved, but here's what I've discovered.
On my standalone profile directory I have:
zotero.sqlite 11/20/2017 8808KB
zotero.sqlite.bak 11/20/2017 3064KB
zotero.sqlite-journal 11/20/2017 89KB
and the storage subdirectory contains no such files.
On the Firefox profile directory I can't find any Zotero subdirectories nor zotero.sqlite* files. Further, I've checked my Firefox profile and haven't found (and couldn't recall creating) any custom paths.
I was using the Opera extension a few months ago, but I also find nothing in the Opera profile directory. My standalone app was also set to automatically update, so I'm confused as to how it could have reverted to such an old library. I also recall my online library having been up to date as of a few weeks ago, last I checked. Apologies for my vague recollections.
I haven't used the "refresh Firefox" option, so no "Old Firefox Data" folder exists.
If you answer my questions above your current data directory from the prefs and the sizes, timestamps, and 'storage' contents for both directories you've found, we can walk you through what to do next.
The directory I just explored above ("C:\Users\username\Zotero\") contains the following files:
zotero.sqlite 11/14/2017 91384KB
zotero.sqlite.1.bak 11/14/2017 97880KB
zotero.sqlite.77.bak 11/14/2017 97880KB
with nothing relevant in the storage subdirectory.
I tested the first .bak file above to successfully restore an old library, with a few loose ends needing to be merged. I've also switched my default path to "C:\Users\username\Zotero\".
It's likely that the update simply switched my default path from this data directory to the standalone profile directory, which had older library backups. I think I'll manually upload this library to the cloud, and see if I can't get the profile directory to recognize it.
Zotero 5.0 attempts to migrate your data directory out of the profile directory to C:\Users\username\Zotero. If that doesn't succeed (e.g., because security software or something else prevents it), it should give you a warning and tell you that you need to finish moving the files manually. I'm not sure what you mean by this, but you shouldn't sync until you've successfully restored your previous data directory and can access attachment files.
The storage folder has all of my attachments with the older timestamps. I meant to say that it had not .sqlite files.
I did not realize that Zotero was switching from the profile directory to "C:\Users\username\Zotero". During the update, my files must have migrated, but the path did not switch to the new directory. I'm not sure if this makes sense.
By manually syncing, I just thought there might be some way to sync on command, rather than having the process occur automatically. My mistake.
Thankfully, my attachment files are all present on the new storage subdirectory, and the standalone app can read a representative sample without issue, so I feel safe enough re-enabling automatic sync (for the record, I disabled it only today so that I could address the issue).