The csdb utility manages the calendar databases (calendar, session, and statistics). Commands are:
create a new database. (If a database does not exist when the server is started, Calendar Server creates one automatically.)
delete an existing calendar database. A database cannot be deleted while it is open (when Calendar Server is running).
list information about the database.
check a calendar database to determine if any corruption has occurred.
rebuild a corrupted calendar database.
recover a damaged calendar database.
version displays the version number of the utility currently installed.
You must run the utility locally on the machine where Calendar Server is installed.
Calendar Server must be stopped for the create, delete, or rebuild commands.
You must be logged in as the user and group under which Calendar Server is running (such as icsuser and icsgroup) that was specified during installation, or as root.
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
Create new, unpopulated databases in the current directory:
csdb -t caldb create
Delete the databases in the current directory:
csdb -t caldb delete
List information about the calendar database in the current directory:
csdb -v -t caldb list
Attempt to recover all damaged databases in the current directory:
csdb recover
List information about the sessions database in the current directory:
csdb -t sessdb list
Rebuild the alarms database only:
csdb -a -V rebuild