New application in kdepim 4.9 (2/3): BackupMail

Another new application is BackupMail.
I developed during 4.9 cycle after seeing that there was no application to export/import KMail data in order to transfer the KMail settings from a computer from another, for instance.
Until now the method (in KMail1) to restore KMail was to create an archive and extract it in the new user home.

But with Akonadi it was not possible to do it, because we use numeric identifiers for folders, in the configuration files, rather than folder paths.

So all configs will break if we just copy the config file to another computer, where the numeric identifier will be different.

What is necessary to backup/restore in KMail application?
– The main configuration file, kmail2rc, of course.
– Maildir directory structure, mailbox files.
– identity settings.
– filters settings.
– mailtransport settings.
– all pop3/imap/maildir/mailbox resources.
– ldap server (kabldaprc).
– Akonadi database.
– and other configs as templatesconfigurationrc, akonadi_archivemail_agentrc.

So before saving data in zip file, we must to convert all configs settings which use an akonadi id to a real path.

When we restore them, we convert real path to an akonadi id. I developed a piece of code which tests if a real path can be found in akonadi database and returns its id.

During restoring we will not just overwrite config files we will merge information when it’s possible.
For example we do not overwrite akonadi resources but we  create new resources. So it is not conflict with existing setup.
Same as for identities and mail transports.

We will adapt filters arguments to use new identity or collection folder etc.

Future in 4.10:

I will continue to improve it, and merge some settings, for example ldap server for the moment it is not merged but I overwrite a file.
I will create an expert mode where we will able to specify which resources/settings we want to import.

And perhaps I will extend backup to other pim applications.

If you have some features to add it send me an email or report it to bugs.kde.org

  1. Now I see what you were talking about but it’s only for mails. What I meant was general backup system for PIM (mails, feeds, notes, calendars, todos, etc.) As more and more people are using IMAP, this is not enough. 🙂

  2. it’s for 4.10 🙂
    Sorry I was not time to implement all for 4.9
    It’s a big program to do and we must adapt config etc.

    But it’s in my todo for 4.10

  3. All I can say is excellent stuff Laurent, and thank you for all your work

  4. KDE SC 4.9 packages for openSUSE « My KDE week - pingback on 3 August 2012 at 19 h 02 min
  5. Does this tool can be called from CLI thus allowing to automate backup with scripts ? very important in enterprise space

  6. CLI ?
    It’s a graphical program.
    For the moment there is not method to call it in console.

  7. This is a great plan! I tried BackupMail again and again but never I got a satisfying result by far!

    I would like BackupMail very much to work but it only makes a mess. It puzzles me how it winded up in the KDE sc. Imagine a company has to rely on this tool. That would be a bad thing!
    But it’s a great idea!

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Trackbacks and Pingbacks: