Collection Disappeared Without Deletion –– Tried Everything to Recover But Cannot


I am currently working on a 2-year long project that I am due to complete in a months time. I have been collecting sources in one collection titled "THESIS SOURCES" for the past two years. However, while I was adding a new source from a browser to this collection recently, the entire collection disappeared.

Although I believe most of the sources still exist generally in my library or in various other folders, I am not sure I will be able to remember every single one that should be in this given (very important collection) that has disappeared.

I have tried (1) Looking through every other collection to see if the collection exists within another collection somehow -- it does not (2) Looking in my "Trash" to see if it ended up there -- it does not (3) Disabling auto-sync then restoring an older synced version ("zotero.sqlite.back") from last week as suggested by other forum posts, -- but that only gave me a library with no sources/files at all, so I restored the current version with the collection missing in the meantime and re-enabled auto sync.

Please help! I am on a time crunch, and I really need to find or restore this collection with all of its files! Is there anything I can do? Thank you.
  • Same answer you saw in all the other threads. If you just did this, you should be able to restore a deleted collection from one of the automatic backups. Note the specific instructions for restoring collections.

    Unless zotero.sqlite.bak is much smaller than zotero.sqlite, that would be a current backup, and if you follow the instructions precisely you should see the state of your library from the date of that file. If you're having trouble, and the file is smaller than 150 MB (or is if you zip it), you can upload it to the DB Repair Tool and post the Upload ID here, and we can confirm that it has your data. (You can ignore the download links that the tool provides. This is just for us to look at the file.)

    Also note that the items would indeed all be in your library root, even though you deleted the collection.

    A future version of Zotero will make it possible to restore a deleted collection from the trash.
  • edited March 15, 2024
    To be clear, though, this would only happen if you actually deleted the collection — e.g., by pressing Delete/Backspace while focus was on the collections pane and then accidentally clicking through the confirmation dialog. There's no other way for this to happen.

    It looks like two collections in your library (which could be a collection and subcollection) were deleted a little over an hour ago.
  • edited March 15, 2024
    Hi, thank you for getting back to me!

    Once, I rename an old zoter.sqlite.bak file as the main "zotero.sqlite" file, do I then have to re-enable auto-sync? I did not want to do this in case it deleted even the version without the disappeared collection, but maybe this is my problem?
  • edited March 15, 2024
    That is good though that it shows a collection was deleted––hopefully that means I can figure out how to get it back eventually once I figure this out. However, I still cannot.
  • I used the DB Repair Tool as recommended and it fixed it and I now have the collection back! Thank you so much! Is there anything I can do to ensure this does not happen again or that my file will not need to be repaired? Apart from making sure not to delete a collection?
  • Well, again, there was no need to actually download a file from the DB Repair Tool — that was just to let us look at the file via the Upload ID. Your database wasn't corrupted. All you had to do was have the right file (zotero.sqlite.bak) in the right place (zotero.sqlite). You just followed a very circuitous path to getting there. In any case, it seems like you're OK now.

    But note the restore steps I linked to above. You need to make a copy of the collection before you enable syncing again (which you should definitely do), or else when you sync the collection will just be deleted again.
  • I recently had the same problem: Collections in a group suddenly just disappeared; of course, smoebody may have deleted those accidentally. As people had been adding new entries in the meantime, overwriting the DB with an old backup of mine did not seem like a good choice. I was wondering: Could collections be moved to Trash when deleted (just like entries) so they might be restored if need be (even if outside the tree they were originally nested in, if so)?
  • edited April 23, 2024

    1) Note that the restore steps linked above include specific instructions for restoring a deleted collection that doesn't require overwriting server data. If you just synced these deletions to your computer, you can absolutely restore from a backup.

    2) As I say above, a future version of Zotero will make it possible to restore a deleted collection from the trash.
  • Thanks for pointing out 1), maybe as a tip, I tried a potentially quicker resolve:

    I restored the old database as described in the linked instructions, then created one bogus entry and copied that to each collection. That was a little quicker than creating duplicate collections (given the amount of collections I have in that group library...); this (so I guess) updated the time stamp of the collections I wanted to have restored and syncing then "overwrote" the delete step.

    Looking forward to the feature described in 2) :)
  • edited 29 days ago
    That shouldn't work (or else we would recommend it), and it doesn't work for me. Collection-item membership is a property of items, not collections. Just adding an item to a remotely deleted collection wouldn't cause it to ignore the remote deletion. It would allow the collection to be deleted locally and then upload the new item without an associated collection.

    (This is assuming you didn't use Replace Online Library, which would completely replace the online library with the contents of your backup.)
  • I did not use Replace Online Library, but I might have done some additional steps that I cannot reproduce from my memory. I remember moving the collections into a new top-level collection I created, hoping that a change of location might set something to keep them from being deleted at sync; but when syncing, they were deleted anyway. From a backup in which the collections were still part of that new top-level collection, I moved them back up top and then did the thing with the bogus entry - at least as far as I recall. Somehow, all that toying around made the collections sync-safe ...
Sign In or Register to comment.