I added a note and copied some Java code into it. Joplin locked up and refused to respond even after restarting it. It just displayed the locked UI. I killed all process called ‘joplin’ but there may be others I’m not yet aware of. Nothing worked and the machine rebooted a while later. After reboot I start Joplin and all I see is the welcome screen. Weeks of importing and reformatting notes. Gone. I checked the profile directory. My resources are still there but the DB is tiny and things look grim. I searched my user directory for other config etc. but found nothing useful.
Is there any hope that there’s a shadow copy somewhere or something similar? This seems like a major bug and is mightily discouraging after years of waiting and searching numerous times for a note app. with decent Markdown editing support, finally finding Joplin and spending so much time migrating notes to end up here. Gut-wrenching.
A free program I have heard of but never used "in anger" is Shadow Explorer which provides a GUI for looking through shadow copies and extracting files. I only ever tried the portable version on a VM just to see if it ran (it did), so you might want to do some "due dilligence" on it with your own tests before thinking of running it on your system.
EDIT: Thinking about it, do you sync to cloud storage? If Joplin crashed straight after adding the note that could mean that it never synced those changes. If that is the case you could possibly just delete / rename the .config/joplin-desktop folder on your computer, then open Joplin "as new" and re-sync it with the unaltered copy on the server? Or connect using another client on another computer to see if the notes are intact and back it all up using a JEX export?
I don't, I'm afraid. However, the news is better. Firstly, I crossed my wires a bit. I have two machines running Joplin. The work machine was where the problem pasting Java occurred but I confused that with my other machine when writing. I was able to recover the work version. I did that by editing the sqlite DB and removing
the last note which I could see was the Java code. When I first loaded Joplin today it started frozen again . It also refused to close. After killing processes and editing the DB, all is well again. NDAs prevent me from providing the code but my take is that something in the code was causing Joplin to choke, even though I believe it was pasted between code block quotes which I entered beforehand.
On the other machine what happened was this. On the day before, I pinned Joplin to the task bar. When I started it yesterday it came up as a clean installation and my notes were gone (just not due to pasting Java code). I'd tried that the day before and found that the task bar icon was wrong. It was just the default white dos box icon. I'd removed that and done it again and the right icon was used but starting from the task bar caused Joplin to start without my notes. Later I thought to try starting from the normal start menu icon and when started from there my notes are restored. The DB itself is fine. I later realised that it's so small because the resources are stored separately. So nothing is actually lost but I may have uncovered another bug or two. It certainly was alarming to have both stop working, anyway and yes, I will make sure I have backups and exports now.