Sun Java System Calendar Server 6 2005Q4 管理指南

Procedure重建行事曆資料庫,包括 GSE 資料庫

如果您已在所在站點實作群組排程,則重建應該包括 GSE 資料庫。

若要同時重建行事曆資料庫和 GSE 資料庫,請:

步驟
  1. 透過執行 csschedule -v list 指令確定 GSE 資料庫中是否有項目,然後讓 GSE 完成處理這些項目。

  2. 以具有安裝 Calendar Server 的系統之管理權限的使用者身份登入。

  3. 停止 Calendar Server。

  4. 如果您尚未建立行事曆資料庫的副本,請建立副本。

    複製資料庫 (.db) 檔案和記錄 (log.*) 檔。您無需複製任何共用 (__db.*) 檔案。

  5. 變更至 cal_svr_base/SUNWics5/cal/sbin 目錄。

    例如,在 Solaris 作業系統上,輸入:

    cd /opt/SUNWics5/cal/sbin

    如果 sbin 目錄的磁碟空間不足,請在其他目錄中執行 rebuild 指令。

  6. 在行事曆資料庫的副本中執行 rebuild 指令:

    ./csdb -g rebuild /tmp/db /tmp/

    如果您未指定資料庫目錄,rebuild 將使用目前目錄中的資料庫。在前面的範例中,/tmp/ 參數為重建資料庫指定目標目錄。


    備註 –

    請始終使用最新的備份複本重建您的行事曆資料庫。

    然而,如果您的資料大量遺失,而您已經定期備份了資料庫並有多個複本可用,請從最新的複本到最舊的複本進行重建。(唯一的缺點是已刪除的行事曆元件將重新出現在重建資料庫中)。

    例如,如果您有三組備份行事曆資料庫檔案,分別在目錄 db_0601db_0615db_0629 中,請按以下序列執行 rebuild 指令:


    ./csdb rebuild db_0629 ./csdb rebuild db_0615 ./csdb rebuild db_0601

    然後 rebuild 將重建資料庫寫入 cal_svr_base/SUNWics5/cal/sbin/rebuild_db 目錄。


  7. rebuild 完成後,請複查 rebuild.out 檔案中的輸出。

    如果重建成功,rebuild.out 檔案中的最後一行應為:


    Calendar database has been rebuilt
  8. 驗證 rebuild 成功之後,請從 rebuild_db 目錄中將重建資料庫 (.db) 檔案複製到生產資料庫。

  9. 如果您有任何已毀壞資料庫的共用 (__db.*) 檔案,請將其移至其他目錄。

  10. 重新啟動 Calendar Server。


範例 16–1 重建輸出範例

輸出範例顯示事件資料庫和待辦事項資料庫分別被掃描了兩遍。這不是錯誤。掃描第一遍以驗證 calprops 資料庫中的資訊,然後再掃描一遍以確定可從行事曆資料庫中存取 calprops

以下範例顯示指令及其產生的輸出:


# ./csdb -g rebuild
Building calprops based on component information.
Please be patient, this may take a while...
Scanning events database...
512 events scanned
Scanning todos database...
34 todos scanned
Scanning events database...
512 events scanned
Scanning todos database...
34 todos scanned
Scanning deletelog database...
15 deletelog entries scanned
Scanning gse database...
21 gse entries scanned
Scanning recurring database...
12 recurring entries scanned
Successful components db scan
Calendar database has been rebuilt
Building components based on calprops information.
Please be patient, this may take a while...
Scanning calprops database to uncover events...
25 calendars scanned
Scanning calprops database to uncover todos...
25 calendars scanned
Successful calprops db scan
Calendar database has been rebuilt