Restore a deleted collection?
Hello,
My problem: Moments ago I accidentally deleted a collection (with two sub collections) from my Zotero library (on computer "A"). First, I tried to edit/undo, but this wasn't possible. Second, I checked the Zotero trash, but it wasn't there. Third, I tried to restore data from the Zotero Server, and it deleted all my local files, but when it restored it did so without the deleted collection, which makes me think it synced in the moment between my deleting it and noticing it was deleted. When I check my library online the missing collection is, in fact, missing.
My first question is this, is there a spot where I can locate the missing collection (and sub-collections) and I'm just too stupid to figure this out? Or, are they truly gone?
My next question is this, I have Zotero on another computer (computer "B"), and I quickly shut off syncing on that computer and the missing collection (and sub-collections) is still there. Is there a way I can upload the missing collection from computer "B" to the Server, which will then add the collection to my library on computer "A"? Is that what a "Restore to Zotero Server" would do? Rewrite the material from what I have in computer "B"?
Thanks for any help you can provide.
My problem: Moments ago I accidentally deleted a collection (with two sub collections) from my Zotero library (on computer "A"). First, I tried to edit/undo, but this wasn't possible. Second, I checked the Zotero trash, but it wasn't there. Third, I tried to restore data from the Zotero Server, and it deleted all my local files, but when it restored it did so without the deleted collection, which makes me think it synced in the moment between my deleting it and noticing it was deleted. When I check my library online the missing collection is, in fact, missing.
My first question is this, is there a spot where I can locate the missing collection (and sub-collections) and I'm just too stupid to figure this out? Or, are they truly gone?
My next question is this, I have Zotero on another computer (computer "B"), and I quickly shut off syncing on that computer and the missing collection (and sub-collections) is still there. Is there a way I can upload the missing collection from computer "B" to the Server, which will then add the collection to my library on computer "A"? Is that what a "Restore to Zotero Server" would do? Rewrite the material from what I have in computer "B"?
Thanks for any help you can provide.
You have two options, I think:
1. On computer B, create reports from the collection and subcollection and use those to (manually) recreate the collections on computer A.
2. From computer B, use "Restore to Server"
Option 1 is preferable if you have a lot of work on computer A that hasn't yet synced to computer B. Option 2 would delete any such work, but would, obviously, be a good bit faster.
I will let you know if I have any questions about generating reports, etc.
Thanks again, I really appreciate it.
- Turn off automatic sync and close Zotero
- Find out where your zotero.sqlite file is stored and rename it, for instance to zotero.sqlite_old.
- Rename zotero.sqlite.bak to zotero.sqlite
- Start Zotero. If you're lucky, you should see your deleted collection again
- Create a new collection, name it 'Save Me'. Drag all items from the deleted collection into the new collection. This will prevent sync from deleting the information in your deleted collection.
- Now sync your database. All information you added since the last backup but before you deleted your collection is added to your database again. Your deleted collection will disappear, but you have saved your data in 'Save Me'.
It is so easy to delete them without wanting and it is much to hard to get the data back.
Maybe a checkbox in the confirmation pop-up would be the quickest way to help many users. Right now deleting a collection is like deleting one entry.
But honestly, must users have to endure constant heart attacks on behalf of a vital piece of software?
We absolutely need a double-verify on the delete collection process. I agree a simple checkbox to go with the delete button would save many. This is a real serious problem.
It's become such a problem I dread every time I go into Zotero to snap entries or even to access my file articles.
Please help protect collections from accidental deletion.
Thanks
b...
We're working on undo functionality for collection deletions, which should be available soon.
The only thing I can think of is that the problem may lie somewhere in the create a new collection/subcollection process. I will right click to create a new sub-collection.
I will start to type the name in and hit enter (without looking as I am looking at the keyboard) and then look back at Zotero and realize the new folder box is still there with "untitled" highlighted and the new name was not entered into the new folder dialogue box.
So, this may mean that while the keyboard should be entering into the highlighted new collection/sub-collection name field the keyboard strokes are somehow deleting the last collection I had been working on. Maybe when I hit enter thinking it is "naming" and then "creating" the new collection, it is deleting the collection I was last on when I hit enter to create the new collection name.
I can report that this collection/sub-collection naming issue has happened during every occurrence of collections going missing, since Zotero 5. It always happens when I am in deep organizing with Zotero which always necessitates creating new folders. I'd take a look into that. The bug might be in there.
Ensuring that when a new collection/sub-collection is being created and the "untitled" is highlighted that indeed when the keyboard is used at that moment that it is entering into the naming filed of the new sub-collection field.
I think that's where the problem is happening to me. It's not every time. It's intermittent the creating of a new sub-collection problem. What I can also report is in this process when I think I am typing in the new name into the folder and then hit enter, maybe that enter is triggering the delete. But there is no standard prompt that you regularly get with delete. So this could be why the collection seems to disappear with no conscious action on my part to approve the deleting.
Hope that helps. Otherwise, I can report no other bugs, or weird action of the client.
P.S. I am using desktop, mac, 5.0.59
In any case, the fact that there can be keyboard input before the collection-name prompt appears is certainly a bug in the current implementation, so we'll fix that.
I think the keyboard input issue is certainly part of it. But like you I am stymied on this troubleshoot.
I believe I am confident that I've tracked down one issue problem of why at times I can call up the new-collection prompt and not have the keyboard input go in. It's a function of mac OS with the second monitor.
I have Zotero on my second monitor. So if I have an app active on my main monitor i.e. Outlook and I take my mouse pointer over to the second monitor, hover over a collection and right-click on a collection to create a new collection the new collection prompt will pop up.
However, if I had NOT clicked first on the Zotero app to activate it, then the keyboard input does not go into the field. So you can hover over Zotero and interact with it on right-click, but the focus of input is not yet on the Zotero app.
So this obviously has no impact on the delete issue because keyboard strokes are not being recognized by Zotero.
This leaves me to believe that the problem could be going the other way. Since inevitably, the missing collections are always one of the ones that I had been interacting with in the most recent session, perhaps when I go back to my main monitor at some point, the Zotero app is still accepting keyboard input and I activate a delete while thinking I am working in Outlook. Could be as I usually am going back to Outlook to delete whatever email I had sent myself with the link I needed to snap into Zotero. Still though, I would be sure to have noticed that input I was entering on the main monitor app was not happening.
I would also notice if a delete prompt was popping up on Zotero on my second monitor (while working on the main). There's no way I could miss that.
Like I said I'm stymied on this troubleshoot.
Undo collection delete would be amazing
Just as good or in conjunction would be perhaps making "cancel" the default on the delete collection prompt as opposed to "delete" being the default. Or not allowing the enter-key to execute a delete and make it a mouse click on the delete button.
If this last suggestion was implemented it would allow a proper troubleshoot to happen. Since, if collections still get deleted mysteriously after removing the default enter-key to execute a delete, then we'd know that there is another pernicious bug somewhere.
Thanks for working on this. I simply love Zotero and you folks for making it happen.
Cheers
b....
It is possible that the most recent automatic backup may be a database version that still contains your collection.
Now zotero is advising the only solution is to chase down sqlite files and "hack" them back in?
How is there not just a simple Undo function for such an easy mistake?
Bottonline advice: when collections appear to have been duplicated out of nowhere DO NOT DELETE THEM!
In more detail: I was using Zotero as usual, when I suddenly noticed that some of my collections appeared to be duplicated. After checking they were really duplicates, I erased one of the verstions. To my utter surprise, the remaining versions started to look weird so I restarted Zotero, only to find out those collections all disappeared! Not only the version that I deleted, but both of them! If this is a bug, please fix it!!!
P.S. Created this account just to say thanks!!!
For the first time, there was NO dialog, "do you want to etc." it just suddenly deleted. Up to now this had worked flawlessly, so I cannot really repeat this. Nor was Zotero busy, it seems to me, doing much. All I can say is the that little dialog box on deleting a collection simply never appeared......
Before closing Zotero, make a backup of the zotero.sqlite* files in your Zotero data directory, and then find an item that was in the collection and check for collections containing the item. If you don't find the collection elsewhere in your library (from moving it accidentally), you can try restoring the collection from one of your last automatic backups.
I always make a daily local back up of Zotero and had just done so, so nothing was lost, just a little heart attack :-) The instructions to restore a Zotero library from a local backup are pretty clear...https://www.zotero.org/support/zotero_data
I would like to send a note to the team ''put an UNDO option, i don't understand why there is a cycle bin ".
I always put my references in a single library when I import them as I tend to just search over the whole library anyways when I need them. This means that after I deleted a collection, all the works that were in that collection ended up in "entries without a collection". So I just made a new collection of the same name as the old one and could just drag and drop everything back.