Alright, I’m happy to report that I’ve successfully recovered all of my KNotes data. I will provide notes below in the hope that it may help someone else.
The version of KNotes I have installed now is 25.03.70, from the KDE:Unstable repo listed above. It doesn’t run. I don’t know which version(s) of KNotes I last had installed and under which I created my notes, but I used KNotes for many, many years (more than ten), and was using it until the latest updates that removed it. I never lost data (and still haven’t). I know there have been some changes over the years in how the data is stored. All I can tell you is what I observe from my own TW installed system. It appears that I have data stored under versions 12 and 25, based on the directory structure I see.
KNotes data is stored in the Akonadi DB and some files in the user’s home directory. The relevant entries have pimitemtable.mimeTypeId = 1. Each note has its own pimitemtable.id. parttable.partTypeId types 3, 5, 6, 7, and 8 are populated in my data. You can find descriptions in parttypetable.
Note names, for example, can be found in partTypeId 6 and 7.
The most relevant is partTypeId 5. This contains either the data for the note (MIME-encoded, I think), OR a filename in the user’s $HOME where the data is stored. I’m not sure what determines which way the data is stored – maybe the size of the note? How recently is was modified? Anyway, it’s stored in one of those two ways.
The file names, when the notes are stored that way, look like 12_r343 and 25_r309 on my system. I’m guessing the first part (12 and 25) is the KNotes version, and perhaps the other part is some revision number. Not sure, but it’s some unique filename.
Those files are found, on my system, in directories corresponding to the KNotes version under which they were originally created (I guess). In any case, for my most recent note that I care about the most, which was created under version 25, the data file 25_r309 is found here:
$HOME/.local/share/akonadi/file_db_data/25/25_r309
Your file names will of course differ, but the directory structure where they’re found should be the same.
I tried several ways of extracting the MIME-encoded data with utilities and other tools, but in the end I just ended up editing it by hand. It was simpler for those not steeped in MIME encoding 