Missing Collection and sub collections

Hello Zotero forum,

Yesterday (Nov 13) I was creating a new SubCollection within a Collection (with right click ‘New Collection’) when the Collection and an estimated 30 sub-collections within it disappeared with an est 400 record citations.

I’m a neophyte using stand alone Zotero on my office workstation, synched to Zotero.org . My workstation runs Windows 7 Enterprise 2009. Browser is Firefox 52.21 (32 bit).

I found the current citations using the zotero.org website and sorting by date (2017July to present): the citations are still online but all in one huge file “My Library”. I sample checked the citations on my stand alone Zotero and it looks like they are still there but they are no longer organized into the collection\sub collection folders.

There were no error messages. I have not added any new data.

I’ve looked at the Forum and do not see information that might help me with this.

I wonder if I can restore from my workstation hard drive or … ?
I cannot open the sqlite file on my workstation hard drive.

On my workstation c:\users\name\Zotero there are 3 files:
zotero.sqlite date modified: 14/11/2017
Zotero.sqlite.bak date modified: 12/11/2017
Zotero.sqlite.1.bak date modified: 10/11/2017

Is the Zotero Data Directory documentation current ?
https://www.zotero.org/support/zotero_data

Should I follow the section on "restoring from the last automatic backup" ?

Thank you for any assistance. / Ann
  • edited November 15, 2017
    So if you were using Zotero previously on this same computer, you're mostly likely using a different Zotero data directory than you were using previously, likely in the upgrade to Zotero 5.0. (Based on the files there, this data directory hasn't been updated from Zotero 4.0.) If you weren't fully in sync in the previous data directory, those changes wouldn't be online, and then if you pulled down the data into this new data directory you wouldn't see them. (Note that you would've received a warning message from Zotero that you were syncing to an empty data directory.) Zotero 5.0 should automatically use your existing data directory, but it's possible that didn't happen for you for some reason.

    Check your Zotero profile directory and your Firefox profile directory (if you were using Zotero for Firefox previously) for a 'zotero' directory, and then check the zotero.sqlite* files in there.
  • Though, actually, when did you start using Zotero on this computer? If you only started using it here in the last few months, you wouldn't have upgraded from 4.0.

    You can try 1) backing up all three of those zotero.sqlite* files, 2) temporarily disabling auto-sync, and then 3) swapping in zotero.sqlite.bak (if it still has a November 12th date) as zotero.sqlite to see if the collections come back that way. If so, we can walk you through keeping that version.
  • (And if that works, the most likely explanation here is that you accidentally selected "Delete Collection…" or pressed Delete and then clicked through the confirmation prompt. There've been no other reports of collections being deleted any other way.)
  • I started using Zotero on my office workstation in the past few months (and previously on other computers since 2013ish). I'll try backing up the three zotero.sqlite* files as you suggest.

    Yes, it's possible that I accidentally selected "Delete" ... alas . Thank you.
  • The exact same thing happened to me on the same day.

    I am a long-time (years) user of Zotero and have used the new stand-alone version successfully since September. I am very certain that I did not delete and sub-collections.

    I will try to recover my items, but this sure is irritating. I wonder: was there any record of a Zotero server hiccup around 6:00 PM EST on Nov. 13th?

    Thanks.
  • Thanks -- The sqlite file swap worked, and now the file structure (collection and sub collections) are restored as of Nov 12th.

    Is there anything that I need to do to keep that recovered file?
  • @anndoyle: If you have all your data (including attached files, which should be accessible from within Zotero and stored in c:\users\name\Zotero\storage), you're all set.

    @JohnWolff: No server hiccup, but you might gotten switched to a different data directory in the Zotero 5.0 upgrade (particularly if you had previously used both Zotero for Firefox and Zotero Standalone and they were pointed at different data directories). If you're still having trouble, start a new thread and we can walk you through looking for another data directory with the missing data.
  • This morning (Nov 18) I sync-ed my newly restored Zotero stand-alone database to the online, and lost all of the collections and sub-collections again.

    What did I miss?

    If I re-restore the files, how can they be sync-ed to/with the server?
  • Oh, sorry, I forgot that we concluded that this was likely an accidental manual deletion — and there are indeed a whole bunch of deleted collections from Nov 13th in the server's delete log. I've now cleared those from the log, so if you repeat the DB swap and sync, you should be fine.
  • Repeated the DB swap and sync (sync auto, sync fulltext content but NO file syncing)
    The web online did not sync.
    Did a Manual sync; did not work.
    Closed the stand alone, closed the online, logged off/log on computer
    Stand alone - resync button says "last sync 2 sec ago"
    Web online - now has the collections/sub-collections but "no items found" in any of the restored collections/sub-collections (items appear in "MyLibrary")
    Did another Manual Resync from the stand alone - did not work.

    Suggestions?
  • Ah, OK, assuming your local library is still correct, do this:

    1) Go to the Advanced → Files and Folders pane of the Zotero preferences and click Config Editor.

    2) Search for recursiveCollections and double-click it to toggle it to 'true'.

    3) Click on the parent collection, which should now show all descendent items.

    4) Drag those items to another temporary collection.

    5) Sync. Zotero will send up the collection lists for those items again, which will include the original collections they're in plus the temporary collection.

    6) Assuming that works, go back to the Config Editor and disable recursiveCollections if you don't want it on, and then delete the temporary collection.

    (You can skip the recursiveCollections step if it's easy for you to select all the items those collections (e.g., through a search for a common tag) — the point is just that you want to add all those items to a temporary collection to trigger the re-upload.)
  • re: 4) Drag those items to another temporary collection.

    Is there a way to "select all" items in the collection and drag the selection... or are you saying drag each item to another temporary collection?

  • Ctrl/Cmd-A on your keyboard.
  • Thank you everyone for your assistance. The structure and citations now restored ... !!
  • Can I ask a question related to this old thread? I have the same issue and I'm ready to try the solution that worked for the OP, but I wonder how to do the (apparently) easy part: #3 in the list from above:

    "You can try 1) backing up all three of those zotero.sqlite* files, 2) temporarily disabling auto-sync, and then 3) swapping in zotero.sqlite.bak (if it still has a November 12th date) as zotero.sqlite to see if the collections come back that way."

    I've got three sqlite files on the hard drive now, all of which are backed up elsewhere: zotero.sqlite-journal, zotero.sqlite.1.bak (dated Aug 23, prior to my accidental deletion), and zotero.sqlite.bak (w/ today's date).

    I moved zotero.sqlite (dated today) to another drive so I could replace it with the backup from the date before this happened. Is that right? Then I tried to rename zotero.sqlite.1.bak as "zotero.sqlite," but I'm told "The name “zotero.sqlite” with extension “.bak” is already taken. Please choose a different name."

    When that didn't work, I opened Zotero and said "yes" to the question, "do you want to import the file zotero.sqlite.1.bak." I got the error message that the file's invalid.

    So, what am I doing wrong in step 3?

    Thanks!

    Jennifer
  • @Jmbarker:
    Then I tried to rename zotero.sqlite.1.bak as "zotero.sqlite," but I'm told "The name “zotero.sqlite” with extension “.bak” is already taken. Please choose a different name."
    That just sounds like you removed the ".1" and not the ".bak" at the end. (Or your OS is doing something weird, but we can't really help with that — you'll need to figure out how to rename the file properly to zotero.sqlite.)

    If you're getting an error at Zotero startup once you've restored the zotero.sqlite file, you'll need to say what exact message you're getting.

    Also note that there's more up-to-date documentation for this that you should follow:

    https://www.zotero.org/support/zotero_data#restoring_from_the_last_automatic_backup
  • Thanks. I'm about to try it again (I had to rename the file using the "info" window rather than just in the finder.)

    One question before I do. I'm trying to restore a bunch of collections, so I think I need to restore to online library "to force Zotero to upload the local version of the library, overwriting previously synced changes," per that other documentation. That won't "disappear" the files that are stored online, will it (given the backup sqlite file has data but no files)?
  • no it won't. Your local files stay safely within the local storage folder throughout all of this anyway.
  • It worked. Thanks!
Sign In or Register to comment.