[5.0 Beta] Library lost when migrating to Zotero Standalone
I have been using the 5.0 Beta inside Firefox for about one week without issues. Today when clicking on the Zotero button in the toolbar, I was told to install Zotero standalone, which I did.
When I started it, I was ask something (I don't remember exactly) about choosing the where the library should be, with three buttons. I clicked on the button in the middle, which said something like "use current library" and contained the path to my ~/.mozilla/firefox/$PROFILE/zotero directory. When the Zotero window opened, the library was empty (with the just the example reference), and in the preferences window I could see it was stored in ~/.zotero/zotero/$PROFILE.
What is REALLY problematic is that ~/.mozilla/firefox/$PROFILE/zotero was completely REMOVED. Luckily I had a backup copy (though from last week, not from today). I suppose the intent was to move the old library to the new place? In the end, I copied the backup to the new profile under ~/.zotero, and it works fine. It's really weird that the copy did not happen. I would suggest being super careful when removing the old library; maybe ask the user to do it manually, or propose to do it after the user can confirm the new library has been loaded correctly?
I can send you the contents of the new library for inspection if you want to check them.
When I started it, I was ask something (I don't remember exactly) about choosing the where the library should be, with three buttons. I clicked on the button in the middle, which said something like "use current library" and contained the path to my ~/.mozilla/firefox/$PROFILE/zotero directory. When the Zotero window opened, the library was empty (with the just the example reference), and in the preferences window I could see it was stored in ~/.zotero/zotero/$PROFILE.
What is REALLY problematic is that ~/.mozilla/firefox/$PROFILE/zotero was completely REMOVED. Luckily I had a backup copy (though from last week, not from today). I suppose the intent was to move the old library to the new place? In the end, I copied the backup to the new profile under ~/.zotero, and it works fine. It's really weird that the copy did not happen. I would suggest being super careful when removing the old library; maybe ask the user to do it manually, or propose to do it after the user can confirm the new library has been loaded correctly?
I can send you the contents of the new library for inspection if you want to check them.
See https://www.zotero.org/support/preferences/advanced
Also, you can find related info https://www.zotero.org/support/zotero_data
I'm under Fedora 25 (Firefox 50.0.2).
1) If you have your data directory in the default location within the Firefox or Zotero profile directory (~/.mozilla/firefox/$profile/zotero in your case), 5.0 automatically migrates it to ~/Zotero on upgrade. In your case, that would've actually happened a week ago when you installed Zotero for Firefox, so you've most likely been using your data at ~/Zotero since then. That migration uses the Linux mv command (we're certainly not deleting anything), so the ~/.mozilla/firefox/$profile/zotero shouldn't have existed after that.
It also sets ~/Zotero as a custom data directory location in the prefs, so that if Zotero 4.0 goes looking for the data directory for that profile, it finds ~/Zotero. (4.0 won't be able to open the newer database until you upgrade, but that's better than creating an empty database in the old default location.)
2) When you upgraded to the new Zotero Connector for Firefox, it prompted you to install Zotero. However, I believe you went to the main download page (reasonably, because that's where the link pointed) and downloaded Zotero Standalone 4.0 instead of the Zotero 5.0 Beta. I just updated the link in that dialog to point to the 5.0 Beta thread instead for now.
3) This next part I'm a bit confused about. When you opened Zotero Standalone 4.0, if you hadn't previously used Zotero Standalone (meaning that you didn't have a ~/.zotero directory) and there was no ~/.mozilla/firefox/$profile/zotero directory (since the older Zotero 5.0 for Firefox beta already moved it), it wouldn't have prompted about an existing data directory and would've started up with an empty database in ~/.zotero/zotero/$profile/zotero. That's not ideal, but that also won't happen to Zotero for Firefox upgraders after 5.0 Final, because when prompted, they'll upgrade directly to Zotero 5.0, which will migrate their 4.0 data directory from ~/.mozilla/firefox/$profile/zotero to ~/Zotero.
But you're saying that, when you installed Zotero Standalone 4.0, you received the "Existing Zotero Library Found" dialog. That only happens if there's an existing 'zotero' directory within your Firefox profile directory, which shouldn't have been the case for you. And if it had been the case (say, because the migration failed for some reason while you were using Zotero 5.0 for Firefox), then when you clicked "No" (the middle button) in that prompt, to not import settings or share your existing data directory with Zotero for Firefox, it would've created an empty 4.0 data directory in ~/.zotero/zotero/$profile/zotero, but then your data never would've been migrated from ~/.mozilla/firefox/$profile/zotero to ~/Zotero. I don't know how you would both have a new 4.0 data directory and also have a 5.0 data directory in ~/Zotero if you were prompted to share the data directory.
So I suspect there's a step here that you left out or are misremembering, though I'm not sure what.
In any case, while this was understandably disconcerting for you, the good news is that, whatever happened, I don't believe this should be an issue for others, because there's no more Zotero 5.0 for Firefox (meaning the Firefox version will never migrate the directory itself) and, when people do upgrade to Zotero 5.0, it will simply migrate the directory to ~/Zotero and then use that directory.