Constant problems with sync, duplicating collections and deleting articles

edited October 25, 2019
Hi,

I recently upgraded my storage plan. All was good, I started creating a lot of collections and uploading around 2,000 articles and their pdfs, and sorting them out.

I left my computer synchronising for hours, and after I saw that no new progress was made syncing, i tried closing Zotero. A few error windows popped-up saying "invalid login" or some sort.

I opened zotero again and start syncing, and to my horror it started deleting articles. I immediatelly closed it, exported my library and tried again. What probably happened is that it stuck at syncing a while ago, I made new changes, and because it didn't register them, it tried to sync the online storage by removing my articles.

I have since then tried MULTIPLE times to restore my storage and all the collections (more than 100 with the subfolders) but every time I import the collection, it duplicates all the folders AND subdirectories, which I don't understand how, because when I exported they were not duplicate. I synced with another computer, cleared the duplicates, synced the online server, all good.

One zotero is in my main workstation (manjaro linux) and the other is in a windows 7 VM that I boot when I need to work with MS Word. I cleared the duplicates in the windows 7 Zotero, synced with online storage, go to linux Zotero (I had the sync unlinked all this time in linux Zotero), delete everything including trash and Zotero > storage, link with online sync, downloads articles but creates duplicate colelctions.... I don't know how, the online sync had NO duplicates. Could it have retained the old colelctions even AFTER I deleted everything?

I spent two whole days trying to organise my library, and I've been spending the whole day today trying to deal with this mess..... I'm still trying to deal with the duplicate mess BEFORE starting to re-do one full day of work that zotero deleted....

EDIT: I will update again tomorrow, I'm trying to sync again from the beginning. Pray for me.
  • A few error windows popped-up saying "invalid login" or some sort.
    Not sure what this would be. We'd want to know the exact message.
    What probably happened is that it stuck at syncing a while ago, I made new changes, and because it didn't register them, it tried to sync the online storage by removing my articles.
    No, that doesn't happen. Zotero only ever syncs explicit deletions, so if items are disappearing, it's because you (or someone else on a linked computer) deleted them and synced those deletions to the online library. That's the only way.
    I have since then tried MULTIPLE times to restore my storage and all the collections (more than 100 with the subfolders) but every time I import the collection, it duplicates all the folders AND subdirectories, which I don't understand how, because when I exported they were not duplicate.
    If you export and import, you'll get duplicates of any data that's still remaining in the library. Importing creates completely new collections and items with no link to the previous ones.
    Could it have retained the old colelctions even AFTER I deleted everything?
    I'm not clear on how you deleted things, but Zotero never creates duplicates on its own. If you're getting duplicates, those items still existed somewhere before the sync. (And if you exported and imported back into a library that still had data and synced, you'd have duplicates online.)

    I would make an immediate of all copies of your Zotero data directory, since there may be an automatic backup with data you want to preserve. And an actual backup — not an export — is how you would always want to restore data.
  • I feel you pain.

    I just installed Zotero on a new computer and did a manual export/import before thinking "Hmm, it would be a good idea to turn on syncing on this new computer."
    >hit sync
    >everything duplicated
    >(oh no) uninstalled Zotero and decided to reinstall and sync so there would be only one copy
    >all duplicates show up again
    >"okay, I'll delete everything and sync to redownload everything."
    >sync - nothing left in library

    Luckily I knew I had my backup from the manual export/import so I just re-imported. It seems to have worked...but damn I hate sync functions! Is there no option to see which library will sync to which? It seems to just do whichever one it wants.
  • edited December 19, 2020
    @KYLENOVAK: You're just misunderstanding how syncing works.

    Syncing doesn't create duplicates. All it does is sync the changes you make.

    If you export and import your library, those are completely separate items as far as Zotero is concerned. If you then sync, you end up with 1) the original items from your other computer and 2) the new items that you imported.

    If you then delete everything in your library, Zotero will dutifully sync those deletions with the online library and your other computers. That's the only way syncing could work, if you think about it — obviously, if you make a deletion in your library, you expect that deletion to be replicated on all your other computers. If you wanted to recover from the import, what you would've wanted to do is sort your library by Date Added and delete just the newly imported items, which would all have Date Added values from the time of import.

    In the future, to transfer your library between computers, all you need to do is sync. (Copying your entire Zotero data directory between computers would also work, because then Zotero just reads the same database you had on the other computer, with all the same items, and will pick up where you left off.)

    I'm not sure what state your library is in now, but if you have an actual backup of your Zotero data directory before you did these things, you could restore from that and overwrite the online library. Otherwise, the best you can do is import again, but note that those items won't be connected to citations in word processor documents, and all the Date Added values will be from the import time.
  • "I'm not sure what state your library is in now"

    (my original comment) "Luckily I knew I had my backup from the manual export/import so I just re-imported. It seems to have worked..."

    "In the future, to transfer your library between computers, all you need to do is sync."

    Will do.

    "Copying your entire Zotero data directory between computers would also work"

    No. That doesn't work. That's what I did this time and that's what caused the duplicate.
  • No. That doesn't work. That's what I did this time and that's what caused the duplicate.
    It really does work and many thousands of people have used it successfully. It's also no different from restoring from a back-up, which you just used successfully. See https://www.zotero.org/support/kb/transferring_a_library to clarify what we're talking about.

    You said above that you used export/import, which, as dstillman says, would produce exactly the results you're seeing.
  • It's also no different from restoring from a back-up, which you just used successfully.
    (Just to avoid confusion, @KYLENOVAK was referring to a "backup" of the export — i.e., just a copy of the exported file — not an actual data directory backup.)

    But yes, @KYLENOVAK, copying the data directory from the other computer absolutely would have worked, and importing from an export, as you did, would've caused exactly the situation you described.

    Also, just so you understand, re-importing from an export only "worked" in the sense that it created another set of new items. Again, those items are unlinked from any existing citations in your word processor documents. If you have an actual backup of your Zotero data directory from the old computer, you'd want to instead restore from that using the instructions we linked to and overwrite your online library.
Sign In or Register to comment.