• kmail migration akonadi database Mysql to Sqlite3

    From phil-deb1.merlin@laposte.net@21:1/5 to All on Tue Mar 4 15:30:01 2025

    Hey,

    Faced with slowdowns sometimes reaching almost a minute of very unpleasant 

    operation of Kmail which I perhaps wrongly attribute to Akonadi and its Mysql 

    database, I read in this list that Akonadi with a Sqlite3 database is much faster. I 

    would like to migrate my Mysql database to Sqlite3. the planned procedure not 

    working see Debian Bug 1098891# not wanting to abandon Kontact I have been an 

    old user since 2003, 22 years. I thought of a solution, I would like you to tell me what 

    you think. Remove pim, kontact, kmail, akonadi.

    Delete the akonadi Mysql database.

    Reinstall Kontact, Kmail, Pim, akonadi.

    At this time configure akonadi with Sqlite3 as a database.

    In Kontact import messages that were stored in a directory.

    It's a shame that I have to do this gymnastics because the planned procedure is 

    blocked from the start and in my opinion the specialists that you are will have no 

    difficulty in correcting bug 1098891#.

    Philippe Merlin


    <div style="font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#00000">‌
    <div dir="ltr" style="color: rgb(35, 38, 41); font-family: &quot;Noto Sans&quot;; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start;
    text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color:
    initial;">Hey,</div>

    <div dir="ltr" style="color: rgb(35, 38, 41); font-family: &quot;Noto Sans&quot;; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start;
    text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color:
    initial;">Faced with slowdowns sometimes reaching almost a minute of very unpleasant&nbsp;</div>

    <div dir="ltr" style="color: rgb(35, 38, 41); font-family: &quot;Noto Sans&quot;; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start;
    text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color:
    initial;">operation of Kmail which I perhaps wrongly attribute to Akonadi and its Mysql&nbsp;</div>

    <div dir="ltr" style="color: rgb(35, 38, 41); font-family: &quot;Noto Sans&quot;; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start;
    text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color:
    initial;">database, I read in this list that Akonadi with a Sqlite3 database is much faster. I&nbsp;</div>

    <div dir="ltr" style="color: rgb(35, 38, 41); font-family: &quot;Noto Sans&quot;; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start;
    text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color:
    initial;">would like to migrate my Mysql database to Sqlite3. the planned procedure not&nbsp;</div>

    <div dir="ltr" style="color: rgb(35, 38, 41); font-family: &quot;Noto Sans&quot;; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start;
    text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color:
    initial;">working see Debian Bug 1098891# not wanting to abandon Kontact I have been an&nbsp;</div>

    <div dir="ltr" style="color: rgb(35, 38, 41); font-family: &quot;Noto Sans&quot;; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start;
    text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color:
    initial;">old user since 2003, 22 years. I thought of a solution, I would like you to tell me what&nbsp;</div>

    <div dir="ltr" style="color: rgb(35, 38, 41); font-family: &quot;Noto Sans&quot;; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start;
    text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color:
    initial;">you think. Remove pim, kontact, kmail, akonadi.</div>

    <div dir="ltr" style="color: rgb(35, 38, 41); font-family: &quot;Noto Sans&quot;; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start;
    text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color:
    initial;">Delete the akonadi Mysql database.</div>

    <div dir="ltr" style="color: rgb(35, 38, 41); font-family: &quot;Noto Sans&quot;; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start;
    text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color:
    initial;">Reinstall Kontact, Kmail, Pim, akonadi.</div>

    <div dir="ltr" style="color: rgb(35, 38, 41); font-family: &quot;Noto Sans&quot;; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start;
    text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color:
    initial;">At this time configure akonadi with Sqlite3 as a database.</div>

    <div dir="ltr" style="color: rgb(35, 38, 41); font-family: &quot;Noto Sans&quot;; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start;
    text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color:
    initial;">In Kontact import messages that were stored in a directory.</div>

    <div dir="ltr" style="color: rgb(35, 38, 41); font-family: &quot;Noto Sans&quot;; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start;
    text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color:
    initial;">It's a shame that I have to do this gymnastics because the planned procedure is&nbsp;</div>

    <div dir="ltr" style="color: rgb(35, 38, 41); font-family: &quot;Noto Sans&quot;; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start;
    text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color:
    initial;">blocked from the start and in my opinion the specialists that you are will have no&nbsp;</div>

    <div dir="ltr" style="color: rgb(35, 38, 41); font-family: &quot;Noto Sans&quot;; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start;
    text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color:
    initial;">difficulty in correcting bug 1098891#.</div>

    <div dir="ltr" style="color: rgb(35, 38, 41); font-family: &quot;Noto Sans&quot;; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start;
    text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color:
    initial;">Philippe Merlin</div>
    </div>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Martin Steigerwald@21:1/5 to steps I did. I also on Tue Mar 4 18:00:02 2025
    Accidentally hit shortcut to send mail before it was ready.

    Here is the full version.


    Hi Philippe, hi.

    Please do not use HTML. Additional work for plain text formatting when I
    reply to you.

    phil-deb1.merlin@laposte.net - 04.03.25, 15:27:11 Mitteleuropäische Normalzeit:
    Faced with slowdowns sometimes reaching almost a minute of very
    unpleasant operation of Kmail which I perhaps wrongly attribute to
    Akonadi and its Mysql

    Do you use POP3 and local maildir storage?

    I had these as well. With SQLite3 it is much better, much faster. But occasionally I still have such a strange pause.

    database, I read in this list that Akonadi with a Sqlite3 database is
    much faster. I would like to migrate my Mysql database to Sqlite3. the planned procedure not working see Debian Bug 1098891# not wanting to
    abandon Kontact I have been an old user since 2003, 22 years. I thought

    That is even longer than I am using it.

    of a solution, I would like you to tell me what you think.
    Remove pim, kontact, kmail, akonadi.

    That is the brute force approach.

    Delete the akonadi Mysql database.

    Reinstall Kontact, Kmail, Pim, akonadi.

    At this time configure akonadi with Sqlite3 as a database.

    In Kontact import messages that were stored in a directory.

    I'd not really import messages. From what I read from user users this
    process is error prone and slow. But of course your mileage may vary. For
    a very long time I did not try to import a lot of mails at once. Sometimes
    I imported a small mbox file with a few mails. That worked. But not a
    complete structure.

    What may work is using the PIM data exporter. You could try it.

    Whatever approach you choose:

    *Make* *A* *Backup* *First*! Of your *complete* home directory, while
    Akonadi is not running. Better be safe than sorry.

    Then you have a second attempt if need be.


    Likely all in all (way) faster, but it will require some knowledge on how Akonadi works is the following approach – *read all of it*, before any attempt to do it in this way:

    It is enough to point a maildir resource to the location where the old
    mails are… or… move them into the new location. It will pick up mails from there.

    However in case you just remove the Akonadi MySQL database, the maildir resource configuration is not lost. So it will pick up your old mails automatically anyway.

    But wherever you reference mail folders in KMail configuration, including filters these references are very likely to be wrong. They are by database
    ID and that will change.

    I already described that I migrated without the migrator. I basically just deleted the old database and switched configuration in ~/.config/akonadi/akonadiserverrc to SQLite:

    % cat .config/akonadi/akonadiserverrc
    […]

    [%General]
    Driver=QSQLITE

    I think that will be enough. It will automatically choose the location of
    the database file on first start.

    *Before* that however I exported all my local mail filters to a file.

    Then I deleted those local mail filters from KMail configuration.

    I kept all other configuration.

    I stopped akonadi: "akonadictl stop".

    I removed old database.

    I did not remove and reinstall KDEPIM. It is not necessary.

    I changed to SQLite3.

    I did "akonadictl start" in a command line to see whether database
    creation works and so on.

    I started KMail.

    I reimported all local mail filters. That way KMail automatically picked
    up the right folders for them by name (instead of database ID).

    I reviewed every reference to a folder in KMail configuration and changed wrongly configured folders everywhere.

    Like within my identities, POP3, IMAP and SMTP configuration.

    That worked for me.

    I do not really have the time to give support. But these were the basic
    steps I did. I also wrote about it before already.

    It's a shame that I have to do this gymnastics because the planned
    procedure is blocked from the start and in my opinion the specialists
    that you are will have no difficulty in correcting bug 1098891#.

    Sorry, that is not how it works.

    Debian Qt/KDE developers package KDEPIM. Many of them are not upstream developers. If you read my other mails carefully, you know that I already suggested to check whether there is an upstream issue and if not report
    one.

    Again and again and again: Most of Debian/Ubuntu and upstream developers,
    if not all of them are doing all or most of this work in their free time.
    For me that means: I am not in a position to place demands on them. I am
    not the one to decide on what they should do in their free time.

    The bug may be easy or not so easy to fix. It may be difficult to fix for developers in case it would not happen in their system. Who knows?

    But everyone could help. By checking for upstream bug report, doing one if there is none and having installed most recent versions in Debian – they
    are up to date at the moment –, and providing necessary details, including ideally a GDB backtrace of the crash.

    So if you like to see this fixed, you can see how you can invest some of *your* time to help someone else to help you.

    As I migrated already and there is quite some other places where I
    contribute at the moment and I need to focus on some topics at a time not
    to overwhelm myself, I am not willing to invest more time into this topic
    at the moment. I invested some of my time to get it sorted by myself back then.

    Hope my above explanations may either help you to do the migration with
    KDEPIM data exporter/importer or in an not so official, but hopefully
    working way, and/or find a way for yourself to help upstream to help you.

    Best,
    --
    Martin - please no carbon copy to me

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Martin Steigerwald@21:1/5 to steps I did. I also on Tue Mar 4 17:40:01 2025
    Hi Philippe, hi.

    Please do not use HTML. Additionally work for plain text formatting when I reply to you.

    phil-deb1.merlin@laposte.net - 04.03.25, 15:27:11 Mitteleuropäische Normalzeit:
    Faced with slowdowns sometimes reaching almost a minute of very
    unpleasant operation of Kmail which I perhaps wrongly attribute to
    Akonadi and its Mysql

    Do you use POP3 and local maildir storage?

    I had these as well. With SQLite3 it is much better, much faster. But occasionally I still have such a strange pause.

    database, I read in this list that Akonadi with a Sqlite3 database is
    much faster. I would like to migrate my Mysql database to Sqlite3. the planned procedure not working see Debian Bug 1098891# not wanting to
    abandon Kontact I have been an old user since 2003, 22 years. I thought

    That is even longer than me.

    of a solution, I would like you to tell me what you think.
    Remove pim, kontact, kmail, akonadi.

    That is the brute force approach.

    Delete the akonadi Mysql database.

    Reinstall Kontact, Kmail, Pim, akonadi.

    At this time configure akonadi with Sqlite3 as a database.

    In Kontact import messages that were stored in a directory.

    I'd not really import messages. It is enough to point a maildir resource
    to the location where the old mails are… or… move them into the new location.

    However in case you just remove the Akonadi MySQL database, the maildir resource configuration is not lost. So it will pick up your old mails automatically anyway.

    However… wherever you reference mail folders in KMail configuration, including filters these references are very likely to be wrong. They are
    by database ID and that will change.

    I already described that I migrated without the migrator. I basically just deleted the old database and switched configuration in ~/.config/ akonadiserverrc to SQLite:

    % cat .config/akonadi/akonadiserverrc
    […]

    [%General]
    Driver=QSQLITE

    I think that will be enough. It will automatically choose the location of
    the database file on first start.

    *Before* that however I exported all my local mail filters to a file.

    Then I deleted those.

    I kept all other configuration.

    I stopped akonadi: "akonadictl stop".

    I removed old database.

    I did not remove and reinstall KDEPIM. It is not necessary.

    I changed to SQLite3.

    I did "akonadictl start" in a command line to see whether database
    creation works and so on.

    I started KMail.

    I reimported all local mail filters.

    I reviewed every reference to a folder in KMail configuration.

    Like within my identities, POP3, IMAP and SMTP configuration.

    That worked for me.

    I do not really have the time to give support. But these were the basic
    steps I did. I also wrote about it before already.

    It's a shame that I have to do this gymnastics because the planned
    procedure is blocked from the start and in my opinion the specialists
    that you are will have no difficulty in correcting bug 1098891#.

    Sorry, that is not how it works.

    Debian Qt/KDE developers package KDEPIM. Many of them are not upstream developers. If you read my other mails carefully, you know that I already suggested to check whether there is an upstream issue and if not report
    one.

    Again and again and again: Most of them, if not all of them are doing all
    of this work in their free time. For me that means: I am not in a position
    to place demands on them.


    But I could help. By checking for upstream bug report, doing one if there
    is none and I have installed most recent versions in Debian – they are up
    to date at the moment –, and providing necessary details, including
    ideally a GDB backtrace of the crash.


    Best,
    --
    Martin

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Martin Steigerwald@21:1/5 to All on Mon Mar 10 13:00:01 2025
    Hi Philippe.

    MERLIN Philippe - 10.03.25, 10:51:05 Mitteleuropäische Normalzeit:
    Your instructions for migrating from mysql to sqlite3 are very clear, I followed them to the letter and the migration went well, everything
    works well, small problems quickly resolved, however, when I write a
    message I get a warning saying that the folder for sent messages is not defined, I don't know how to correct the kmail configuration so that it
    no longer appears, apart from that everything works, receiving and
    sending messages. I tried to do manually what a migration of the mysql database to sqlite3, I quickly gave up because the schemas of the two databases are quite different.

    I am glad it worked well for you.

    Folder for sent mail can be set per Identify. Look in "Advanced" tab.

    Already sent mails are likely stored in a standard folder for sent mails.

    Best,
    --
    Martin

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)