Chapter 3 Administering Calendar Server This chapter describes how to administer and maintain your Calendar Server. It includes the following sections:
This chapter describes how to administer and maintain your Calendar Server. It includes the following sections:
utilities to start and stop the Calendar Server
command line utilities to enable and disable access to calendar data, to manage calendar users, events, and tasks, to monitor Calendar Server activity, and to backup and restore calendar data.
command line utilities to control the server
start-cal and stop-cal
iplncal.sh (Unix only)
the Services window (Windows NT only)
cd /opt/SUNWicsrv/cal/bin
Type: start-cal
Type: stop-cal
where:
-h displays help showing the available commands
-r is an optional parameter that lets you specify a directory location and ServerRoot represents the actual path in which the Calendar Server is installed, such as opt/SUNWicsrv.
start|refresh|stop|list are the available options (of which you must choose one, but only one each time you issue the command) to start, stop, or refresh the server, or to list the server processes (threads) currently running.
service is an optional parameter that specifies the Calendar Server service on which the command will take effect, such as HTTP.
create a calendar user (see Creating a Calendar User) delete a calendar user (see Displaying User Information) enable a calendar user (see Enabling a Calendar User) disable a calendar user (see Disabling a Calendar User) check if a user is enabled for calendaring (see Deleting a Calendar User) list all calendar users or list a specified calendar user's configuration attributes (see Displaying User Information) reset the calendar user's configuration attributes to the default values (see Resetting User Calendar Attributes)
list all logged-in users or the status of a specified user (see Managing User Sessions)
logout a user (see Logging Out a User)
-g John represents the user's givenname (first name).
-s Smith represents the user's surname (last name).
-y password represents the user's password.
-c calJSmith represents the user's default calendar ID (calID).
create JSmith adds an entry with the USERID JSmith to the LDAP directory that stores your user information.
Enabling a Calendar User Users are automatically enabled for calendaring when they log on to the Calendar Server for the first time, if they are not already enabled. In such cases, the calendar ID (CALID) of the user's default calendar is the user's USERID. For example, if JSmith is not enabled for calendaring and logs on to the Calendar Server for the first time, the server enables JSmith for calendaring automatically and assigns this user a default calendar with the CALID JSmith. Additionally, the prefix JSmith is assigned to the CALID of each subsequent calendar that JSmith creates. For example, if JSmith, who was enabled automatically, creates a calendar called sports, the assigned CALID is JSmith:sports.
The above command enables JSmith to log on to the Calendar Server and creates a default calendar for this user with the CALID calendarA.
Note. If a user is currently logged on to the Calendar Server, the disable command has no affect until the user logs off. The cssession utility lets you logout a calendar user (see Logging Out a User).
Displaying User Information Use the csuser utility's list command to list all calendar-enabled users or to view the calendar attributes of a specified user.
To view all of the calendar attributes of a single user, such as JSmith, enter:
Resetting User Calendar Attributes Use the csuser utility's reset command to restore the default settings for all calendar attributes of a specified user. For example, to reset all calendar attributes of JSmith to the default configuration settings, enter the following command:
Managing Calendars This section provides examples that show how to perform administrative tasks on calendar data using the cscal utility's commands. You must run the cscal utility on the local machine where the Calendar Server is installed.
-n exampleA specifies that exampleA is the viewable name of the calendar.
-o JSmith specifies the USERID of the primary owner.
-r public specifies that the calendar can be read by anyone. Write access is still private (the default setting), which means that only the owners (primary owner and other owners, if any) can make updates to the calendar.
-calA is the suffix that will be used as part of the calendar's CALID (for example, JSmith.calA).
-y RJones specifies that this user an other owner of the calendar.
-g sports specifies that the calendar is associated with a category called sports.
The following example deletes all calendars whose primary owner is JSmith:
Enabling a Calendar Use the cscal utility's enable command to allow users to access a calendar. For example, to enable calendarA using the default configuration settings, enter the following command:
The following command enables all calendars owned by JSmith:
Disabling a Calendar User Use the cscal utility's disable command to prevent users from accessing one or more calendars. The disable command prohibits users from accessing the calendar's data, but does not remove its information from the calendar database.
To prevent users from accessing all calendars whose primary owner is JSmith, enter the following command:
Modifying Calendar Properties Use the cscal utility's modify command to change the properties of a calendar. For example, to specify that RJones is an other owner of calendarA and make it readable only by the owners, enter the following command:
-y RJones specifies this USERID is an additional owner.
-r private specifies that the calendar is not publicly viewable (can be seen by the owners only).
To remove a property value, specify two double quotes ("") as the value of the property option using the modify command.
To remove all categories from calendarA:
To remove other owners from calendarA:
Displaying Calendars Use the cscal utility's list command to list all calendars, all calendars owned by a user, or all properties of a specific calendar. For example, to list all calendars in the calendar database, enter the following command:
To list all calendars owned by JSmith, enter:
To list all the properties of a calendar with the CALID calendarA, enter:
Resetting Calendar Properties Use the cscal utility's reset command to restore the default settings for all properties of a specified calendar or all calendars owned by a specified user. For example, to reset all the properties of calendarA to the default configuration settings, enter the following command:
To reset the attributes of all calendars whose primary owner is JSmith to the default configuration settings, enter the following command:
Managing Calendar Events and Tasks The cscomponent utility lets you:
list all events and tasks in a calendar.
delete events and tasks in a calendar.
-v specifies verbose mode which displays all information available about the events or tasks.
-s 19980101T000000Z specifies the starting date of the time period.
-e 19981231T000000Z specifies the ending date of the time period.
where specifying 0 for both start and end dates indicates the beginning and end of time.
To create a new calendar database if it was accidentally deleted, enter:
To delete the calendar database before restoring it from a backup, enter:
To attempt to recover a damaged calendar database in the current directory, enter the following command:
Importing and Exporting Calendar Data The csexport and csimport command line utilities let you export and import calendar data to a text file using ICAL or XML format.
Exporting Calendar Data Use csexport to export a calendar to a file. The file name extension (.ics or .xml) that you specify for the output file determines which format is used. For example:
To export the calendar JSmithcal in XML (text/xml MIME) format to a file named jsmith.xml, enter:
Importing Calendar Data Use csimport to import calendar data from a file previously saved using the csexport utility. The file name extension of the import file (.ics or .xml) indicates the format in which it was saved. For example:
To import data into the calendar JSmithcal from a file named jsmith.xml that was saved in XML (text/xml MIME) format, enter:
Note. If the specified CALID already exists, its data is cleared before the new data is imported.
Use csbackup to back up a specified calendar, a user's default calendar, or the calendar database.
Use csrestore to recover a specified calendar, a user's default calendar, or the calendar database.
This section includes the following topics:
To backup the calendar JSmithcal in XML (text/xml MIME) format, enter:
Restoring a Specified Calendar You can restore a specified calendar the using the csrestore utility's:
calendar command
database command
To restore the calendar JSmithcal that was saved in XML (text/calendar MIME) format to the file jsmith.xml located in the bcakupdir directory, enter:
Restoring a Calendar from a Database Use the csrestore utility's database command to restore a calendar from a database that was saved to a backup directory using the csbackup utility. For example, to restore the calendar JSmithcal from the backup database directory backupdir, enter the following command:
Backing-Up a User's Default Calendar Use the csbackup utility's defcal command to backup a user's default calendar to a plain text file using ICAL or XML format. The file name extension (.ics or .xml) that you specify for the output file determines which format is used. For example:
To backup calendar user JSmith's default calendar in XML (text/xml MIME) format to a file named jsmith.xml, enter the following command:
Restoring a User's Default Calendar Use the csrestore utility's defcal command to restore a a user's default calendar that was saved to a backup file using the csbackup utility. The file name extension (.ics or .xml) of the backup file indicates the format in which it was saved. For example:
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, enter the following command:
Backing-Up the Calendar Database Use the csbackup utility's database command to backup the calendar database to an output directory. For example, to backup the calendar database to a directory named backupdir, enter the following command:
Restoring the Calendar Database The following command line utilities let you restore the calendar database:
csrestore lets you restore a calendar database that was previously saved to a backup directory.
csdb lets you recover a calendar database that was accidently corrupted or deleted.
Use the csdb utility's recover command to recover a calendar database that was accidentally corrupted or deleted. For example, to attempt to recover a damaged calendar database in the current directory, enter the following command:
Using Solstice or Legato Software to Backup Calendar Server We recommend using the Sun Solaris Solstice Backup or the Legato file backup and restore products to backup the Calendar Server. If you do not have Solstice Backup, use the command line utilities csbackup, csdb, or csexport. See http://docs.sun.com for documentation on Solstice Backup.
backup and restore the entire database or specified calendars
recover a calendar database that was damaged or lost such as through hardware failure.
migrate data from one Calendar Server to another.
Run the command line utilities to backup the calendar database or specified calendars.
For more information, see Backup and Restore Procedures).
The backup procedure creates a backup directory under the current directory. This directory is not the actual directory calendar data is stored, but a directory image of how calendars are stored. This 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.
Start Solstice or Legato backup.
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 in iPlanet Calendar Server.
Important: The .nsr files generated by the command line utilities contain standard Networker directives and should never be modified.
Automate the backup procedure.
The preceding steps describe how to run a backup manually. It is recommended that you set up the backup program's backup command to run the Calendar Server csbackup command line utility before the running 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-ASCI characters or the forward slash (/).