[Kde-pim] How to Archive Folder in kmail when when database is corrupted?

Vylaern Vylaern vylaern at gmail.com
Wed Jan 14 13:40:43 GMT 2015


Right. I did the full /home backup and I am ready.


Here is very good example:
[1] In kmail I have sub-folder Tiscali with 12 messages – I can read only 2
of them, others have empty message box, but have an information (form, to,
date, etc) – have a look here:
http://postimg.org/image/g38et6ybz/

[2] Akonadi console shows only 2 messages, where are the other 10? Have a
look:
http://postimg.org/image/m5ib91oxx/

[3] The folder in .local/share/local-mail.../Tiscali/ contains 0 files,
only empty /cur /new /tmp directory. So where are the files? Have a look:

$ ls -R
.local/share/local-mail/.inbox.directory/.Pozostale.directory/.wazne.directory/Tiscali/
.local/share/local-mail/.inbox.directory/.Pozostale.directory/.wazne.directory/Tiscali/:
cur  new  tmp
.local/share/local-mail/.inbox.directory/.Pozostale.directory/.wazne.directory/Tiscali/cur:
.local/share/local-mail/.inbox.directory/.Pozostale.directory/.wazne.directory/Tiscali/new:
.local/share/local-mail/.inbox.directory/.Pozostale.directory/.wazne.directory/Tiscali/tmp:

[4] Fortunately, I could do „Archive Folder” for this one and in the
archive I have all the 12 messages, have a look:
http://postimg.org/image/91phthpu3/

and I CAN read ALL of them (!) full emails with body, but I can watch them
by eg. command “less”, but when I click on this files in kde folder, I have
the same effect like in point [1] em.– I can see only 2 of them, rest has
empty message boxes...

So as you can see there, is a big mess. Akonadictl fsck did not help. I am
ready for next steps.

On Wed, Jan 14, 2015 at 11:27 AM, Martin Steigerwald <Martin at lichtvoll.de>
wrote:

