akonadi/KDE PIM backup/restore

Martin Steigerwald martin at lichtvoll.de
Fri Oct 14 22:06:45 BST 2016


Am Freitag, 14. Oktober 2016, 08:36:56 CEST schrieb Daniel Vrátil:
> On Monday, October 10, 2016 9:53:46 AM CEST René J.V. Bertin wrote:
[…]
> > Does anyone have a good overview what of the various *rc and other files
> > under ~/.config, ~/.local/share, ~/.kde/share/config, ~/.kde/share/apps
> > and
> > possible ~/.cache one should backup if one wants to be able to restore a
> > working Kontact/KMail set-up - accounts, folder settings, filters, UI
> > customisation etc?
> > 
> > What files hold crucial information, and which ones derived/downloaded
> > data
> > that will be regenerated anew after a restore?
> 
> I would argue that except for the search index, you want to preserve
> everything (including the massive file_db_data), see below.
> 
> > If this has changed from KDEPIM4 -> KDEPIM5, what are those changes?
> 
> With the exceptions of things in .config/akonadi/ and .local/share/akonadi/
> (which has always been there), all the files mentioned below where moved
> from .kde/share/config/ to .config/
> 
> > I'm mostly interested in KMail (handled via Kontact); I think that backups
> > of its configuration will probably contain most if not all of the crucial
> > information for the other PIM components as well?
> > 
> > Application: migration to another account or host, and where relevant,
> > being able to back out of an intemptestuous/premature version update.
> > 
> > It'd be very reassuring if someone from the dev team could corroborate the
> > information if it doesn't come from a PIM developer already.
> > 
> > The backup command I've compiled myself from educated guesses looks like
> > this (executed in $HOME):
> > 
> > tar -cjf "${ARCHIVE}"
> > .kde/share/config/{foldermailarchiverc,kaddressbook,email,mail,knode,konta
> > c
> > t,kmail,akonadi,kresource}* \
> > .kde/share/apps/{kaddressbook,kabc,knode,kmail,kontact}* \
> > 
> > 	.local/share/akonadi* \
> > 	.config/akonadi
> 
> This seems to be for KDE4? In KF5 ~/.kde is not user anymore at all, but the
> change is simple, just use ~/.config instead in your script. Otherwise it
> looks like you actually got them all. The only exception are
> .kde/share/apps, see below again.
> 
> In KF5 you can omit kresource*, that's long dead.
> 
> > but I've never actually tested whether this does the trick (and doesn't
> > include a lot of useless ballast).
> 
> the following should be a complete set of things to archive for Akonadi +
> KMail.
> 
> ~/.local/share/akonadi/
> Akonadi DB + data: you can omit search_db (Akonadi Search Index, see below),
> since it will be reindexed. You could omit file_db_data too, but then you
> will suffer the horrible penalty of Akonadi redownloading all the data
> (especially if you use offline IMAP) and the search won't work properly
> until all is downloaded (if you did not backup search_db too).
> 
> ~/.local/share/baloo/{calendar,contact,collections,email,emailContacts,notes
> }/ Akonadi Search Index: historically it is in ~/.local/share/baloo, but if
> you wiped and recrated your index recently, then ~/.local/share/baloo will
> be empty and the indexes will be stored in ~/.local/share/akonadi/search_db
> (as mentioned above)
> 
> ~/.local/share/kmail2/
> KMail2 data
> 
> ~/.local/share/messageviewer/
> Custom header themes, if you had any
> 
> ~/.config/akonadi/
> Akonadi agent configuration. You want that.
> 
> ~/.config/akonadi_*rc
> Agents' own configuration. You want that too.
> 
> ~/.config/baloorc
> For historical reasons baloorc contains configuration of the Akonadi Search
> Index. Current git master has migrated the configuration to
> ~/.config/akonadi_indexing_agentrc.
> 
> ~/.config/emailidentities
> KMail email identities
> 
> ~/.config/foldermailarchive
> If you use Archiving
> 
> ~/.config/kmail*rc
> KMail configuration
> 
> ~/.config/mailtransport
> Sending account configuration (SMTP)
> 
> ~/.config/specialmailcollectionsrc
> Magic.
> 
> ~/.kde/share/apps/kabc/
> Historically, contains local contacts.
> 
> ~/.local/share/contacts
> New location for local contacts.
> 
> ~/.kde/share/apps/korganizer/
> Histroically, contains local calendars
> 
> ~/.local/share/local-mail (sometimes also ~/.local/share/.local-mail)
> Content of "Local Folders"

