Data directory changed - can't recover

I was using Zotero for a couple years and syncing my metadata to zotero.org.

My data directory has always been $HOME/Documents/Zotero.

I recently restarted Zotero and it showed an empty library and asked if I wanted to sync an empty library. I said 'no' (or 'cancel' or whatever).

I looked in Preferences -> Advanced -> Files and Folders and it showed my 'Data Directory Location' was now $HOME/Zotero (default).

I changed it back to $HOME/Documents/Zotero, clicked 'Show Data Directory' and confirmed that all my files were still in the directory.

I restarted Zotero, got the same question about syncing an empty library (and gave the same answer). The library still appears empty.

Next, I moved my whole Zotero directory from $HOME/Documents/Zotero to $HOME/Zotero, and restored Preferences -> Advanced -> Files and Folders -> Data Directory Location to $HOME/Zotero (default).

I restarted and still had an empty library.

Now I did something which may have been catastrophic (if the previous steps weren't already so...). Next time I started Zotero I agreed to sync the empty library.

My library populated nicely with all my collections and sub-collections, but nothing was linked (e.g., none of my local PDFs opened when I clicked on an item in a collection).

So, having probably irrevocably broken something (like my zotero.sqlite file), I'm asking for help.
  • No, this sounds pretty benign. If you show the data directory now, is there a folder "storage" in it? If so, approximately how many subfolders does it have?

    If not, do you have such a folder in your old data directory in documents?
  • It's working now. Your confidence that I hadn't broken everything gave me some freedom to play around.

    I moved my Zotero directory from $HOME/Documents/Zotero to $HOME/Zotero, which Zotero decided was the default, then quit/restarted Zotero a couple times.

    I had to wait a couple minutes, but eventually all my collections and subcollections populated and the warning about syncing with an empty library went away.

    Now when I start Zotero, my library populates immediately and double-clicking an item opens my locally-stored PDF, which is my expected behaviour.

    To answer your question: There is a folder called 'storage' and it has a sub folder for each item I have in my Zotero library (just over 500).

    Thanks for the help! I'm quite relieved not to have to re-import all my locally-stored PDFs...
  • Yes, that all sounds good; glad you got it to work.
Sign In or Register to comment.