Sun ONE Calendar Server 6.0 管理員指南 |
第 7 章
管理刪除日誌資料庫Calendar Server 6.0 包含刪除日誌資料庫 (ics50deletelog.db),可以儲存已刪除的事件和待辦事項 (工作)。在以前的版次中,Sun ONE Calendar Server 不維護已刪除事件和工作的資料庫。使用者不得不儲存事件或待辦事項 (工作) 的唯一識別碼 (uid) 或週期性識別碼 (rid) 來確定哪些元件已被刪除。這一限制直接影響到使用 WCAP 指令開發用戶端使用者介面 (UI) 的各個安裝。
本章描述以下內容:
刪除日誌資料庫的建立Calendar Server 在 csdb 目錄下建立刪除日誌資料庫 (ics50deletelog.db) 及其他 Calendar Server 資料庫檔案。Calendar Server 會將事件和待辦事項寫入刪除日誌資料庫,如下所示:
查詢刪除日誌資料庫若要從刪除日誌資料庫傳回項目,請以展開模式或壓縮模式使用 fetch_deletedcomponents WCAP 指令:
如果 recurring 參數為 1,則 fetch_deletedcomponents 傳回非週期性事件以及所有週期性事件的主要元件,但不傳回個別週期性事件。
如果刪除某個週期鏈中的所有實例,則主要元件傳回 dtstart、dtend、rrules、rdates、exrules、exdates 以及 uid 參數。
此外,fetch_deletedcomponents 不傳回與仍處於作用中的已刪除週期性實例相關的主要元件。若要傳回作用中的主要元件,請使用 fetchcomponents_by_lasmod WCAP 指令。fetch_deletedcomponents 指令應與 fetchcomponents_by_lasmod 指令一同使用。
如需更多有關 WCAP 指令的資訊,請參閱「Sun ONE Calendar Server 6.0 Programmer's Manual」。
清除刪除日誌資料庫Calendar Server 6.0 提供自動清除刪除日誌資料庫和手動清除刪除日誌資料庫。
自動清除刪除日誌資料庫
如果願意,您可以讓 Calendar Server 6.0 自動清除刪除日誌資料庫中的項目。
表格 7-1 描述 ics.conf 檔案中用於控制自動清除的參數。
例如,若要讓 Calendar Server 每五分鐘 (600 秒) 自動清除一次存在時間超過 2 天 (172800 秒) 的刪除日誌資料庫項目,請如下所示設定表格 7-1 中的參數:
service.admin.purge.deletelog="yes"
caldb.berkeleydb.purge.deletelog.interval=600
caldb.berkeleydb.purge.deletelog.beforetime=172800設定這些參數後,重新啟動 Calendar Server 以使新值生效。
手動清除刪除日誌資料庫
若要手動清除刪除日誌資料庫 (ics50deletelog.db) 中的項目,請使用 cspurge 公用程式:
cspurge -e endtime -s starttime
其中 endtime 和 starttime 指定開始和結束時間,且為祖魯時間 (也就是 GMT 或 UTC)。
若要在 Solaris 系統上執行 cspurge,必須以 Calendar Server 執行時所用的使用者與群組身份 (預設為 icsuser 和 icsgroup) 或以 root 身份登入。
例如,清除從 2003 年 7 月 1 日 到 2003 年 7 月 31 日的項目:
cspurge -e 20030731T235959Z -s 20030701T120000Z
如需更多資訊,請參閱第 11 章「Calendar Server 指令行公用程式」中的 cspurge。
對刪除日誌資料庫使用 CLI 公用程式表格 7-2 列出支援刪除日誌資料庫 (ics50deletelog.db) 的 Calendar Server 指令行公用程式:
表格 7-2 支援刪除日誌資料庫的公用程式
公用程式
說明
cspurge
允許手動清除刪除日誌資料庫中的項目。
csbackup 和 csrestore
支援刪除日誌資料庫的備份與復原。
csstats
報告刪除日誌資料庫統計資料。
csdb
支援對刪除日誌資料庫的重建、回復以及檢查作業。
cscomponents
列出 (唯讀) 刪除日誌資料庫中的項目數。
如需更多資訊 (包括這些公用程式的語法),請參閱第 11 章「Calendar Server 指令行公用程式」。