Sun Java System Calendar Server 6 2005Q4 Administration Guide

csdb

The csdb utility manages the calendar databases (calendar, session, and statistics). Commands are:

Requirements

Syntax


csdb [-q|-v] 
     [-t caldb|sessdb|statdb] 
     create|delete [dbdir]

csdb [-q|-v] 
     [-t caldb|sessdb|statdb] 
     list [dbdir]

csdb [-q|-v] 
     [-f] 
     [-t caldb|sessdb|statdb] 
     recover [dbdir]

csdb check [dbdir]

csdb rebuild [-a, -V] 
     [-g] [dbdir [dstdir]]

The following table describes the commands available for the csdb utility.

Table D–11 csdb Utility Commands

Command 

Description  

create [dbdir]

Creates the databases in the specified database directory. If a database directory is not specified, the current directory is used. If a database does not exist when the server is started, Calendar Server creates one automatically. 

delete [dbdir]

Deletes the databases in the specified database directory. If a database directory is not specified, the current directory is used. A database cannot be deleted while it is open (when Calendar Server is running). 

list [dbdir]

Lists information about the databases in the specified database directory. If a database directory is not specified, the current directory is used. 

recover [dbdir]

Attempts to recover damaged calendar databases in the specified database directory. If a database directory is not specified, the current directory is used. Is not implemented for session or statistics databases. 

check [dbdir]

Scans a calendar database in the specified database directory to determine if any corruption has occurred and reports the results in its output. If a database directory is not specified, the current directory is used. 

rebuild [dbdir [dstdir]]

Scans all calendar databases in the specified database directory to determine if any corruption has occurred and generates a rebuilt calendar database (.db files). If a database directory is not specified, the current directory is used. After the databases are rebuilt, db_verify runs.

The dstdir specifies an optional destination directory.

version

Displays the version of the utility. 

The following table describes the csdb utility command options.

Table D–12 csdb Utility Command Options

Option  

Description  

-a

For rebuild command only, rebuilds only the alarms database.

-V

Must be passed in with -a for rebuilding the alarms database. Causes verify to be run against all databases, including alarms.

-v

Run in verbose mode: Display all available information about the command being performed. Default is off. 

-q

Run in quiet mode: 

  • Display no information if the operation is successful (errors, if they occur, are displayed).

  • Suppress confirmation prompting for dangerous commands.

    Default is off.

-f

Force the recovery of the calendar database. 

-g

For the rebuild command, rebuild the group scheduling engine (GSE) database in addition to the other calendar databases.

-t caldb|sessdb|statdb

Specifies the target database group: 

  • caldb (calendar)

  • sessdb (session)

  • statdb (statistics)

    Note: If -t is not specified, csdb operates on all database groups, except for the check, recover and rebuild commands, which operate only on caldb (calendar).

Examples