Sun Java logo     上一個      目錄      索引      下一個     

Sun logo
Sun Java System Calendar Server 管理指南 

第 16 章
管理刪除日誌資料庫

Calendar Server 包含刪除日誌資料庫 (ics50deletelog.db),可以儲存已刪除的事件和待辦事項 (工作)。在以前的發行版本中,Calendar Server 不維護已刪除事件和工作的資料庫。使用者不得不儲存事件或待辦事項 (工作) 的唯一識別碼 (uid) 或週期性識別碼 (rid) 來確定哪些元件已被刪除。這一限制直接影響到使用 WCAP 指令開發用戶端使用者介面 (UI) 的各個安裝。

本章說明以下內容:


刪除日誌資料庫的建立

Calendar Server 在 csdb 目錄下建立刪除日誌資料庫 (ics50deletelog.db) 及其他 Calendar Server 資料庫檔案。Calendar Server 會將事件和待辦事項寫入刪除日誌資料庫,如下所示:


查詢刪除日誌資料庫

若要從刪除日誌資料庫傳回項目,請以展開模式或壓縮模式使用 fetch_deletedcomponents WCAP 指令:

如需有關 WCAP 指令的更多資訊,請參閱「Sun Java System Calendar Server 6 2004Q2 Developers Guide」。


清除刪除日誌資料庫

Calendar Server 提供自動清除刪除日誌資料庫手動清除刪除日誌資料庫

自動清除刪除日誌資料庫

如果願意,您可以讓 Calendar Server 自動清除刪除日誌資料庫中的項目。

表格 16-1 說明 ics.conf 檔案中用於控制自動清除的參數。

表格 16-1 用於自動清除刪除日誌資料庫的配置參數

參數

說明

service.admin.purge.deletelog

啟用 ("yes") 或停用 ("no") 自動清除刪除日誌資料庫 (ics50deletelog.db) 項目。

預設為 "no"。

caldb.berkeleydb.purge.deletelog.interval

指定自動清除刪除日誌資料庫 (ics50deletelog.db) 中項目的間隔時間 (以秒為單位)。

預設為 60 秒。

caldb.berkeleydb.purge.deletelog.beforetime 

指定一個時間 (以秒為單位),清除刪除日誌資料庫 (ics50deletelog.db) 中早於此時間的項目。

預設為 86400 秒 (1 天)。

例如,若要讓 Calendar Server 每五分鐘 (600 秒) 自動清除一次存在時間超過 2 天 (172800 秒) 的刪除日誌資料庫項目,請如下所示設定表格 16-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

其中 endtimestarttime 指定開始和結束時間,且為祖魯時間 (也就是 GMT 或 UTC)。

若要在 Solaris 作業系統上執行 cspurge,您必須以執行 Calendar Server 時所用的使用者與群組身份 (預設為 icsusericsgroup) 或以 root 身份登入。

例如,清除從 2003 年 7 月 1 日 到 2003 年 7 月 31 日的項目:

cspurge -e 20030731T235959Z -s 20030701T120000Z

如需更多資訊,請參閱附錄 D 「Calendar Server 指令行公用程式參照」中的 cspurge


對刪除日誌資料庫使用 CLI 公用程式

表格 16-2 列出支援刪除日誌資料庫 (ics50deletelog.db) 的 Calendar Server 指令行公用程式:

表格 16-2 支援刪除日誌資料庫的公用程式

公用程式

說明

cspurge

允許手動清除刪除日誌資料庫中的項目。

csbackup 和 csrestore

支援刪除日誌資料庫的備份與復原。

csstats

報告刪除日誌資料庫統計資料。

csdb

支援對刪除日誌資料庫的重建、回復以及檢查作業。

cscomponents

列出 (唯讀) 刪除日誌資料庫中的項目數。

如需更多資訊 (包括這些公用程式的語法),請參閱附錄 D 「Calendar Server 指令行公用程式參照」



上一個      目錄      索引      下一個     


Copyright 2004 Sun Microsystems, Inc. 。版權所有。