1OVDB_INIT(8) InterNetNews Documentation OVDB_INIT(8)
2
3
4
6 ovdb_init - Prepare ovdb database for use
7
9 ovdb_init [-r|-u]
10
12 This command must be run before any other process can access the
13 overview database. ovdb_init is normally invoked automatically by
14 rc.news when starting the news system.
15
16 ovdb_init performs the following steps:
17
18 1. Creates the database environment, if necessary.
19
20 2. If the database is idle (and if the -u option is not specified), it
21 performs a normal recovery. The recovery will remove stale locks,
22 recreate the memory pool cache, and repair any damage caused by a
23 system crash or improper shutdown.
24
25 3. If the -u option is specified, it performs any necessary upgrades
26 to the database. See the "UPGRADING" section below.
27
28 4. Starts the database housekeeping processes (ovdb_monitor) if they
29 are not already running. (Unless the -r option is specified.)
30
31 5. Starts the ovdb readserver processes (ovdb_server) if readserver in
32 ovdb.conf is true, and if they are not already running. (Unless
33 the -r option is specified.)
34
35 Returns exit status of 0 if all steps were completed successfully. In
36 the event of an error, messages are written to syslog and/or stderr.
37
38 If a recovery was attempted but failed, the database may be damaged
39 beyond repair, requiring a rebuild with makehistory.
40
41 This command can be run multiple times.
42
44 -r Perform recovery only. ovdb_monitor is not started.
45
46 -u Perform any needed upgrades. Recovery is not attempted.
47 ovdb_monitor is started if the upgrade succeeded.
48
49 This option can be used even if no upgrades are needed.
50
52 There are two situations in which the database will need to be
53 upgraded:
54
55 • You upgrade the Berkeley DB library to a newer version, for example
56 from 2.7.7 to 3.1.17. In this case, the Berkeley DB
57 "db->upgrade()" method is used.
58
59 • You upgrade ovdb to a newer major version; i.e., ovdb-1.0 (shipped
60 with INN 2.3.0 up to INN 2.3.5) to ovdb-2.0 (since INN 2.4.0).
61
62 In both of these cases, the database is upgraded in-place; and the
63 upgrade cannot be undone. Do not interrupt the upgrade process once it
64 has started, because there is a risk of irreparable corruption. The
65 upgrade may take several minutes to complete. If an upgrade does get
66 interrupted, try running the upgrade again.
67
68 Here's an example procedure to upgrade a database created with
69 Berkeley DB 2.7.7 to use Berkeley DB 3.1.17:
70
71 1. Build and install the Berkeley DB 3.1.17 version;
72
73 2. Run configure in the INN source tree and make sure it picks up the
74 right Berkeley DB directory (e.g., /usr/local/BerkeleyDB.3.1);
75
76 3. Do a "make";
77
78 4. Shut down INN (e.g., with "rc.news stop") and be sure to kill all
79 instances of nnrpd as well;
80
81 5. Do a "make update" to install the new binaries;
82
83 6. Run "ovdb_init -u" as the news user;
84
85 7. Start INN with the "rc.news" command.
86
88 Written by Heath Kehoe <hakehoe@avalon.net> for InterNetNews.
89
91 ovdb(5), makehistory(8), rc.news(8).
92
93
94
95INN 2.7.1 2023-03-07 OVDB_INIT(8)