> Am Samstag, 10. Januar 2015, 19:07:20 schrieb Vylaern Vylaern:
> > > First: The database should not get corrupted due to a migration.
> > > Whether the database has any issue could be determined by looking at
> logs.
> > > Look for anything special in
> > > - ~/.xsession-errors
> > > - ~/.local/share/akonadi/db_data/mysql.err
> > > - ~/.local/share/akonadi/akonadi*.log
> >
> > I do not have anything from above, but I have:
> > .local/share/akonadi/akonadiserver.error
> > ItemRetrieverException : Unable to retrieve item from resource:
> > <html>Invalid item retrieved</html>
> > ItemRetrieverException : Unable to retrieve item from resource:
> > <html>Invalid item retrieved</html>
>
> I did not yet see these. I usually see this "Unable to retrieve item from
> resource" with "timeout" as explaination. In the status line of the KMail
> window KMail displays it.
>
> I think that for Akonadi Next such a error message will have to go.
>
> Cause it doesn´t explain whats wrong in a way that a user could act upon
> IMHO.
>
> > > In case of inconsistencies
> > > akonadictl fsck
> > > may help
> > > (but make a backup of your setup first!)
> >
> > How to make a backup?
>
> Safe:
>
> Backup your complete home directory.
>
>
> Maybe incomplete:
> - Backup ~/.local/share/local-mail (this is important, cause this is the
> primary storage of your mail).
> - Backup ~/.local/share/akonadi (in there is a file_db_data which mail also
> contain mail files and also in database it may cache small files, these
> may or
> may not yet saved into your local maildirs)
> - Backup ~/.config/akonadi
> - Backup ~/.kde, specifically ~/.kde/share/config/(kmail*|akonadi*) and
> likely
> others
> - Backup your calender and other locally stored resource data. See the
> config
> files in ~/.kde/share/config/akonadi* for where they locate their data. The
> calender uses a std.ics file in ~/.kde/share/apps/kabc I think. I use a
> calender directory since a long time and put it into
> ~/.local/share/calendar
>
>
> > > You didn´t write what type of account you use. If its POP3, mails
> should
> > > all
> > > be in a local maildir. Where is likely visible within:
> > > martin at merkaba:~/.kde/share/config> cat akonadi_maildir_resource_0rc
> > > [General]
> > > Path[$e]=$HOME/.local/share/local-mail
> > > TopLevelIsContainer=true
> >
> > I use POP3 and know its I am trying to solve it from a year ago:
> > https://forum.kde.org/viewtopic.php?f=215&t=117689
> > and admin form kde forum advised me to contact KDE PIM developer
>
> I see. My medium is mail tough, so.
>
> >
> > But have a look on this:
> >
> > You have some listings bellow. And you can see, there are some strange
> > things here - it means folders and files in file-system in some places
> are
> > different than in kmail.
> >
> > First example bellow - listing of (.local-mail). As you can see (listing
> > 1), there is .sent-mail.directory. I keep there (in kmail, in sent-mail
> > folder) my all old emails form last years, every year in one folder -
> 2006,
> > 2007, 2008... (listing 2). In listing 3 you can see whats inside 2006
> > folder, but all of subfolder of 2006 (cur, new, temp) are empty. Even du
> > command says they are empty (see listing 4), but in compare du command
> for
> > 2007 folder (see listing 5) says there is 53M of messages (instead of
> 4.3k
> > for 2006). In reality, in kmail in sent-mail/2006 folder there are 504
> > emails! Even akonadi console says so (should be 8.5M of messages):
> > http://img837.imageshack.us/img837/3773/livu.jpg
> > So where are those emails in real file system if 2006 folder is empty?
>
> Did you really make sure you looked into the right folder? Is the folder
> supposed to be empty?
>
> And note: Akonadi may still have kept some mails in file_db_data. It should
> eventually save them out for the local maildir locations, but up to know I
> do
> not know when it does so.
>
> >
> >  I have some other examples like that - eg. I have a folder (in kmail)
> with
> > 5 subfolder, and 100's other sub-sub-folder and over 1000's emails - but
> in
> > file system (.inbox.directory) the same folder is empty, there is nothing
> > appart empty (cur, new, temp) folders. Rest of system looks fine this
> just
> > happed for few folder and few thousands emails. So this is reason I
> thinks
> > there something wrong with data base.
> >
> > Listing 1
> > ~/.local/share/local-mail $ ls -la
> > total 48
> > drwxr-xr-x 12 me me 4096 Apr  7 09:07 .
> > drwxr-xr-x 18 me me 4096 Sep 30 22:03 ..
> > drwxr-xr-x  5 me me 4096 Apr  7 09:07 drafts
> > drwxr-xr-x  5 me me 4096 Feb 11  2013 import
> > drwxr-xr-x  4 me me 4096 Feb 12  2013 .import.directory
> > drwxr-xr-x  5 me me 4096 Feb 10  2013 inbox
> > drwxr-xr-x 25 me me 4096 Sep 27 23:04 .inbox.directory
> > drwxr-xr-x  5 me me 4096 Feb 10  2013 outbox
> > drwxr-xr-x  5 me me 4096 Feb 10  2013 sent-mail
> > drwxr-xr-x 10 me me 4096 Feb 12  2013 .sent-mail.directory
> > drwxr-xr-x  5 me me 4096 Apr  7 09:07 templates
> > drwxr-xr-x  5 me me 4096 Apr  7 09:07 wastebin
> >
> > Listing 2
> > $ ls -la
> > total 40
> > drwxr-xr-x 10 me me 4096 Feb 12  2013 .
> > drwxr-xr-x 12 me me 4096 Apr  7 09:07 ..
> > drwxr-xr-x  5 me me 4096 Feb 12  2013 2006
> >
> > drwxr-xr-x  5 me me 4096 Feb 12  2013 2007
> > drwxr-xr-x  5 me me 4096 Feb 12  2013 2008
> > drwxr-xr-x  5 me me 4096 Feb 12  2013 2009
> > drwxr-xr-x  5 me me 4096 Feb 12  2013 2010
> > drwxr-xr-x  5 me me 4096 Feb 12  2013 2011
> > drwxr-xr-x  5 me me 4096 Feb 12  2013 2012
> > drwxr-xr-x  5 me me 4096 Feb 11  2013 2013
> >
> > Listing 3
> > ~/.local/share/local-mail/.sent-mail.directory/2006 $ ls -la
> > total 20
> > drwxr-xr-x  5 me me 4096 Feb 12  2013 .
> > drwxr-xr-x 10 me me 4096 Feb 12  2013 ..
> > drwxr-xr-x  2 me me 4096 Feb 12  2013 cur
> > drwxr-xr-x  2 me me 4096 Feb 12  2013 new
> > drwxr-xr-x  2 me me 4096 Feb 12  2013 tmp
> >
> > Listing 4
> > ~/.local/share/local-mail/.sent-mail.directory/2006 $ du --si
> > 4.1k    ./cur
> > 4.1k    ./tmp
> > 4.1k    ./new
> > 17k     .
> >
> > Listing 5
> > ~/.local/share/local-mail/.sent-mail.directory/2007 $ du --si
> > 4.1k    ./cur
> > 4.1k    ./tmp
> > 53M     ./new
> > 53M     .
>
> Well, I suggest
>
> find ~/.local/share/local-mail | less
>
> and
>
> find ~/.local-mail.directory | less
>
> (the latter is empty there, just a few dirs).
>
> Ciao,
> --
> Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
> GPG: 03B0 0D6C 0040 0710 4AFA  B82F 991B EAAC A599 84C7
> _______________________________________________
> KDE PIM mailing list kde-pim at kde.org
> https://mail.kde.org/mailman/listinfo/kde-pim
> KDE PIM home page at http://pim.kde.org/
>
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list