I’m running an up-to-date version of tumbleweed with KDE plasma 5.18.0 and kernel 5.5.2-1. This morning I noticed that kmail wasn’t downloading email from all my accounts. Following some advice I found at forum.kde.org, I tried the following:
akonadictl restart
But that led to a disaster. All the folders in kmail are now empty–inbox, sent mail, drafts, etc. All in all about 20,000 messages are gone. I tried restarting from a snapshot but that didn’t restore the missing emails.
The storage path for the local folders in kmail is ~/.local/share/akonadi_maildir_resource_0. And when I open that folder in Dolphin it’s filled with thousands of files but for some reason they’re not showing up in the kmail desktop folders.
Please post the output of the following CLI commands:
“cat ~/.config/akonadi_maildir_resource_0rc” – if there’s more than one Akonadi Maildir Resource RC file in ~/.config/ then, please “cat” those files as well.
“cat ~/.config/akonadi/akonadiserverrc”
“ls -l ~/.local/share/akonadi/”
In the “~/.local/share/” directory, are there “local-mail” and “**.**local-mail.directory” directories?
If you quit “Kontact” and then, execute the CLI commands “akonadictl fsck”, followed by “akonadictl vacuum”, followed by a repeated “akonadictl fsck”, does that bring any improvement when Kontact is restarted?
Does the CLI command “akonadictl status” indicate that the “Akonadi Control” process and the “Akonadi Server” process are both running?
Does the CLI command “akonadictl instances” indicate anything other than “(default) (running)”?
If the Akonadi status indicates that either or both the Control and Server process are not running, you’ll have to execute the CLI command “akonadictl start” to get them up and running before you can execute the “fsck” and “vacuum” commands …
Does the “xorg-session.log” usually located in the directory “~/.local/share/sddm/” – if you don’t use SDDM, it’ll be somewhere else – indicate any issues with Akonadi at login?
Thanks very much for taking the time to make those suggestions. After a glitchy rollback I tried restoring my home directory from an rsync backup file. Unfortunately that created more problems–firefox wouldn’t start, etc. So I ended up re-installing tumbleweed last night so I can’t try your suggestions now. But I am wondering if there is some way I can retrieve and import my emails into Kontact from the home directory that I backed up on an external usb drive using rsync. The backup file in ~/.local/share/akonadi_maildir_resource_0 seems to contain all my email messages but I don’t know how to import them into my new installation.
Thanks again for your help.
I suggest that, you consider daily backups of the most used e-Mail folders and, “every few days”, weekly, monthly and quarterly backups «depends on usage» of the other e-Mail folders.
The easiest way to import is to create a new pristine account and add the backup folder as another mailbox.
I tried that but unfortunately it didn’t restore my lost emails. The lost emails do exist in the ~/.local/share/akonadi_maildir_resource_0 file but the contents of that folder are not restored in a readable format in kmail’s various folders–inbox, sent, etc.
I suggest that, you consider daily backups of the most used e-Mail folders and, “every few days”, weekly, monthly and quarterly backups «depends on usage» of the other e-Mail folders.
I will start doing that as of today. Thanks for the link.
Phew, I finally managed to get my lost emails back using a copy of my home folder that I had backed up with rsync. Just in case I’m also archiving my mail, so thanks again for the suggestion.
Congratulate yourself for making yourself a backup of your mail files…
So many people don’t do that and would have had no recourse.
People should know that today BTRFS is deliberately configured to exclude data files in general and personal files in particular from snapshots so will not protect against a scenario like what is described in this thread… The idea is so that if the system is rolled back personal data won’t be affected. Here’s hoping though that sometime in the futuer personal files and data can also be snapshot but managed differently than the system…
Congratulate yourself for making yourself a backup of your mail files…
So many people don’t do that and would have had no recourse.
Thanks! Rsync really saved my bacon. It’s such a great and simple tool and works quietly and efficiently in the background. No gui needed. And thanks also for clarifying what the snapshots do and don’t do.