Here is what pimsettingsexporter puts into the archive, taken from the window 
that shows the archive structure:

2015-11-20:
-----------

2015-1-29: New VERSION for archive => VERSION_2 => knote-akonadi

Zip structure is :
Root
|-----information
|       |---------VERSION_<number>
|
|-----transports
|       |---------mailtransports
|
|-----identities
|       |---------emailidentities
|       |---------uoid-identity
|                   |--------- vcard file
|
|-----resources
|       |---------<resource name>
|
|-----mails
|       |---------<resource name>
|                   |---------<akonadi agent config file>
|                   |---------<resource config file>
|                   |---------<archive resource>
|-----calendar
|       |---------<resource name>
|                   |---------<akonadi agent config file>
|                   |---------<resource config file>
|                   |---------<archive resource>
|------addressbook
|       |---------<resource name>
|                   |---------<akonadi agent config file>
|                   |---------<resource config file>
|                   |---------<archive resource>
|
|------alarm
|       |---------<resource name>
|                   |---------<akonadi agent config file>
|                   |---------<resource config file>
|                   |---------<archive resource>
|
|------jot
|       |---------<resource name>
|                   |---------<akonadi agent config file>
|                   |---------<resource config file>
|                   |---------<archive resource>
|
|-----configs
|       |---------filters
|       |---------kmail2rc
|       |---------sievetemplaterc
|       |---------customtemplatesrc
|       |---------akonadi_archivemail_agentrc
|       |---------kabldaprc
|       |---------templatesconfigurationrc
|       |---------kalarmrc
|       |---------korganizerrc
|       |---------calendar_printing.rc 
|       |---------korgacrc
|       |---------kaddressbookrc
|       |---------akonadi_mailfilter_agent.notifyrc
|       |---------akonadi_sendlater_agent.notifyrc
|       |---------akonadi_archivemail_agent.notifyrc
|       |---------kmail2.notifyrc
|       |---------akonadi_maildispatcher_agent.notifyrc
|       |---------akonadi_newmailnotifier_agent.notifyrc
|       |---------akonadi_followupreminder_agent.notifyrc
|       |---------storageservicemanager.notifyrc
|       |---------messagevieweradblockrc
|       |---------knotesrc
|       |---------akregatorrc
|       |---------blogilorc
|       |---------messageviewer.notifyrc
|       |---------kontactrc
|       |---------kontact_summaryrc
|       |---------globalnotesettings
|       |---------akonadi_mailfilter_agent.notifyrc
|       |---------storageservicerc
|       |---------kpimbalooblacklist
|       |---------kleopatrarc
|       |---------sieveeditorrc
|       |---------kaddressbookui.rc
|       |---------blogiloui.rc
|       |---------pageviewer.rc
|       |---------akregator_part.rc
|       |---------articleviewer.rc
|       |---------akregator_shell.rc
|       |---------kalarmui.rc
|       |---------korganizerui.rc
|       |---------korganizer_part.rc
|       |---------sieveeditorui.rc
|       |---------storageservicemanagerui.rc
|       |---------kmreadermainwin.rc
|       |---------kmcomposerui.rc
|       |---------kmmainwin.rc
|       |---------kmail_part.rc
|       |---------kontactui.rc
|       |---------knotesappui.rc
|       |---------knotesui.rc
|       |---------knotes_part.rc
|       |---------akonadi_notes_agent.notifyrc
|       |---------akregator.notifyrc
|       |---------kontactsummary_part.rc
|       |---------headerthemeeditorui.rc
|       |---------contactprintthemeeditorui.rc    
|       |---------contactthemeeditorui.rc
|       |---------kwatchgnupgrc
|       |---------kwatchgnupgui.rc
|       |---------akonadiconsoleui.rc
|       |---------foldermailarchiverc
|
|-----akonadi
|       |---------<archive akonadi>
|
|-----data
|       |---------autocorrect/<autocorrection xml file>
|       |---------korganizer/freebusyurls
|       |---------korganizer/templates/*
|       |---------messageviewer/themes/*
|       |---------kmail2/adblockrules_local
|       |---------knotes/print/*
|       |---------akregator/*
|       |---------blogilo/blogilo.db
|       |---------kaddressbook/viewertemplates/
|       |---------kaddressbook/csv-templates/
|       |---------kaddressbook/printing/
|       |---------korganizer/designer/
|       |---------gravatar/*.png
|       |---------knotes/print/theme/

I am blown away at how many files and directories Akonadi + KDEPIM use.

Ciao,
-- 
Martin



More information about the kdepim-users mailing list