Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Kontact lost all email

  1. #1
    Join Date
    Apr 2018
    Location
    New Mexico
    Posts
    137

    Default Kontact lost all email

    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:
    Code:
    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.

    I'd be very grateful for any advice.

  2. #2
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    3,136

    Question Re: Kontact lost all email

    @gannicus:

    Please post the output of the following CLI commands:
    1. “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.
    2. “cat ~/.config/akonadi/akonadiserverrc”
    3. “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?

  3. #3
    Join Date
    Apr 2018
    Location
    New Mexico
    Posts
    137

    Default Re: Kontact lost all email

    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.

  4. #4
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    1,632

    Default Re: Kontact lost all email

    Quote Originally Posted by gannicus View Post
    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.
    The easiest way to import is to create a new pristine account and add the backup folder as another mailbox.
    AMD Athlon 4850e (2009), openSUSE 13.1, KDE 4, Intel i3-4130 (2014), i7-6700K (2016), i5-8250U (2018), AMD Ryzen 5 3400G (2020), openSUSE Tumbleweed, KDE Plasma 5

  5. #5
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    3,136

    Default Re: Kontact lost all email

    Quote Originally Posted by gannicus View Post
    All in all about 20,000 messages are gone.
    And you really didn't consider using the KMail Archiving tool?

    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.

  6. #6
    Join Date
    Apr 2018
    Location
    New Mexico
    Posts
    137

    Default Re: Kontact lost all email

    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.

  7. #7
    Join Date
    Apr 2018
    Location
    New Mexico
    Posts
    137

    Default Re: Kontact lost all email

    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.

  8. #8
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    3,136

    Cool Re: Kontact lost all email

    Quote Originally Posted by gannicus View Post
    Just in case I'm also archiving my mail,
    Don't forget to also backup the KMail archive files …

  9. #9
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    12,312
    Blog Entries
    2

    Default Re: Kontact lost all email

    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...

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  10. #10
    Join Date
    Apr 2018
    Location
    New Mexico
    Posts
    137

    Default Re: Kontact lost all email

    Don't forget to also backup the KMail archive files …
    Yes, I've done that too--a backup of a backup!

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •