Akonadi and AddressBook/zh-tw: Difference between revisions

From KDE UserBase Wiki
m (Created page with '''這裡的資料由'''KDE-PIM''' 開發人員 Tobias Koenig 提供。 ''')
 
(Updating to match new version of source page)
 
(37 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<languages />
<languages />
{{Note|This article also apply to other applications that are using [[Special:myLanguage/Akonadi|Akonadi]] for example KMail and KOrganizer.}}


''這裡的資料由'''KDE-PIM''' 開發人員 Tobias Koenig 提供。 ''
''這裡的資料由'''KDE-PIM''' 開發人員 Tobias Koenig 提供。 ''


==Some Definitions==
==一些定義==


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''我們指的像是聯繫人或事件這類數據。這些數據或是存儲在「群件服務器(groupware server)」,或是存儲在本地文件中。具體存儲的位置取決於你使用的資源,比如,''個人聯繫人(Personal Contacts''資源就是把數據存儲到$HOME/.local/share/contacts,同時''VCard File'' 資源(已經不推薦使用了[[Image:Face-smile.png|16px]])則存儲數據到$HOME/.kde/share/apps/kabc/std.vcf


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''則是真實數據的副本,放置在數據庫中便於更快速的訪問和作為離線緩存。數據庫還同時保留著用來管理數據的''元數據(meta data'''''Akonadi'''需要元數據才能正常工作。


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''是設定'''Akonadi''' 服務器和個別資源的數據。服務器的設置數據可以在$HOME/.config/akonadi 找到,資源的設置數據通常存儲在$HOME/.kde/share/config/akonadi_xyz_resourcerc# ('''''xyz''''' 是資源名而'''''#'''''是其的實例數)


==Organising Backups==
'''Akonadi''' 服務端的配置資訊其實就是 ''$HOME/.config/akonadi'' 那的一組配置檔(通過改環境變數 $XDG_DATA_HOME 和 $XDG_CONFIG_HOME 可以變更路徑的,默認分別是 ''$HOME/.local/share'' 和 ''$HOME/.config'')。它的資訊包括那些數據源(data sources)和輔助程式(helper programs)是啟動被啟用的,啟用的這些會被'''Akonadi''' 的某個服務端進程 '''(akonadi_control)'''啟動和監控(所以它們崩潰的時候才能自動重啟)。KDE 的本地基本路徑可用  $KDEHOME 環境變數修改,默認是 $HOME/.kde(有的發行版改了源代碼,就可能是 $HOME/.kde4)
參考 {{Input|1=kde4-config --path data}}


So now we need to decide what to back upIf 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.
每種數據來源處理器(稱作 資源)或者輔助程式(稱作 代理)都可以有自己的配置資訊,當然有些是沒的。通常來說 $HOME/.config/akonadi/agentsrc 中每條都有其在 $HOME/.kde/share/config 對應的配置。比如說,如果 [Instances] 字段有條叫 akonadi_ical_resouce_2,那麼 KDE 配置目錄下麵會有個叫做 akonadi_ical_resource_2rc 的檔。


The '''Akonadi''' tray icon offers you a backup and restore functionThat 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).
依據數據類型的不同,配置檔的檔案名或者說目錄名會有一定的規律。常規的路徑是 KDE 傳統的位置,比如說 $HOME/.kde/share/apps/korganizer/std.ics,新的默認路徑是 $HOME/.local/share,比如說 $HOME/.local/share/contacts。


==Examining your Resources==
當前的版本中,資料庫僅僅是拿來存儲結構化資訊(比如說某個聯繫人屬於哪個通訊錄)。這些是會變的,以後 Akonadi 會用於 email,像是已讀/未讀這些資訊的存儲(除非是 IMAP 那樣的後端才不需要這樣)。


'''KRunner''' offers you '''Akonadi Resource Configuration''', or you can access this through the <menuchoice>Akonadi tray icon -> Configure</menuchoice>. You may find several resources set up.  You may find one labelled
==籌備備份==
 
然後現在是該決定備份什麼樣的數據了。如果你想備份"真實數據(real data)",這東西又得具體看你設定的資源……要是你用的是「群件服務器(groupware server)」,備份這事應該在那邊搞定。對於聯繫人,你需要的通常是$HOME/.local/share/contacts 那的文件。
 
'''Akonadi''' 托盤圖標提供備份和恢復功能。備份的是"緩存數據(cache data)",所以可能沒帶全你所有的數據!如果你想1:1進行系統拷貝,這功能會很有用,你可以拷貝真實數據和配置的同時復制緩存數據過去,之後便不必再次從源載入數據(比如群件服務器)。
<span id="Examining your Resources"></span>
==測試你的資源==
 
'''KRunner''' 提供 '''Akonadi Resource Configuration''',或是你通過 <menuchoice>Akonadi 託盤圖示 -> 設置</menuchoice>來訪問,從 KDE 4.6 開始,你可以在 <menuchoice>系統設置 ->個人資訊</menuchoice>  找到,你可能會發現已經建立好多個資源。還可能你會看到某個資源帶上這樣的標籤:


''Address Book'' - No KDE address book plugin configured yet.
''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
''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'''.
這是''VCard File Resource'',每個默認指向$HOME/.kde/share/apps/kabc/std.vcf。不推薦再用這種方式,因為其沒有使用到'''Akonadi'''的優勢。


''Personal Contacts'' - Offline
''個人聯繫人(Personal Contacts'' - Offline


That's the preferred resource for your local contacts which points to
這是你本地聯繫人指向的優先資源
::{{Output|1=$HOME/.local/share/contacts}}
{{Output|1=$HOME/.local/share/contacts}}


<!--T:17-->
<!--T:17-->
Note that this may say "Offline" when in fact you are using it. This is a display bug, and can safely be ignored.
注意就算是你實際在用,還是可能會提示"離線(Offline)"。這是個顯示 bug,無視之。
 
==什麼時候更多的組件改用'''Akonadi'''啊? ==
 
剩下的組件要是遷移到'''Akonadi''',其所有數據會存儲到~/.local/share 嗎?那樣的話備份會簡單許多。嗯,聯繫人和郵件現在已經這樣處理了。但我不知道事件/todos 今後的計劃,但也存儲到那確實有道理。我們會在今後討論的時候記住這點的!
 
==故障排解==
 
''問題'':  更新到 4.6,發現聯繫人清空了。
 
''解決辦法'':  這是 4.6 新改的-你可以選擇只顯示特定地址簿或顯示全部。在每個地址簿名字前有個複選框,你懂的。


==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!
:[[Special:myLanguage/Akonadi|Akonadi]]<br />
:[[Special:myLanguage/KAddressBook/index|KAddressBook]]


[[Category:System]]
[[Category:系統/zh-tw]]

Latest revision as of 11:00, 19 January 2019

Note

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


這裡的資料由KDE-PIM 開發人員 Tobias Koenig 提供。

一些定義

真實數據(real data)我們指的像是聯繫人或事件這類數據。這些數據或是存儲在「群件服務器(groupware server)」,或是存儲在本地文件中。具體存儲的位置取決於你使用的資源,比如,個人聯繫人(Personal Contacts)資源就是把數據存儲到$HOME/.local/share/contacts,同時VCard File 資源(已經不推薦使用了)則存儲數據到$HOME/.kde/share/apps/kabc/std.vcf。

緩存數據(cached data)則是真實數據的副本,放置在數據庫中便於更快速的訪問和作為離線緩存。數據庫還同時保留著用來管理數據的元數據(meta data)Akonadi需要元數據才能正常工作。

設置數據(configuration data)是設定Akonadi 服務器和個別資源的數據。服務器的設置數據可以在$HOME/.config/akonadi 找到,資源的設置數據通常存儲在$HOME/.kde/share/config/akonadi_xyz_resourcerc# (xyz 是資源名而#是其的實例數)。

Akonadi 服務端的配置資訊其實就是 $HOME/.config/akonadi 那的一組配置檔(通過改環境變數 $XDG_DATA_HOME 和 $XDG_CONFIG_HOME 可以變更路徑的,默認分別是 $HOME/.local/share$HOME/.config)。它的資訊包括那些數據源(data sources)和輔助程式(helper programs)是啟動被啟用的,啟用的這些會被Akonadi 的某個服務端進程 (akonadi_control)啟動和監控(所以它們崩潰的時候才能自動重啟)。KDE 的本地基本路徑可用 $KDEHOME 環境變數修改,默認是 $HOME/.kde(有的發行版改了源代碼,就可能是 $HOME/.kde4)

參考

kde4-config --path data

每種數據來源處理器(稱作 資源)或者輔助程式(稱作 代理)都可以有自己的配置資訊,當然有些是沒的。通常來說 $HOME/.config/akonadi/agentsrc 中每條都有其在 $HOME/.kde/share/config 對應的配置。比如說,如果 [Instances] 字段有條叫 akonadi_ical_resouce_2,那麼 KDE 配置目錄下麵會有個叫做 akonadi_ical_resource_2rc 的檔。

依據數據類型的不同,配置檔的檔案名或者說目錄名會有一定的規律。常規的路徑是 KDE 傳統的位置,比如說 $HOME/.kde/share/apps/korganizer/std.ics,新的默認路徑是 $HOME/.local/share,比如說 $HOME/.local/share/contacts。

當前的版本中,資料庫僅僅是拿來存儲結構化資訊(比如說某個聯繫人屬於哪個通訊錄)。這些是會變的,以後 Akonadi 會用於 email,像是已讀/未讀這些資訊的存儲(除非是 IMAP 那樣的後端才不需要這樣)。

籌備備份

然後現在是該決定備份什麼樣的數據了。如果你想備份"真實數據(real data)",這東西又得具體看你設定的資源……要是你用的是「群件服務器(groupware server)」,備份這事應該在那邊搞定。對於聯繫人,你需要的通常是$HOME/.local/share/contacts 那的文件。

Akonadi 托盤圖標提供備份和恢復功能。備份的是"緩存數據(cache data)",所以可能沒帶全你所有的數據!如果你想1:1進行系統拷貝,這功能會很有用,你可以拷貝真實數據和配置的同時復制緩存數據過去,之後便不必再次從源載入數據(比如群件服務器)。

測試你的資源

KRunner 提供 Akonadi Resource Configuration,或是你通過 Akonadi 託盤圖示 -> 設置來訪問,從 KDE 4.6 開始,你可以在 系統設置 ->個人資訊 找到,你可能會發現已經建立好多個資源。還可能你會看到某個資源帶上這樣的標籤:

Address Book - No KDE address book plugin configured yet.

這是舊的兼容性問題(通常是遷移工具引起的)。你應該直接刪除之!

std.vcf - Ready

這是VCard File Resource,每個默認指向$HOME/.kde/share/apps/kabc/std.vcf。不推薦再用這種方式,因為其沒有使用到Akonadi的優勢。

個人聯繫人(Personal Contacts) - Offline

這是你本地聯繫人指向的優先資源

$HOME/.local/share/contacts

注意就算是你實際在用,還是可能會提示"離線(Offline)"。這是個顯示 bug,無視之。

什麼時候更多的組件改用Akonadi啊?

剩下的組件要是遷移到Akonadi,其所有數據會存儲到~/.local/share 嗎?那樣的話備份會簡單許多。嗯,聯繫人和郵件現在已經這樣處理了。但我不知道事件/todos 今後的計劃,但也存儲到那確實有道理。我們會在今後討論的時候記住這點的!

故障排解

問題: 更新到 4.6,發現聯繫人清空了。

解決辦法: 這是 4.6 新改的-你可以選擇只顯示特定地址簿或顯示全部。在每個地址簿名字前有個複選框,你懂的。

相關頁面

Akonadi
KAddressBook