Library Disappears After Upgrade

New install of Windows 7. I upgraded to Zotero 2, (re)started Firefox, got the notice that the DB had to be upgraded, when it finished, the library is empty.

I renamed the .bak file to zotero.sqlite, and the same thing happened.

I have a zotero.sqlite.36.bak and a zoter.sqlite.1.bak file, both of which are the right size for my library (the zotero.sqlite-journal file is also that size). But the .new and the .sqlite files are both 232 KB and empty.

How can I get my library back? Yoikes!
  • Check out Dan's comment here: http://forums.zotero.org/discussion/10470/libraries-simply-not-showing-up/#Item_4

    Carefully read the link he provides.

    About half way down it says:
    Troubleshooting Zotero Data issues
    Where did my items go?

    Occasionally after upgrades or system restores, users open Zotero to find their libraries almost completely blank. While you may find this a bit disconcerting if it happens to you, do not panic. In almost every case the fundamental issue is that Zotero is looking in a different location for your data. You need to make sure that Zotero is looking in the right location for your Zotero files and that the right files are in that spot:
    If you still have problems, please post back.
  • Yeah, went through all that. The only oddity I can see is that I don't have a file/folder named "storage." It is a custom data directory with the various zotero.sqlite files and a styles and translators folder.

    I followed the instructions for the data restore. It works to some degree, because Zotero recognizes that it needs to update the DB. But, after running the update, the library remains empty.
  • If you don't have a 'storage' folder, and you had saved attachments (PDFs, snapshots), then that isn't the data directory you were using previously.
  • Understood. I did not have PDF's that were imported into Zotero--I linked to files elsewhere on the drive instead. Is there anything else to try before resorting to a previous RDF export?
  • Yes, we'll help you debug. Don't do an RDF import.

    Report ID?

    What's the size of the zotero.sqlite.36.bak file?

    There's a zotero.sqlite.new file? I don't think Zotero creates such a file, so SQLite may be having trouble writing a new file.

    If you reinstall 1.0, switch back to the zotero.sqlite.36.bak file, and then go to Check Database Integrity in the Advanced pane of the Zotero prefs, does your database pass? (The next release will automatically check the database for errors before upgrade.) If not, use the DB Repair Tool.
  • Thanks!

    The .new file was one that I created as a backup copy, sorry.

    I reinstalled 1.0 and went back to a backup, and--oddly--still had no library. Am doing it again, with the .36.bak file explicitly. How completely weird. The collection still shows as empty, although the zotero.sqlite file remains 1,627 KB.

    Preferences ... Advanced shows the custom file, and clicking SHOW DATA DIRECTORY confirms that it is showing the folder I'm looking at. CHECK DATABASE INTEGRITY says no errors.

    I ran the DB REPAIR TOOL, and replaced the .sqlite file with the result. It is no 1,622 KB, but still shows as empty.

    I must be missing something somewhere here, but I'm really not sure what.
  • Then that's almost certainly not the data directory you were using previously, as the Zotero Data page advises. An empty Zotero 1.0 library is about 1.5MB.
  • The original file (this is on a new install) was 1.51 MB. I have a copy of that file from 12/1/09. So, that would mean that I carefully backed up the wrong info from the old computer, huh?

    OK, if so, then I assume the RDF import is the only way to go?
  • So, if I understand you, you upgraded the backed-up file to 2.0 directly rather than installing 1.0 first and confirming that your data was there?

    If that's the case, and you don't have another backup, then, yes, it sounds like you would have to go with RDF import. Note that, if you were using the word processor plugins, any links to references in existing documents would be lost.
  • That wouldn't have helped me. I carefully saved the folder where I _thought_ Zotero's data was stored. It was the wrong folder. No matter what version of Zotero I installed after the upgrade would only have access to the wrong data.

    What else will be lost through the RDF? Will links to existing files remain, or are those toast as well? Tags?
  • I understand—I'm just confirming that you didn't, in fact, see your data before the upgrade.

    I can't recall the exact behavior of the RDF export, but if you selected Export Files when exporting to RDF, you might have a 'files' directory along with the .rdf file in the backup folder, and those files would be imported into the 'storage' directory. RDF is meant for data exchange, not backup, so it doesn't preserve links to files on your computer.
  • OK, thanks for your help. Too bad for me ... :)

This is an old discussion that has not been active in a long time. Instead of commenting here, you should start a new discussion. If you think the content of this discussion is still relevant, you can link to it from your new discussion.