1MAKEHISTORY(8) InterNetNews Documentation MAKEHISTORY(8)
2
3
4
6 makehistory - Initialize or rebuild INN history database
7
9 makehistory [-abFIOSx] [-f filename] [-l count] [-L load-average] [-s
10 size] [-T tmpdir]
11
13 makehistory rebuilds the history(5) text file, which contains a list of
14 message-IDs of articles already seen by the server. It can also be
15 used to rebuild the overview database. Note that even though the
16 dbz(3) indices for the history file are also rebuilt by makehistory, it
17 is useful to run makedbz(8) after makehistory(8) in order to improve
18 the efficiency of the indices (makehistory does not know how large to
19 make the hash table at first run, unless the size is given by the -s
20 flag).
21
22 The default location of the history text file is pathdb/history; to
23 specify an alternate location, use the -f flag.
24
25 By default, makehistory will scan the entire spool, using the storage
26 manager, and write a history line for every article. To also generate
27 overview information, use the -O flag.
28
29 WARNING: If you're trying to rebuild the overview database, be sure to
30 stop innd(8) and delete or zero out the existing database before you
31 start for the best results. An overview rebuild should not be done
32 while the server is running. Unless the existing overview is deleted,
33 you may end up with problems like out-of-order overview entries,
34 excessively large overview buffers, and the like.
35
36 If ovmethod in inn.conf is "ovdb", you must have the ovdb processes
37 running while rebuilding overview. ovdb needs them available while
38 writing overview entries. You can start them by hand separate from the
39 rest of the server by running ovdb_init; see ovdb_init(8) for more
40 details.
41
43 -a Append to the history file rather than generating a new one. If
44 you append to the main history file, make sure innd(8) is throttled
45 or not running, or you can corrupt the history.
46
47 -b Delete any messages found in the spool that do not have valid
48 Message-ID: headers in them.
49
50 -F Fork a separate process to flush overview data to disk rather than
51 doing it directly. The advantage of this is that it allows
52 makehistory to continue to collect more data from the spool while
53 the first batch of data is being written to the overview database.
54 The disadvantage is that up to twice as much temporary disk space
55 will be used for the generated overview data. This option only
56 makes sense in combination with -O. With buffindexed, the overchan
57 program is invoked to write overview.
58
59 -f filename
60 Rather than writing directly to pathdb/history, instead write to
61 filename, also in pathdb.
62
63 -I Don't store overview data for articles numbered lower than the
64 lowest 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 sorted
80 overview and no batching is done.
81
82 -L load-average
83 Temporarily pause activities if the system load average exceeds the
84 specified level load-average. This allows makehistory to run on a
85 system being used for other purposes without monopolizing system
86 resources and thus making the response time for other applications
87 unacceptably slow. Using nice(1) does not help much for that
88 because the problem comes from disk I/O usage, and ionice(1) is not
89 always available or efficient.
90
91 -O Create the overview database as well as the history file. Overview
92 information is only required if the server supports readers; it is
93 not needed for a transit-only server (see enableoverview in
94 inn.conf(5)). If you are using the buffindexed overview storage
95 method, erase all of your overview buffers before running
96 makehistory with -O.
97
98 -S Rather than storing the overview data into the overview database,
99 just write it to standard output in a form suitable for feeding to
100 overchan later if wished. When this option is used, -F, -I, -l,
101 and -T are ignored. This option only makes sense in combination
102 with -O.
103
104 -s size
105 Size the history database for approximately size pairs. Accurately
106 specifying the size is an optimization that will create a more
107 efficient database. (The size should be the estimated eventual
108 size of the history file, typically the size of the old file, in
109 lines.)
110
111 -T tmpdir
112 If -O is given, makehistory needs a location to write temporary
113 overview data. By default, it uses pathtmp, set in inn.conf, but
114 if this option is given, the provided tmpdir is used instead. This
115 is also used for temporary files created by sort(1) (which is
116 invoked in the process of writing overview information since sorted
117 overview information writes faster). By default, sort usually uses
118 your system temporary directory; see the sort(1) man page on your
119 system to be sure.
120
121 -x If this option is given, makehistory won't write out history file
122 entries. This is useful mostly for building overview without
123 generating a new history file.
124
126 Here's a typical example of rebuilding the entire history and overview
127 database, removing broken articles in the news spool. This uses the
128 default temporary file locations and should be done while innd isn't
129 running (or is throttled).
130
131 makehistory -b -f history.n -O -l 30000 -I
132
133 This will rebuild the overview (if using buffindexed, erase the
134 existing overview buffers before running this command) and leave a new
135 history file as "history.n" in pathdb. To preserve all of the history
136 entries from the old history file that correspond to rejected articles
137 or expired articles, follow the above command with:
138
139 cd <pathdb>
140 awk 'NF == 2 { print }' < history >> history.n
141
142 (replacing the path with your pathdb, if it isn't the default). Then
143 look over the new history file for problems and run:
144
145 makedbz -s `wc -l < history.n` -f history.n
146
147 Then rename all of the files matching "history.n.*" to "history.*",
148 replacing the current history database and indices. After that, it's
149 safe to unthrottle innd.
150
151 For a simpler example:
152
153 makehistory -b -f history.n -I -O
154
155 will scan the spool, removing broken articles and generating history
156 and overview entries for articles missing from history.
157
158 To just rebuild overview:
159
160 makehistory -O -x -F
161
163 pathdb/history
164 This is the default output file for makehistory.
165
166 pathtmp
167 Where temporary files are written unless -T is given.
168
170 Originally written by Rich $alz <rsalz@uunet.uu.net> for InterNetNews
171 and updated by various other people since.
172
173 $Id: makehistory.pod 8534 2009-06-23 18:08:14Z iulius $
174
176 active(5), ctlinnd(8), dbz(3), history(5), inn.conf(5), innd(8),
177 makedbz(8), ovdb_init(8), overchan(8).
178
179
180
181INN 2.6.3 2015-09-12 MAKEHISTORY(8)