Email Backup in KDE 4.11 (Opensuse 13.1) with Akonadi

I try to find out how to do Email Backup in Akonadi (Kmail)

I’m using KDE 4.11 (Opensuse 13.1 updated) , kmail is default setup . But I can’t find any information where the actual Email Database is stored.

So my questions are:

  1. Where does Akonadi store Emails by default?
  2. How to backup the Email ?
  3. How to restore from backup with a new user?
  4. Is this somewhere documented ? (as I could not find it)

Thx in advance for help

That depends.
For IMAP the mail is stored on the mail server. No need to backup anything there.

Your local mail resources (“KMail Folders” or “Local Folders”) should use ~/local/share/local-mail by default, but this can be configured.
Just enter KMail’s settings->Accounts->Receiving. Select each of your mail resources and click on Edit. You should see the path where it stores mails then.

The resource configuration is in ~/.kde4/share/config/, like any KDE configuration.

  1. How to backup the Email ?

Those are just text files (one file per mail, or one file for all mails if you use mbox). Back it up like any other files.

  1. How to restore from backup with a new user?

Copy back the mails and the configuration (or configure the resources fresh). And it should just work. Maybe you would have to synchronize the folders manually though or adapt the paths in the resources’ configuration if they include the username.

Then there’s also the pimsettingsexporter (“Tools” menu, “Export KMail settings”; or just run it in Konsole) to backup/restore all of Akonadi’s configuration. This should include everything KDEPIM-related.
I never used this (as it is quite new), but this seems to be the easiest way to migrate your KDEPIM stuff to a new installation.

  1. Is this somewhere documented ? (as I could not find it)

In the handbook: http://docs.kde.org/stable/en/kdepim/kmail/backups.html
A blog that documents where Akonadi stores its data:
http://blogs.kde.org/node/4503