Akonadi and AddressBook: Difference between revisions

From KDE Wiki Sandbox
(improved readability; minor updates)
 
(6 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<languages />
<languages />
<translate>
<translate>
<!--T:31-->
{{Note|This article also applies to other applications that are using [[Special:myLanguage/Akonadi|Akonadi]], for example, KMail and KOrganizer.}}


<!--T:1-->
<!--T:1-->
Line 8: Line 11:


<!--T:3-->
<!--T:3-->
By ''real data'' we mean the data, like the contacts or events. These data are stored either on a groupware server or in local files. Where exactly depends on the resource you are using. E.g. the ''Personal Contacts'' resource stores its data under $HOME/.local/share/contacts while the ''VCard File'' resource (which is not recommended to use anyway [[Image:Face-smile.png|16px]]) stores its data under $HOME/.kde/share/apps/kabc/std.vcf.
;Real data
:By ''real data'' we mean the data, like the contacts or events. These data are stored either on a groupware server or in local files. Where exactly depends on the resource you are using. E.g. the ''Personal Contacts'' resource stores its data under $HOME/.local/share/contacts while the ''VCard File'' resource (which is not recommended to use anyway [[Image:Face-smile.png|10px]]) stores its data by default under $HOME/.kde/share/apps/kabc/std.vcf.


<!--T:4-->
<!--T:4-->
The ''cached data'' are copies of the real data that are kept in the database for faster access and offline caching. The database also keeps the ''meta data'' which are management data needed by '''Akonadi''' to work correctly.
;Cached data
:The ''cached data'' are copies of the real data that are kept in the database for faster access and offline caching. The database also keeps the ''meta data'' which are management data needed by '''Akonadi''' to work correctly.


<!--T:5-->
<!--T:5-->
The ''configuration data'' are the data that configure the '''Akonadi''' server and the individual resources. The configuration data for the server can be found under $HOME/.config/akonadi, the configuration for the resources are mostly stored under $HOME/.kde/share/config/akonadi_xyz_resourcerc# ('''''xyz''''' is name of resource and '''''#''''' its instance number).
;Configuration data
:The ''configuration data'' are the data that configure the '''Akonadi''' server and the individual resources. The general configuration data for the server can be found under $HOME/.config/akonadi. The configuration data for each indvidual resources are stored under $HOME/.kde/share/config/akonadi_xyz_resourcerc# ('''''xyz''''' is name of resource and '''''#''''' its instance number) or possibly $HOME/.config/akonadi.


<!--T:22-->
<!--T:22-->
The '''Akonadi''' server configuration is a couple of files in ''$HOME/.config/akonadi'' - this can be changed through environment variables, $XDG_DATA_HOME and $XDG_CONFIG_HOME, defaulting to ''$HOME/.local/share'' and ''$HOME/.config'' respectively if not set.  It contains which data sources and helper programs are active and will be started and watched (so they can be restarted on crashes) by one of '''Akonadi's''' server processes '''(akonadi_control)'''.  KDE's local base directory can be changed using $KDEHOME environment variable, defaulting to $HOME/.kde when not set (or to $HOME/.kde4 if the distributor changed the default by patching the code).
:The '''Akonadi''' server configuration is a couple of files in ''$HOME/.config/akonadi'' - this can be changed through environment variables, $XDG_DATA_HOME and $XDG_CONFIG_HOME, defaulting to ''$HOME/.local/share'' and ''$HOME/.config'' respectively if not set.  It contains which data sources and helper programs are active and will be started and watched (so they can be restarted on crashes) by one of '''Akonadi's''' server processes '''(akonadi_control)'''.  KDE's local base directory can be changed using $KDEHOME environment variable, defaulting to $HOME/.kde when not set (or to $HOME/.kde4 if the distributor changed the default by patching the code).
See {{Input|1=kde4-config --path data}}
:These paths can be seen using  {{Input|1=kde4-config --path data}} and {{Input|1=kde4-config --path config}}


<!--T:23-->
<!--T:23-->
Each data source handler (called resources) or helper program (called agents)  
:Each data source handler (called resources) or helper program (called agents) can have its own configuration although some agents or resources don't require configuration.  The general rule is that for every entry in $HOME/.config/akonadi/agentsrc there is a corresponding configuration file in $HOME/.kde/share/config.  For example, if the [Instances] section in agentrc contains an entry for akonadi_ical_resource_2, there is also a config file called akonadi_ical_resource_2rc in the KDE config directory.
can have its own configuration although some agents or resources don't require configuration.  The general rule is that for every entry in $HOME/.config/akonadi/agentsrc there is a corresponding configuration file in $HOME/.kde/share/config.  For example, if the [Instances] section in agentrc contains an entry for akonadi_ical_resource_2, there is also a config file called akonadi_ical_resource_2rc in the KDE config directory.


<!--T:24-->
<!--T:24-->
Depending on the type of data, such config files for resources will have  
:Depending on the type of data, such config files for resources will have filenames or directory names of where the data is stored.  Common locations are KDE's legacy default files, e.g. $HOME/.kde/share/apps/korganizer/std.ics.  New default locations are files and directories in $HOME/.local/share, e.g. $HOME/.local/share/contacts.
filenames or directory names of where the data is stored.  Common locations are KDE's legacy default files, e.g. $HOME/.kde/share/apps/korganizer/std.ics.  New default locations are files and directories in $HOME/.local/share,  
e.g. $HOME/.local/share/contacts.


<!--T:25-->
<!--T:25-->
For now (as in actually released versions) the database is merely used for  
:For now (as in actually released versions) the database is merely used for caching and keeping structural information (e.g. which addressbook a contact belongs to). This will change when Akonadi is being used for email, since state information like read/unread is also stored there (unless the backend is also capable of doing this, e.g. IMAP).
caching and keeping structural information (e.g. which addressbook a contact  
belongs to). This will change when Akonadi is being used for email, since state information like read/unread is also stored there (unless the backend is also capable of doing this, e.g. IMAP).


==Organising Backups== <!--T:6-->
==Organising Backups== <!--T:6-->
Line 41: Line 42:
<!--T:8-->
<!--T:8-->
The '''Akonadi''' tray icon offers you a backup and restore function.  That backs up the "cache data" which might not include all of your data!  It can be helpful if you want to clone a system 1:1, then you can copy the cached data together with the real data and the configuration, so you don't have to load the data again from the sources (e.g. groupware server).
The '''Akonadi''' tray icon offers you a backup and restore function.  That backs up the "cache data" which might not include all of your data!  It can be helpful if you want to clone a system 1:1, then you can copy the cached data together with the real data and the configuration, so you don't have to load the data again from the sources (e.g. groupware server).
</translate><span id="Examining your Resources"></span><translate>


==Examining your Resources== <!--T:9-->
==Examining your Resources== <!--T:9-->


<!--T:10-->
<!--T:10-->
'''KRunner''' offers you '''Akonadi Resource Configuration''', or you can access this through the <menuchoice>Akonadi tray icon -> Configure</menuchoice>.  From 4.6 you will find it in <menuchoice>System Settings -> Personal Information</menuchoice>  You may find several resources set up.  You may find one labelled
'''KRunner''' offers you '''Akonadi Resource Configuration''', or you can access this through the <menuchoice>Akonadi tray icon -> Configure</menuchoice>.  From KDE 4.6 you will find it in <menuchoice>System Settings -> Personal Information</menuchoice>  You may find several resources set up.  You may find one labelled


<!--T:11-->
<!--T:11-->
Line 79: Line 82:


<!--T:29-->
<!--T:29-->
''Problem'':  You update to 4.6 and your addressbook is suddenly completely blank
''Problem'':  Your update to 4.6 and your addressbook is suddenly completely blank


<!--T:30-->
<!--T:30-->
Line 87: Line 90:


<!--T:27-->
<!--T:27-->
:[[Special:myLanguage/Akonadi|Akonadi]]<br />
*[[Special:myLanguage/Akonadi|Akonadi]]<br />
:[[Special:myLanguage/Akonadi_4.4/Troubleshooting|Akonadi Troubleshooting]]<br />
*[[Special:myLanguage/KAddressBook/index|KAddressBook]]
:[[Special:myLanguage/KAddressBook/index|KAddressBook]]


<!--T:20-->
<!--T:20-->
[[Category:System]]
[[Category:System]]
</translate>
</translate>

Latest revision as of 14:27, 12 March 2021

Note
This article also applies to other applications that are using Akonadi, for example, KMail and KOrganizer.


This information was provided by Tobias Koenig, KDE-PIM developer.

Some Definitions

Real data
By real data we mean the data, like the contacts or events. These data are stored either on a groupware server or in local files. Where exactly depends on the resource you are using. E.g. the Personal Contacts resource stores its data under $HOME/.local/share/contacts while the VCard File resource (which is not recommended to use anyway ) stores its data by default under $HOME/.kde/share/apps/kabc/std.vcf.
Cached data
The cached data are copies of the real data that are kept in the database for faster access and offline caching. The database also keeps the meta data which are management data needed by Akonadi to work correctly.
Configuration data
The configuration data are the data that configure the Akonadi server and the individual resources. The general configuration data for the server can be found under $HOME/.config/akonadi. The configuration data for each indvidual resources are stored under $HOME/.kde/share/config/akonadi_xyz_resourcerc# (xyz is name of resource and # its instance number) or possibly $HOME/.config/akonadi.
The Akonadi server configuration is a couple of files in $HOME/.config/akonadi - this can be changed through environment variables, $XDG_DATA_HOME and $XDG_CONFIG_HOME, defaulting to $HOME/.local/share and $HOME/.config respectively if not set. It contains which data sources and helper programs are active and will be started and watched (so they can be restarted on crashes) by one of Akonadi's server processes (akonadi_control). KDE's local base directory can be changed using $KDEHOME environment variable, defaulting to $HOME/.kde when not set (or to $HOME/.kde4 if the distributor changed the default by patching the code).
These paths can be seen using
kde4-config --path data
and
kde4-config --path config
Each data source handler (called resources) or helper program (called agents) can have its own configuration although some agents or resources don't require configuration. The general rule is that for every entry in $HOME/.config/akonadi/agentsrc there is a corresponding configuration file in $HOME/.kde/share/config. For example, if the [Instances] section in agentrc contains an entry for akonadi_ical_resource_2, there is also a config file called akonadi_ical_resource_2rc in the KDE config directory.
Depending on the type of data, such config files for resources will have filenames or directory names of where the data is stored. Common locations are KDE's legacy default files, e.g. $HOME/.kde/share/apps/korganizer/std.ics. New default locations are files and directories in $HOME/.local/share, e.g. $HOME/.local/share/contacts.
For now (as in actually released versions) the database is merely used for caching and keeping structural information (e.g. which addressbook a contact belongs to). This will change when Akonadi is being used for email, since state information like read/unread is also stored there (unless the backend is also capable of doing this, e.g. IMAP).

Organising Backups

So now we need to decide what to back up. If you want to backup the "real data", then it depends on the resources you have configured... if you use a groupware server, then the backup should be done there. For contacts, the files under $HOME/.local/share/contacts will normally be what you need.

The Akonadi tray icon offers you a backup and restore function. That backs up the "cache data" which might not include all of your data! It can be helpful if you want to clone a system 1:1, then you can copy the cached data together with the real data and the configuration, so you don't have to load the data again from the sources (e.g. groupware server).

Examining your Resources

KRunner offers you Akonadi Resource Configuration, or you can access this through the Akonadi tray icon -> Configure. From KDE 4.6 you will find it in System Settings -> Personal Information You may find several resources set up. You may find one labelled

Address Book - No KDE address book plugin configured yet.

That's the old compatibility bridge (possibly created by the migrator tool). You should remove this one!

std.vcf - Ready

This is the VCard File Resource which points to $HOME/.kde/share/apps/kabc/std.vcf per default. It is not recommended that you use that one, as it doesn't share the benefit of Akonadi.

Personal Contacts - Offline

That's the preferred resource for your local contacts which points to

$HOME/.local/share/contacts

Note that this may say "Offline" when in fact you are using it. This is a display bug, and can safely be ignored.

And when more components use Akonadi?

When the rest of the components move to Akonadi, will all the data be under ~/.local/share? That should make backup easy. Well, contacts and mails are stored there now, I don't know what the plan for events/todos is, but it would make sense to store them there as well. We'll keep it in mind when discussion pops up!

Troubleshooting

Problem: Your update to 4.6 and your addressbook is suddenly completely blank

Solution: This is new behaviour in 4.6 - you can choose whether to display specific addressbooks or all of them. In front of each addressbook name there is a checkbox. Use that to enable the addressbooks you want to use.

Related pages