From kdepim-users Mon Jan 21 21:35:31 2013 From: Andras Mantia Date: Mon, 21 Jan 2013 21:35:31 +0000 To: kdepim-users Subject: Re: [kdepim-users] kmail2 sync > akonadi db sync ??? Message-Id: <20130121213534.34DEA4EC4009 () mail ! kdab ! com> X-MARC-Message: https://marc.info/?l=kdepim-users&m=135880418119378 christophe wrote: > Ok, now that i have survived the kamil2 migration, despite some sleepless > nights, i need to sync kmail between many computers so that i have the > same kmail on every computer, just as i used to do with kmail 1.13. > > I use unison to sync mails. > this is the list of synchronized files : > > path = .kde4/share/config/kmailrc > path = .kde4/share/config/kmail.eventsrc > path = .kde4/share/config/kmail2rc > path = .kde4/share/config/kmail2.notifyrc > path = .kde4/share/config/emaildefaults > path = .kde4/share/config/emailidentities > path = .kde4/share/config/mailtransports > path = .kde4/share/config/akonadi_pop3_resource_1rc > path = .kde4/share/config/akonadi_pop3_resource_2rc > path = .local/share/local-mail > path = .spamassassin > > But if i sync only these files, when opening kmail on another computer, > the unread email list is not the same and in a directory with 1000 emails > with 12 unread emails on the first computer, i get ~500 unread emails on > the second computer.. I regularly sync between two computers and have no problem with the unread mail count. If you use IMAP, of course it is not a problem. If you use POP3 (as you do and I also use it), the question is: what is your local folder's type? I use maildir (not mixedmaildir), and at least with that this all works, because the read/unread status is in the mail's file name. Although it should work automatically, what you might try is to sync the local folder (Check Mail in local folders). > Not good. > Also, i see with htop that many akonadi-something processes are eating cpu > time and monopolising hard drive for a long time. Without knowing what processes, can't tell what is going on. > I have done some research on google. > Some say that one has to sync also the akonadi db files so that the unread > mails appear the same on every computer. > Is it right ? In general no. If you use custom tags and custom metadata for emails, you need to sync the akonadi (and also nepomuk) database. > Do i have to sync to sync everything in .local/share/akonadi ? > .kde4/share/config/akonadi* ? > .config/akonadi/* ? Usually, no, unless you *want* to sync also the database. > Any other files or directories ? For local mails, you need to sync only the local mails themselves. > But, syncing a db semms to be something really dangerous, because > synchronization mustn't be done during commit, only after commit, from > what i remember of my old computer science university lessons. > When shall one sync this akonadi db ? *If* you do database sync, you must be sure that akonadi is not running on either computers. Otherwise indeed it is dangerous. > Does akonadi have a function somewhere to sync its db between 2 computers > ? No such function atm. So what I do: - i've set up kmail on computer A - I've copied the KMail settings and the local mails (no akonadi stuff) to computer B - I've set up KMail on computer B (add the local mails as a maildir account) - from now on I've sync only the KMail config files and the local mails - before syncing I shut down KMail in both places, so it doesn't download POP3 mails - when using POP3 you must be sure that KMail is set to offline mode on the computer you will not use it, otherwise it might download (and delete) mails from the server and you end up with a mess. But this is not different from KMail1. Andras _______________________________________________ KDE PIM users mailing list Subscription management: https://mail.kde.org/mailman/listinfo/kdepim-users