Restore Group Library after member accidental delete

A new member to a shared group library has deleted almost all collections and entries in a group library (thinking he was only working on his local copy). This deletion has already been synced to the zotero server.

Is there a quick and easy way to restore the group library? The group library's owner has not synced to his local files yet, so could he use "restore to server"? Or what other way is the best to proceed here?
  • I'd be curious if @danstillman had a better solution, but the best I'm aware of would be to export the whole library as Zotero.RDF and then delete and re-import the whole content of the group.
    Restore to server doesn't affect groups; that's what you'd in such a situation for a personal library.
  • Unfortunately it's quite a large library (about 14600 entires and 30 GB).
    All items are still in the Trash, but the collections are lost when the items are restrored from trash. Any clue how those might be saved/restored?
    Otherwise we'll have to try to reimport everything and hope it copes with the large volume.
  • Possibly, You could also open a local backup of another members' library and then restore from there local library to the server. Don't try that unless @dstillman agrees.
  • If someone still has the library in its original state — or you restore from a recent backup (including the automatic backups in the Zotero data directory) — you might be able to recover from this by creating a new item and adding it to each collection. That should create a conflict, and Zotero should keep the set of items in each collection. (This would work in Zotero 4.0, not 5.0, because 4.0 treats the set of collection items as a property of the collection itself.)
  • Thank you a lot for your help!

    Unfortunately, @dstillman 's solution worked only partially. I did the following steps:
    1. I recovered from my automatic backup to the state before everything was deleted.
    2. I created a new item and added it to every collection.
    3. I synced with the group library. A sync conflict occurred and the collection structure was preserved locally, but all items were moved to the trash
    4. I un-deleted all items in my trash and synced again.

    Now I have all items in the correct collections locally, but when another user logs in through the web page, to them all collections are empty except for my new entry, i.e. all other items are in the main folder.
    While every user could do the same steps as I did, new group members would have no chance to recover the correct file structure. Is there anything else I could do or should have done differently? Otherwise I think we have to with the RDF export and reimport.
  • That should've worked, but try now removing the extra item from each collection and syncing again.
  • Now every collection is completely empty ('No items found'). The structure is still intact, but entries weren't put back.
    Would it help if the group owner repeats the process?
  • It sounds like for some reason the undelete didn't sync. I suspect you could trash and untrash all items in the library again to get that to go through, but would you like us to set all items in the library as not in the trash? (If there are any you don't want, you could remove those from the trash permanently.)
  • I'm not sure I understand that completely.
    Currently, when viewed on the web, all items are in the group main folder ('Library') and none remain in the trash. So there is nothing you could mark as not in the trash? Or am I wrong here?
    On another thought, could you manually overwrite the group library if we provide you with a original zotero.sqlite database file from before the deletion?

    On my local system, I see every entry in the correct folders, but that didn't get synced. Deleting and undeleting that would be the second option?
  • edited June 17, 2017
    Ah, sorry, I missed that the items weren't in the trash online any longer. But then removing an item from each collection really should've propagated the collection-item membership from your library, assuming you're syncing with Zotero 4.0, not 5.0. Can you confirm that?

    In Zotero 4.0, any time you add or remove an item to/from a collection and sync, it uploads a list of items in the collection.

    In Zotero 5.0, collection membership is treated as a property of the items, so you'd have to add all items to a temporary collection and then sync.
  • Thanks for alll your help, I think I finally figured it out :)
    I added a new item to some collections _again_, synced, and now everything is in place for those collections.
    I still need to do this for all collections, and check what other group members get when they start to sync again, but now everything looks as if it should work.

    I'm on Zotero 4.0; otherwise this approach shouldn't have worked, correct?
  • OK, great.

    Yes, this process is only for 4.0. In 5.0 collection membership is a property of items (not the other way around), so the steps would be slightly different, but you'd still be able to recover.
Sign In or Register to comment.