.pdf files disappeared from "Storage folder"

After an automatic update (5.087) all my pdf files have disappeared. I can see the folders where they should be (named with 8 characters) but these are empty.

I use MacOS Catalina. I have no Firefox-Zotero profile, only a profile in the application support directory and a main Zotero folder in the user directory.

I have a copy of all files stored separately but it would take ages to re-assign them. I don't remember where I had (or whether I had) set the previous storage location. So far I have only tried to delete the prefs.js file but this is did not help.
  • Zotero itself wouldn't have deleted any of your files on disk separately from the attachments in Zotero, so the possibilities are that 1) you're using a different data directory from before and synced to pull down all your data (but no files, since you've never synced them), 2) something else on your computer deleted the PDFs, or 3) the files were added elsewhere and never existed on this computer.

    What are the names, sizes, and timestamps of all the zotero.sqlite* files in your data directory? In 'storage', do the subfolders have timestamps corresponding to your historical usage of Zotero, or are they all recent (i.e., from a recent sync)?
  • Thanks. All zotero.sqlite* files have a time stamp from today (I tried fixing Zotero earlier). All the "storage" subfolders have time stamps from yesterday evening, when (I think) I realised that the update occurred and the files were unaccessible.
  • OK, so this isn't the data directory you were using before. This is just a new data directory at the default location into which you synced your online library, and you don't have any files online. You'll need to search for the old data directory.
  • Yes, I figured that much. I have tried but didn't find it. Would the address be in some file from the profile in the application support directory?
  • Not unless it somehow hasn't been migrated out of there since you upgraded from Zotero 4 to Zotero 5, which came out in 2017. The old Zotero 4 location was 'zotero' within the Zotero profile directory. If you used Zotero 4 for Firefox before 2017, it also could've been 'zotero' within your Firefox profile directory.

    But if you've been using Zotero 5, nothing about any recent update would've had any effect on your data directory.

    If you did used to use the old Firefox extension, I don't suppose you reset your Firefox profile recently? Is there an Old Firefox Data folder on your desktop?

    Alternatively, have you done anything with Zotero sync settings recently? E.g., if you switched accounts, or unlinked your account and told it to delete data, that would've wiped the data directory.

    Do you have a backup (e.g., from Time Machine) of your computer?
  • I couldn't find anything linked to Firefox profile, although I have used it with Zotero. I have reinstalled Firefox a few months ago though.

    On the other hand I do have a TM backup, what should I look for?
  • edited 14 days ago
    On the other hand I do have a TM backup, what should I look for?
    First look to see if there's a backup of "Zotero" in your home directory and it appears to be your previous data directory.

    If not, restore a copy of prefs.js from the Zotero profile directory from before this happened, open it in TextEdit, and look for a line containing "dataDir" to what custom data directory you were using.
  • Ok, the storage folder was in the same location. I don't know why the pdfs were gone but I could recover them by replacing the storage folder with a version from a few days ago. Thanks for your help.
  • No, the PDFs weren't gone — your entire data directory was somehow deleted, and you then synced to pull down your online library. The backup should show older zotero.sqlite* files (including earlier backups), older files in 'styles' and 'translators', etc.

    Zotero definitely didn't delete your data directory on its own, so either you would did one of the things above in the Sync preferences or something else on your computer deleted the folder.
  • Ok. Good to know.
Sign In or Register to comment.