csdb 公用程式可管理行事曆資料庫 (行事曆、階段作業和統計)。指令包括︰
create,建立新的資料庫。(如果伺服器啟動時資料庫不存在,Calendar Server 會自動建立一個。)
delete,刪除現有的行事曆資料庫。資料庫在開啟時 (Calendar Server 在執行時) 無法被刪除。
list,列出有關資料庫的資訊。
check,檢查行事曆資料庫以確定是否發生毀壞。
rebuild,重建已毀壞的行事曆資料庫。
recover,回復已損毀的行事曆資料庫。
version,顯示目前安裝之公用程式的版本編號。
您必須在安裝了 Calendar Server 的機器上本機執行此公用程式。
必須停止 Calendar Server,才能執行 create、delete 或 rebuild 指令。
您必須以執行 Calendar Server 的使用者或群組 (在安裝期間指定,例如 icsuser 和 icsgroup) 的身份或以 root 身份登入。
csdb [-q|-v] [-t caldb|sessdb|statdb] create|delete [dbdir] csdb [-q|-v] [-t caldb|sessdb|statdb] list [dbdir] csdb [-q|-v] [-f] [-t caldb|sessdb|statdb] recover [dbdir] csdb check [dbdir] csdb rebuild [-a, -V] [-g] [dbdir [dstdir]] |
下表說明 csdb 公用程式可用的指令。
表 D–11 csdb 公用程式指令
指令 |
說明 |
---|---|
create [dbdir] |
在指定的資料庫目錄中建立資料庫。如果未指定資料庫目錄,則使用目前目錄。如果伺服器啟動時資料庫不存在,Calendar Server 會自動建立一個。 |
delete [dbdir] |
刪除指定資料庫目錄中的資料庫。如果未指定資料庫目錄,則使用目前目錄。資料庫在開啟時 (Calendar Server 在執行時) 無法被刪除。 |
list [dbdir] |
列出有關指定資料庫目錄之資料庫的資訊。如果未指定資料庫目錄,則使用目前目錄。 |
recover [dbdir] |
嘗試回復指定資料庫目錄中損毀的行事曆資料庫。如果未指定資料庫目錄,則使用目前目錄。未實作階段作業或統計資料庫。 |
check [dbdir] |
掃描指定資料庫目錄中的行事曆資料庫,以確定是否發生損毀並在其輸出中報告結果。如果未指定資料庫目錄,則使用目前目錄。 |
rebuild [dbdir [dstdir]] |
掃描指定資料庫目錄中的所有行事曆資料庫,以確定是否發生損毀,並產生重建的行事曆資料庫 (.db 檔案)。如果未指定資料庫目錄,則使用目前目錄。重建資料庫後,會執行 db_verify。 dstdir 可指定可選擇的目標目錄。 |
version |
顯示公用程式的版本。 |
下表說明 csdb 公用程式指令選項。
表 D–12 csdb 公用程式指令選項
在目前目錄中建立新的、未移入的資料庫︰
csdb -t caldb create
刪除目前目錄中的資料庫:
csdb -t caldb delete
列出有關目前目錄中之行事曆資料庫的資訊:
csdb -v -t caldb list
嘗試回復目前目錄中所有損毀的資料庫︰
csdb recover
列出有關目前目錄中之階段作業資料庫的資訊:
csdb -t sessdb list
僅重建警示資料庫:
csdb -a -V rebuild