All local folders lost in KMail

Martin Steigerwald martin at lichtvoll.de
Sat Aug 17 19:34:52 BST 2019


Hi Peter.

Peter Humphrey - 17.08.19, 16:50:49 CEST:
> > Akonadi misconception #1: where is my data?
> > 
> > https://blogs.kde.org/2011/11/13/akonadi-misconception-1-where-my-da
> > ta
> > 
> > Which basically means that your mails could still be in the
> > filesystem, somewhere under '~/.local/share' usually, where is
> > somewhere would be 'local-mail' or 'akonadi_something_resource', at
> > least for POP3. The resource configuration dialog in Akonadiconsole
> > would tell the location. For IMAP they could theoretically still be
> > on the IMAP server.
> > 
> > It is really important to understand that before claiming that mails
> > may be lost. Of course mails disappearing from KMail for no good
> > reason would still be a bug, but it might (!) not be a data loss.
> > 
> > 
> > Some more of the information in such a data loss case would be:
> > 
> > 1) What does 'akonadictl fsck' tell?
> 
> Many thousands of "[...] has no RID", mostly Items, but also including
> 20 Collections. (I stopped counting at 500 pages of 30.)  :)

Hmmm… that is a message about items Akonadi has in cache (i.e. database 
und file_db) but for some reasons did not manage to put into the remote 
location. For POP3 with Maildir resource this is the local maildir 
(~/.local/share/{local-mail|akonadi_maildir_resource_something}) and for 
IMAP this is the IMAP account.

Unfortunately Akonadi does not attempt a second time at the moment. This 
is one of the major changes Daniel still wanted to tackle, if I remember 
correctly.

I do have some of those as well and that is why I try to keep the 
database. I am not sure why Akonadi would ever fail to store a mail in 
the local maildir. However I am not sure whether in my case this would 
cause any data loss, I did not appear to loose anything as I migrated 
from MariaDB to PostgreSQL, basically by deleting the database (with a 
backup before) and letting it build a new one. At least I did not miss 
something.

But in your case when you get this many of those messages… there might 
be a hint on why or how you lost data.

One of the messages I got was:

Item "1467067" in collection "434" has no RID.

With some knowledge it is possible to trace this back to an item.

Collection is basically the folder the item is in. And the item refers 
to the actual item, like the mail, event, task or contact.

You can see the item IDs when opening a folder in the "Browser" tab of 
Akonadi console. I believe you can see the collection ID of a folder in 
the attributes window you can access with the context menu by right 
clicking on a folder in Akonadi Console. And I believe you can search 
within a table for collections what folder has what idea, but I do not 
know the actual SQL query.

And yes… IMHO the user should never have to deal with any of that but… 
if you again experience a mail loss, this knowledge might be helpful to 
find out what happened.

Best,
-- 
Martin




More information about the kdepim-users mailing list