Previous     Contents     Index     Next     
iPlanet Calendar Server Administrator's Guide



Chapter 6   Backing Up and Restoring Calendar Server Data


To back up and restore Calendar Server data, use these command-line utilities:

  • csbackup backs up the calendar database, a specified calendar, or a user's default calendar.

  • csrestore restores the calendar database, individual calendars, or a user's default calendar that was saved using csbackup.

This chapter contains these sections:



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:


Backing Up the Calendar Database to a Directory

To backup the calendar database to a target backup directory, use the csbackup utility database command. For example, to back up the calendar database to a directory named backupdir:

csbackup -f database backupdir

The caldb.conf version file in the backup directory shows the version number of the calendar database that was backed up.



Note Currently, 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 the csbackup utility.




Backing Up a Specific Calendar to a File

csbackup -c JSmithcal calendar jsmith.xml

To backup a calendar to a backup file in iCalendar or XML format, use the csbackup utility calendar command. The file-name 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:

ccbackup -c JSmithcal calendar backupdir/jsmith.ics

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

ccbackup -c JSmithcal calendar backupdir/jsmith.xml


Backing Up a User's Default Calendar to a File

To back up a user's default calendar to a text file in iCalendar or XML format, use the csbackup utility defcal command. The file-name 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:

csbackup -a JSmith defcal jsmith.ics

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

csbackup -a JSmith defcal jsmith.xml



Restoring Calendar Server Data



The csrestore utility restores the calendar database, individual calendars, or a user's default calendar that was saved using csbackup. You must run the csrestore utility on the local machine where the Calendar Server is installed, and you must first stop the Calendar Server. (The Calendar Server can be running, however, when you backup the database.)

This section describes:


Restoring the Calendar Database

To restore a calendar database that was saved to a backup directory using the csbackup utility, use the csrestore utility database command.

For example, to restore the calendar database that was saved to a backup directory named backupdir:

csrestore database backupdir


Restoring a Calendar From a Backup Directory

To restore a specific calendar from a database that was saved to a backup directory using the csbackup utility, use the csrestore utility database command with the -c option.

For example, to restore the calendar JSmithcal from the backup database directory backupdir:

csrestore -c JSmithcal database backupdir


Restoring a Calendar From a File

To restore a specific calendar that was saved to a backup file using the csbackup utility, use the csrestore utility calendar command with the -c option. The file-name extension (.ics or .xml) of the backup file indicates the format in which the calendar was saved.

For example, to restore the calendar JSmithcal that was saved in iCalendar (text/calendar MIME) format to the file jsmith.ics located in the backupdir directory:

csrestore -c JSmithcal calendar backupdir/jsmith.ics

Or, to restore the calendar JSmithcal that was saved in XML (text/calendar MIME) format to the file jsmith.xml located in the bcakupdir directory:

csrestore -c JSmithcal calendar backupdir/jsmith.xml


Restoring a User's Default Calendar

To restore a a user's default calendar that was saved to a backup file using the csbackup utility, use the csrestore utility defcal command. The file-name extension (.ics or .xml) of the backup file indicates the format in which the calendar was saved.

For example, to restore calendar user JSmith's default calendar that was saved in iCalendar (text/calendar MIME) format to a file named jsmith.ics located in the backup directory backupdir:

csrestore -a JSmith defcal backupdir/jsmith.ics

To restore calendar user JSmith's default calendar that was saved in XML (text/xml MIME) format to a file named jsmith.xml located in the backup directory backupdir:

csrestore -a JSmith defcal backupdir/jsmith.xml



Using Solstice Backup™ or Legato Networker®



You can also use either Solstice Backup or the Legato Networker to back up and restore Calendar Server data. Solstice Backup and the Legato Networker are identical. The instructions in this section apply to both products. Before attempting to backup the Calendar Server, however, see the Solstice Backup or Legato Networker documentation.

For Solstice Backup documentation, see http://docs.sun.com.

This section describes:

If you do not have Solstice Backup or Legato Networker, use the Calendar Server csbackup and csrestore utilities.


Backing Up Calendar Server Data Using Solstice Backup or Legato Networker

To backup Calendar Server data:

  1. Run the csbackup utility to back up the calendar database or specified calendars using the -l option.

    For more information, see csbackup.

    The backup procedure creates a backup directory under the current directory. This directory is not the actual directory where calendar data is stored, but a directory image of how calendars are stored. The files in this directory are empty and are used only to provide information to the backup program on how calendars will be stored on the backup media. If the backup directory already exists, it is synchronized with the directory structure of the current hierarchy.

  2. Start Solstice Backup or Legato Networker.

    You can use the backup program's graphical user interface or the save command to back up calendar data.



    Note Do not use the Solstice Backup incremental backup feature because the backup directory is only an image of the folder structure and contains no actual data. The incremental backup feature is not supported by the Calendar Server.



    Important: The .nsr files generated by the command-line utilities contain standard Networker directives and should never be modified.

  3. Automate the backup procedure.

    The preceding steps describe how to run a backup manually. iPlanet recommends that you set up the backup program's backup command to run the Calendar Server csbackup command-line utility before the running the backup program's save command to achieve an automated backup process.

    Note You cannot use Networker to backup a calendar with a name that contains non-ASCII characters or the forward slash (/).




Restoring Calendar Server Data Using Solstice or Legato Software

To restore Calendar Server data:

  1. Use the Solstice Backup nwrestore feature or the recover command to restore backed-up calendar information. If you use nwrestore, you receive the message:

    "File already exists. Do you want to overwrite, skip, backup, or rename?"

  2. Choose overwrite.

    This message appears because the backup tree is just the directory hierarchy, that is, it consists of empty files and stays that way permanently.


Previous     Contents     Index     Next     
Copyright © 2002 Sun Microsystems, Inc. All rights reserved.

Last Updated January 22, 2002