Sun ONE Calendar Server 6.0 Administrator's Guide |
Chapter 7
Managing the Delete Log DatabaseCalendar Server 6.0 includes the Delete Log database (ics50deletelog.db) to store deleted events and todos (tasks). In previous releases, Sun ONE Calendar Server did not maintain a database of deleted events and tasks. Users were forced to save the unique identifiers (uid) or recurrence identifiers (rid) of events or todos (tasks) to determine which components had been deleted. This limitation directly affected installations that used WCAP commands to develop a client user interface (UI).
This chapter describes:
Creation of the Delete Log DatabaseCalendar Server creates the Delete Log database (ics50deletelog.db) in the csdb directory along with the other Calendar Server database files. Calendar Server writes events and todos to the Delete Log database as follows:
When individual instances of a recurring event or task are deleted, Calendar Server writes each deleted instance of the event or task to the Delete Log database (ics50deletelog.db).
To verify deleted components in the respective events or todos database to make sure they are actually deleted, use the fetch_deletedcomponents WCAP command.
When all instances of a recurring event or todo are deleted, Calendar Server deletes the master component from the event or todo database and then writes it to the Delete Log database. A master component in the Delete Log database will contain the rrules, rdates, exrules, and exdates recurrence parameters.
Querying the Delete Log DatabaseTo return entries from the Delete Log database, use the fetch_deletedcomponents WCAP command in either Expanded Mode or Compressed Mode:
If the recurring parameter is 1, fetch_deletedcomponents returns non-recurring events and the master components for any recurring events, but it does not return individual recurring events.
If all instances in a recurring chain are deleted, the master component returns the dtstart, dtend, rrules, rdates, exrules, exdates, and uid parameters.
Also, fetch_deletedcomponents does not return master components associated with the deleted recurring instances that are still active. To return active master components, use the fetchcomponents_by_lasmod WCAP command. The fetch_deletedcomponents command should be used in conjunction with the fetchcomponents_by_lasmod command.
For more about WCAP commands, see the Sun ONE Calendar Server 6.0 Programmer's Manual.
Purging the Delete Log DatabaseCalendar Server 6.0 provides both the Automatic Purge of the Delete Log Database and the Manual Purge of the Delete Log Database.
Automatic Purge of the Delete Log Database
If you wish, you can have Calendar Server 6.0 automatically purge entries in the Delete Log database.
Table 7-1 describes the parameters in the ics.conf file that control the automatic purge.
For example, to have Calendar Server automatically purge Delete Log database entries every five minutes (600 seconds) that are more than 2 days old (172800 seconds), set parameters in Table 7-1 as follows:
service.admin.purge.deletelog="yes"
caldb.berkeleydb.purge.deletelog.interval=600
caldb.berkeleydb.purge.deletelog.beforetime=172800After you set these parameters, restart Calendar Server for the new values to take effect.
Manual Purge of the Delete Log Database
To manually purge entries in the Delete Log database (ics50deletelog.db), use the cspurge utility:
cspurge -e endtime -s starttime
where endtime and starttime specify the ending and starting times in Zulu time (also referred to as GMT or UTC).
To run cspurge on Solaris Systems, you must be logged in as the user and group under which Calendar Server is running (defaults are icsuser and icsgroup) or as root.
For example, to purge entries from July 1, 2003 through July 31, 2003:
cspurge -e 20030731T235959Z -s 20030701T120000Z
For more information, see cspurge in Chapter 11, "Calendar Server Command-Line Utilities."
Using CLI Utilities for the Delete Log DatabaseTable 7-2 lists the Calendar Server command-line utilities that support the Delete Log database (ics50deletelog.db):
For more information, including the syntax for these utilities, see Chapter 11, "Calendar Server Command-Line Utilities."