1MAKEHISTORY(8)            InterNetNews Documentation            MAKEHISTORY(8)
2
3
4

NAME

6       makehistory - Initialize or rebuild INN history database
7

SYNOPSIS

9       makehistory [-abeFIOx] [-f filename] [-l count] [-T tmpdir] [-s size]
10

DESCRIPTION

12       makehistory rebuilds the history(5) text file, which contains a list of
13       Message-IDs of articles already seen by the server.  It can also be
14       used to rebuild the overview database.  Note that the dbz(3) indexes
15       for the history file are rebuilt by makedbz(8), not by makehistory as
16       in earlier versions of INN.
17
18       The default location of the history text file is pathdb/history; to
19       specify an alternate location, use the -f flag.
20
21       By default, makehistory will scan the entire spool, using the storage
22       manager, and write a history line for every article.  To also generate
23       overview information, use the -O flag.
24
25       WARNING: If you're trying to rebuild the overview database, be sure to
26       stop innd(8) and delete or zero out the existing database before you
27       start for the best results.  An overview rebuild should not be done
28       while the server is running.  Unless the existing overview is deleted,
29       you may end up with problems like out-of-order overview entries, exces‐
30       sively large overview buffers, and the like.
31
32       If ovmethod in inn.conf is "ovdb", you must have the ovdb processes
33       running while rebuilding overview.  ovdb needs them available while
34       writing overview entries.  You can start them by hand separate from the
35       rest of the server by running ovdb_init; see ovdb_init(8) for more
36       details.
37

OPTIONS

39       -a  Append to the history file rather than generating a new one.  If
40           you append to the main history file, make sure innd(8) is throttled
41           or not running, or you can corrupt the history.
42
43       -b  Delete any messages found in the spool that do not have valid Mes‐
44           sage-ID headers in them.
45
46       -e  Compute Bytes headers which is used for overview data.  This option
47           is valid only if -O flag is specified and overview.fmt includes
48           "Bytes:".
49
50       -f filename
51           Rather than writing directly to pathdb/history, instead write to
52           filename.
53
54       -F  Fork a separate process to flush overview data to disk rather than
55           doing it directly.  The advantage of this is that it allows make‐
56           history to continue to collect more data from the spool while the
57           first batch of data is being written to the overview database.  The
58           disadvantage is that up to twice as much temporary disk space will
59           be used for the generated overview data.  This option only makes
60           sense in combination with -O.  With "buffindexed", the "overchan"
61           program is invoked to write overview.
62
63       -I  Don't store overview data for articles numbered lower than the low‐
64           est article number in active.  This is useful if there are for
65           whatever reason old articles on disk that shouldn't be available to
66           readers or put into the overview database.
67
68       -l count
69           This option specifies how many articles to process before writing
70           the accumulated overview information out to the overview database.
71           The default is 10000.  Since overview write performance is faster
72           with sorted data, each "batch" gets sorted.  Increasing the batch
73           size with this option may further improve write performance, at the
74           cost of longer sort times.  Also, temporary space will be needed to
75           store the overview batches.  At a rough estimate, about 300 * count
76           bytes of temporary space will be required (not counting temp files
77           created by sort(1)).  See the description of the -T option for how
78           to specify the temporary storage location.  This option has no
79           effect with "buffindexed", because "buffindexed" does not need
80           sorted overview and no batching is done.
81
82       -s size
83           Size the history database for approximately size pairs.  Accurately
84           specifying the size is an optimization that will create a more
85           efficient database.  (The size should be the estimated eventual
86           size of the history file, typically the size of the old file, in
87           lines.)
88
89       -O  Create the overview database as well as the history file.  Overview
90           information is only required if the server supports readers; it is
91           not needed for a transit-only server (see enableoverview in
92           inn.conf(5)).  If you are using the "buffindexed" overview storage
93           method, erase all of your overview buffers before running makehis‐
94           tory with -O.
95
96       -T tmpdir
97           If -O is given, makehistory needs a location to write temporary
98           overview data.  By default, it uses pathtmp, set in inn.conf, but
99           if this option is given, the provided tmpdir is used instead.  This
100           is also used for temporary files created by sort(1) (which is
101           invoked in the process of writing overview information since sorted
102           overview information writes faster).  By default, sort usually uses
103           your system temporary directory; see the sort(1) man page on your
104           system to be sure.
105
106       -x  If this option is given, makehistory won't write out history file
107           entries.  This is useful mostly for building overview without gen‐
108           erating a new history file.
109

EXAMPLES

111       Here's a typical example of rebuilding the entire history and overview
112       database, removing broken articles in the news spool.  This uses the
113       default temporary file locations and should be done while innd isn't
114       running (or is throttled).
115
116           makehistory -b -f history.n -O -l 30000 -I
117
118       This will rebuild the overview (if using "buffindexed", erase the
119       existing overview buffers before running this command) and leave a new
120       history file as "history.n" in pathdb.  To preserve all of the history
121       entries from the old history file that correspond to rejected articles
122       or expired articles, follow the above command with:
123
124           cd /usr/local/news/db
125           awk 'NF == 2 { print }' < history >> history.n
126
127       (replacing the path with your pathdb, if it isn't the default).  Then
128       look over the new history file for problems and run:
129
130           makedbz -s `wc -l < history` -f history.n
131
132       Then rename all of the files matching "history.n.*" to "history.*",
133       replacing the current history database and indexes.  After that, it's
134       safe to unthrottle innd.
135
136       For a simpler example:
137
138           makehistory -b -f history.n -I -O
139
140       will scan the spool, removing broken articles and generating history
141       and overview entries for articles missing from history.
142
143       To just rebuild overview:
144
145           makehistory -O -x -F
146

FILES

148       inn.conf
149           Read for pathdb, pathtmp, and other settings.
150
151       pathdb/history
152           This is the default output file for makehistory.
153
154       pathtmp
155           Where temporary files are written unless -T is given.
156

HISTORY

158       Originally written by Rich $alz <rsalz@uunet.uu.net> for InterNetNews
159       and updated by various other people since.
160
161       $Id: makehistory.8 6400 2003-07-12 19:26:58Z rra $
162

SEE ALSO

164       dbz(3), active(5), history(5), inn.conf(5), ctlinnd(8), innd(8),
165       makedbz(8), ovdb_init(8), overview.fmt(5).
166
167
168
169INN 2.4.1                         2003-07-05                    MAKEHISTORY(8)
Impressum