All my knotes have disappeared!

My first post here - be kind to me!

Sometime recently all my knotes have disappeared. I can’t say when, as I only access them periodically, so I can’t correlate this with any changes or updates applied.

I am running Fedora38 with all the latest updates. In particular:

$ rpm -qa|fgrep knotes
knotes-23.08.1-2.fc38.x86_64
knotes-libs-23.08.1-2.fc38.x86_64

akonadictl status shows akonadi is running, and I can see a mysqld process running:

/usr/libexec/mysqld \
–defaults-file=/home/peterm/.local/share/akonadi/mysql.conf \
–datadir=/home/peterm/.local/share/akonadi/db_data/ \
–socket=/run/user/8342/akonadi/mysql.socket \
–pid-file=/run/user/8342/akonadi/mysql.pid

but I confess I have a minimal understanding of how all this KDE plumbing works.

In fact, although I have been using KDE for ages, some years ago I lost all my kmail data. With the help of an expert I recovered it, but I don’t remember the details. Suffice it to say that it was such a painful experience that I switched to Thunderbird!

The knotes data exists in the mysql database, as I did a “strings” on the file, and saved that, as it shows all my missing notes.

But launching knotes tells me I have no notes.

I have searched for similar problems, but can’t find any obvious way to recover the data.

Thanks in advance for any help.

Best wishes – Peter

Hello Peter,

please try to quit knotes and reopen the program. That can sometimes restore “lost” notes.
Also please check configure knotes->colections to see if your collection has been accidentally disabled.

Thanks for the response.

Stopped the empty knotes and restarted - the same - “No Notes”.

“Configure knotes > Collections” I think is just referring to the current empty knotes. Two screenshots attached.

As a new user I can only attach one screenshot, but I am fairly sure the “Accounts” tab is only pointing to the current empty knotes.

Thanks again – Peter

Click on the notes checkbox, that should bring your notes back hopefully

There could also be something in ~/.local/share/notes/

1 Like

Tried that, but it didn’t make any difference. Also, nothing in ~/.local/share/notes - no such directory.

A question: where is the definitive repository for the knotes? Is it the mysql database in $HOME/.local/share/akonadi/db_data? As I said, that certainly seems to contain the few dozen notes I had created. My minimal understanding is that akonadi was the repository for all these KDE apps - notes, email, calendars etc

Is there a way to connect to the akonadi mysqld using mysql and issuing SQL queries, to see what information is there? I am no MySQL expert, but I have a little experience with this. Or even simply doing a mysqldump of the akonadi database.

The problem I have is that, whilst I liked the “look and feel” of knotes, and found it useful for storing short snippets of information, it seems that the connection between knotes and the data it is supposed to contain is a little fragile. And I have very little idea about how to debug this whole KDE app/akonadi area. As initially stated, this happened to me some while back with kmail, and I just moved to Thunderbird.

Maybe I should just go low-tech and have a directory with short files in it?

Sorry to sound a little negative :frowning:

Best wishes – Peter

I stopped using knotes this year after too many issues. You are correct that it is fragile and it is frustrating that it is tied into akonadi (using the kmail style files instead of flat, markdown text). I now use zettlr for notes since it is standard markdown in a known, simple location I can set.

When I ran into issues, I found my notes were saved as individual kmail files here:

~/.local/share/.notes.directory

There were directories for that middle column in notes, then under them would be empty ‘cur’ and ‘tmp’ folders and the important ‘new’ folder. Each note (right column) is a separate kmail style html doc in this ‘new’ folder.

I believe Knotes saves notes in the usual directory - ~/local/share/notes and so you can look there.

Also, I’m going to sound like a dick - it’s unavoidable - but I always run hourly snapshots plus a daily/weekly backup (Rsync) to my storage disk…

So if anything existed in the past, you can just copy it back from your backup directory.

Something else which I did a few years ago is to use a cloud folder (Dropbox) and I always keep my notes inside that folder, so if they cease to exist locally, I can get them from backup and I can also get them from Dropbox. I would say I didn’t really love knotes too much, I ended up keeping all my notes as .md files with Obsidian - in a folder ~/Dropbox/Notes.

Good luck, live and learn.

From my experience, every PIM app that relies on Akonadi is expected to disappoint the user after a period of usage.

For long term notes I simply use Kate (.txt) or Ghostwriter (.md) and save them inside a folder on an external disk, and for fast and temporary notes I simply use sticky notes which can be recovered from ~/.local/share/plasma_notes/.

Thanks for all the comments.

Seems I’m not alone in having been worked over by akonadi!!

I have often claimed to be a founder-member of The Society for Plain Text. Not sure if such a thing exists, but it ought to!

Having recovered everything I had in knotes by doing a “strings” on the MySQL file (modulo a few infelicities, but I can live with that), I’m going to keep these little snippets of information in simple text files.

I am currently teaching myself emacs org-mode, and that may be what I am heading towards.

I will still use KDE - it remains the best desktop environment IMHO. But I just dislike that level of indirection resulting from putting important data (email, notes, calendar etc etc) behind a whole lot of akonadi/MySQL “plumbing”. Which is fine when it works, but has proved to be a bit of a nightmare on the occasions when it has broken.

Thanks again everyone – Peter

2 Likes