ckpdb(1sql)
Name
ckpdb − checkpoint (back up) a database.
Syntax
ckpdb [options] dbname...
Description
The ckpdb command creates a checkpoint (static backup) for each database specified and marks all journal entries that precede this checkpoint as expired. (Journal entries that precede a checkpoint are no longer needed because the entries record transactions that are included in the checkpoint.) If you wish, you can write the checkpoint to a tape device rather than to disk (the default). If you do not specify dbname, you can create checkpoints for all databases that you created (for which you are the database administrator). If the ULTRIX/SQL system administrator uses the −s option, new checkpoints for all databases in the ULTRIX/SQL system can be created.
Options
Command line options have the following interpretations:
−dDestroy the most recently expired checkpoint and journal files.
+j|−jEnable/disable journaling for a database. If you specify neither +j nor −j, then the current status of journaling for the database as a whole is maintained.
−mdevice
Store the new checkpoint on the specified tape device rather than on disk.
−sInvoke ULTRIX/SQL superuser (system administrator) status for system-wide access to any database. You must be the ULTRIX/SQL system administrator to use the −s option.
−uusername
Execute the ckpdb command on specified (all, if dbname not specified) databases owned by username.
+w|−w
Wait/do not wait for the database to be available. The default is −w. The ckpdb command locks the database because errors can occur if the database is active while the ckpdb command is running. If a database is busy and −w applies, the ckpdb command reports this fact and proceeds to the next database specified, if any. If the database is busy and +w applies, the ckpdb command waits until the database is available and then creates the checkpoint. You can apply the +w option only when standard input is from the terminal. In other words, you cannot apply the +w option to batch jobs.
Restrictions
Only the database administrator, defined as the user who created the database, or the ULTRIX/SQL system administrator (if the −s flag is specified) can run the ckpdb command on a database.
You can write only one checkpoint per tape.
Examples
Checkpoint the employees database and initiate journaling on employees:
ckpdb +j employees
Checkpoint all databases for which you are the database administrator, retaining only the newest checkpoints:
ckpdb -d
Checkpoint the employees database to tape:
ckpdb -m/dev/rmt0h employees
Files
$II_DATABASE/ingres/data/default/dbname
Default location for database files associated with dbname. The default location ii_database is mapped to this directory.
$II_CHECKPOINT/ingres/ckp/default/dbname
Default location for checkpoints associated with dbname. The default location ii_checkpoint is mapped to this directory.
$II_JOURNAL/ingres/jnl/default/dbname
Default location for journal files associated with dbname. The default location ii_checkpoint is mapped to this directory.
See Also
ULTRIX/SQL Database Administrator’s Guide