若要匯出行事曆資料至檔案及從檔案中匯入行事曆資料,請分別使用 csexport 和 csimport 公用程式。行事曆資料可為 iCalendar (.ics) 或 XML (.xml) 格式。
您必須在安裝 Calendar Server 的機器上本機執行 csexport 和 csimport。Calendar Server 可以執行,也可以停止。
若要從先前使用 csexport 公用程式儲存的檔案匯入行事曆資料,請使用 csimport。匯入檔案的檔案副檔名 (.ics 或 .xml) 指示該檔案的儲存格式。
例如,從以 iCalendar (text/calendar MIME) 格式儲存的檔案 jsmith.ics 將行事曆資料匯入行事曆 ID (calid) jsmithcal:
csimport -c jsmithcal calendar jsmith.ics
從以 XML (text/xml MIME) 格式儲存的名為 jsmith.xml 的檔案將資料匯入行事曆 jsmithcal:
csimport -c jsmithcal calendar jsmith.xml
若要將行事曆資料匯出至檔案,請使用 csexport。您為輸出檔案指定的檔案副檔名 (.ics 或 .xml) 可決定使用何種格式。
例如,以 iCalendar (text/calendar MIME) 格式將行事曆 ID (calid) 為 jsmithcal 的行事曆匯出至名為 jsmith.ics 的檔案:
csexport -c jsmithcal calendar jsmith.ics
以 XML (text/xml MIME) 格式將行事曆 jsmithcal 匯出至名為 jsmith.xml 的檔案:
csexport -c jsmithcal calendar jsmith.xml