ovdb_init

(Prepare ovdb database for use)

SYNOPSIS

ovdb_init [-r|-u]

DESCRIPTION

This command must be run before any other process can access the overview database. ovdb_init is normally invoked automatically by rc.news when starting the news system.

ovdb_init performs the following steps:

  1. Creates the database environment, if necessary.

  2. If the database is idle (and if the -u option is not specified), it performs a normal recovery. The recovery will remove stale locks, recreate the memory pool cache, and repair any damage caused by a system crash or improper shutdown.

  3. If the -u option is specified, it performs any necessary upgrades to the database. See the UPGRADING section below.

  4. Starts the database housekeeping processes (ovdb_monitor) if they are not already running. (Unless the -r option is specified.)

  5. Starts the ovdb readserver processes (ovdb_server) if readserver in ovdb.conf is true, and if they are not already running. (Unless the -r option is specified.)

Returns exit status of 0 if all steps were completed successfully. In the event of an error, messages are written to syslog and/or stderr.

If a recovery was attempted but failed, the database may be damaged beyond repair, requiring a rebuild with makehistory.

This command can be run multiple times.

OPTIONS

-r

Perform recovery only. ovdb_monitor is not started.

-u

Perform any needed upgrades. Recovery is not attempted. ovdb_monitor is started if the upgrade succeeded.

This option can be used even if no upgrades are needed.

UPGRADING

There are two situations in which the database will need to be upgraded:

In both of these cases, the database is upgraded in-place; and the upgrade cannot be undone. Do not interrupt the upgrade process once it has started, because there is a risk of irrepairable corruption. The upgrade may take several minutes to complete. If an upgrade does get interrupted, try running the upgrade again.

Here's an example procedure to upgrade a database created with Berkeley DB 2.7.7 to use Berkeley DB 3.1.17:

  1. Build and install the Berkeley DB 3.1.17 version;

  2. Run configure in the INN source tree and make sure it picks up the right Berkeley DB directory (e.g., /usr/local/BerkeleyDB.3.1);

  3. Do a make;

  4. Shut down INN (e.g., with rc.news stop) and be sure to kill all instances of nnrpd as well;

  5. Do a make update to install the new binaries;

  6. Run ovdb_init -u as the news user;

  7. Start INN with the rc.news command.

HISTORY

Written by Heath Kehoe <hakehoe@avalon.net> for InterNetNews.

$Id: ovdb_init.pod 10462 2020-12-23 22:45:44Z iulius $

SEE ALSO

ovdb(5), makehistory(8), rc.news(8).

Last spun 2020-12-24 from POD modified 2020-12-23