Sun Java System Calendar Server 6 2005Q4 Administration Guide

Backing Up Calendar Server Data

The csbackup utility can back up the calendar database, a specified calendar, or a user’s default calendar. This section describes:

ProcedureTo Back Up the Calendar Database to a Directory

  1. Log in as the owner of the database files (such as icsuser).

  2. Use the csbackup utility database command.

    For example, to back up the calendar database to a directory named backupdir:


    csbackup -f database backupdir
  3. Verify the correct version of the database was backed up by checking the ics50caldb.conf version file in the backup directory.


    Note –

    The csbackup utility fails if the target backup directory already exists and you do not specify the -f option. For example, the following command fails if backupdir exists, even if the directory is empty:


    csbackup database backupdir

    Therefore, if you specify a target backup directory that already exists, include the -f option when you run csbackup.

    You can also specify a nonexistent target backup directory and let csbackup create the directory for you.


ProcedureTo Back Up a Specific Calendar to a File

  1. Login as the database owner (icsuser).

  2. To backup a calendar to a file in iCalendar or XML format, use the csbackup utility calendar command.

    The filename extension (.ics or .xml) of the backup file indicates the format.

    For example, to backup the calendar jsmithcal in iCalendar format (text/calendar MIME) to the file jsmith.ics in the backupdir directory:


    csbackup -c jsmithcal calendar backupdir/jsmith.ics

    Or, to backup the calendar jsmithcal in XML format (text/XML) to the file jsmith.xml in the backupdir directory:


    csbackup -c jsmithcal calendar backupdir/jsmith.xml

ProcedureTo Back Up a User’s Default Calendar to a File

  1. Login as the database owner (icsuser).

  2. To back up a user’s default calendar to a text file in iCalendar or XML format, use the csbackup utility defcal command. The filename extension (.ics or .xml) that you specify for the output file determines which format is used.

    For example, to back up calendar user jsmith’s default calendar in iCalendar (text/calendar MIME) format to a file named jsmith.ics in the backup directory:


    csbackup -a jsmith defcal backupdir/jsmith.ics

    Or, to back up calendar user jsmith’s default calendar in XML (text/xml MIME) format to a file named jsmith.xml in the backup directory:


    csbackup -a jsmith defcal backupdir/jsmith.xml