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

Martin Steigerwald Martin at lichtvoll.de
Sat Jan 10 18:21:18 GMT 2015


Am Samstag, 10. Januar 2015, 17:31:54 schrieb Vylaern Vylaern:
> Hi,

Hi!

There is also a kdepim-users mailing list for user requests. OTOH I like that 
things like this get visible here.

> My question is how to Archive Folder in kmail when when database is
> corrupted?
> A i have such message when I am trying to archive one of the folders:
> Failed to archive the folder 'xxx'. Downloading a message in folder 'xxx'
> failed.
> 
> 
> At the moment, some of my emails are broken and has only headers (title,
> from, to) , but NO text inside message. When I run Akonadi Console and when
> I click on the same folder with messages as in kmail [Browser bookmark] I
> could see there is some missing ID [Model: Generic] - eg. I can see 11634,
> 11638, 11639 (so in this example there there are missing 35,36,37 - so
> those emails has only headers in kmail. Probably database is corrupted
> after migration from 4.9.5 into 4.10.0 couple of months ago.

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

In case of inconsistencies

akonadictl fsck

may help

(but make a backup of your setup first!)


But well you…
 
> So I decide to delete ALL configuration files and reinstall kontact/kmail
> again. The problem is - I cannot archive folders to do the fresh & virgin
> installation.

… want to start from scratch already. Ironically I just wrote here in another 
post that I think users of KDEPIM tend to do that. Likely because they don´t 
really understand whats going on as Akonadi can be quite complex.

I would still advise against starting from scratch and still advise first to 
try to diagnose the issue a little bit.

> I use now 4.11.1 version from Gentoo.
> 
> How to fix it?
> p.s. I cannot delete broken emails manually, as I have thousand of emails.
> Can Archive command just ignore broken files or it is possible to fix
> database?

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

If this is the case, you could start from scratch by just deleting the Akonadi 
configuration and database and let the fresh Akonadi pick up your old maildir. 
If it is at the above location, this is the current default and it would even 
pick it up automatically I think.

*But* you need to manually adjust all your filter destinations and any other 
places where you configured folders inside KMail as these will point to random 
folders.

I think partly this is documented in various places, but I am not sure whether 
it is available all in one place. And it may still be incomplete.

Again… make a backup of your current situation first. I mean it. :)

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/


More information about the kde-pim mailing list