### Berkeley DB Reference Guide: Architecture |

# Supporting utilities

There are several stand-alone utilities that provide supporting functionality for the Berkeley DB environment:

berkeley_db_svc
  The berkeley_db_svc utility is the Berkeley DB RPC server, providing standard server functionality for client. applications.

db_archive
  The db_archive utility supports database backup, archival and log file administration. It facilitates log reclamation and the creation of database snapshots. Generally, some form of log archival must be done if a database environment has been configured for logging or transactions.

db_checkpoint
  The db_checkpoint utility runs as a daemon process, monitoring the database log and periodically issuing checkpoints. It facilitates log reclamation and the creation of database snapshots. Generally, some form of database checkpointing must be done if a database environment has been configured for transactions.

db_deadlock
  The db_deadlock utility runs as a daemon process, periodically traversing the database lock structures and aborting transactions when it detects a deadlock. Generally, some form of deadlock detection must be done if a database environment has been configured for locking.

db_dump
  The db_dump utility writes a copy of the database to a flat-text file in a portable format.

db_load
  The db_load utility reads the flat-text file produced by db_dump and loads it into a database file.

db_printlog
  The db_printlog utility displays the contents of Berkeley DB log files in a human-readable and parseable format.

db_recover
  The db_recover utility runs after an unexpected Berkeley DB or system failure to restore the database to a consistent state. Generally, some form of database recovery must be done if databases are being modified.

db_stat
  The db_stat utility displays statistics for databases and database environments.

db_upgrade
  The db_upgrade utility provides a command-line interface for upgrading underlying database formats.

db_verify
  The db_verify utility provides a command-line interface for verifying the database format.

All of the functionality implemented for these utilities is also available as part of the standard Berkeley DB API. This means that threaded applications can easily create a thread that calls the same Berkeley DB functions as do the utilities. This often simplifies an application environment by removing the necessity for multiple processes to negotiate database and database environment creation and shutdown.

Copyright Sleepycat Software