1TDX-UTIL(8) InterNetNews Documentation TDX-UTIL(8)
2
3
4
6 tdx-util - Overview manipulation utility for tradindexed
7
9 tdx-util [-AFcgioO] [-a article] [-f status] [-n newsgroup] [-p path]
10 [-R path]
11
13 tdx-util is an administrative interface to the tradindexed overview
14 method for INN. It only works on tradindexed overview databases, not
15 on any other type of INN overview. (See dedicated ovdb_stat(8) and
16 ovsqlite-util(8) programs for ovdb and ovqslite overview methods.) It
17 allows the administrator to dump various information about the internal
18 state of the overview, audit it for errors, and rebuild portions of the
19 overview database.
20
21 The tradindexed overview method should lock properly and therefore it
22 should be safe to run this utility and perform any operation it
23 performs, including full repairs or per-group overview rebuilds, while
24 the server is running. However, note that some of the operations
25 performed by this utility can take an extended period of time and will
26 hold locks in the overview database during that period, which depending
27 on what the server is doing may cause the server to stall until tdx-
28 util completes its operation.
29
30 The dump operations are -i, which dumps the master index for the
31 overview database, -g, which dumps the index for an individual group,
32 and -o and -O, which dump the overview information for a particular
33 group (including the additional metadata stored in the index) in two
34 different formats. For -g, -o, and -O, the -n option must also be
35 given to specify a newsgroup to operate on.
36
37 To add a new newsgroup to the overview database, use -c. A group must
38 be specified with -n. If the group status is something other than "y",
39 it should be specified with -f, and the low and high article numbers
40 may be specified with -a. If only one number is given rather than a
41 range, it will be taken to be the high water mark and the low mark will
42 be set to 1.
43
44 To audit the entire overview database for problems, use -A. Any
45 problems found will be reported to standard error. Use -F to correct
46 the errors found.
47
48 To rebuild the database for a particular newsgroup, use -R. The -R
49 option takes a path to a directory which contains all of the articles
50 for that newsgroup, one per file. The names of the files must be the
51 numbers of the articles in that group. (In other words, this directory
52 must be a traditional spool directory for that group.) The -n option
53 must also be given to specify the newsgroup for which the overview is
54 being rebuilt.
55
56 For all operations performed by tdx-util, a different overview database
57 than the one specified in inn.conf may be specified using the -p
58 option.
59
60 The number of overview records stored in the database can be obtained
61 with the "inndf -n" command.
62
64 -a article
65 The article number or numbers to act on. article is a valid NNTP
66 range, meaning that it can be either a single article number or a
67 range of article numbers (like "1-5"). Either the start or the end
68 (or both) of the range may be omitted, in which case they will be
69 set to the first or last article number in the group. Passing "-"
70 for article is therefore equivalent to not using the -a option at
71 all.
72
73 Only useful in combination with the -o and -O options to dump
74 overview information or with -c to specify the low and high article
75 numbers when creating a group.
76
77 -A Audit the entire overview database for problems. This runs the
78 internal consistency checks built into the tradindexed overview
79 implementation, checking such things as the validity and
80 reachability of all group index entries, the format of the
81 individual overview entries, the correspondence of index entries to
82 overview data, and similar such things. No changes will be made to
83 the database, but problems will be reported to standard error.
84
85 -c Create a new group in the overview database. The group must be
86 specified with -n. The newsgroup status defaults to "y" but may be
87 set with -f. The low and high article numbers default to 1 and 0
88 respectively, but may be set with -a. If only one number is given
89 to -a, it is taken as the high article number.
90
91 -F Audit the entire overview database for problems, fixing them as
92 they're detected where possible. This runs the internal
93 consistency checks built into the tradindexed overview
94 implementation, checking such things as the validity and
95 reachability of all group index entries, the format of the
96 individual overview entries, the correspondence of index entries to
97 overview data, and similar such things. The strategy used when
98 fixing problems is to throw away data that's unrecoverable, so be
99 warned that using this option may result in inaccessible articles
100 if their overview data has been corrupted.
101
102 To see what would be changed by -F, run tdx-util with -A first.
103
104 -f status
105 When creating a newsgroup with -c, set the status of the newly
106 created group to status instead of "y". Only useful with -c.
107
108 -g Dump the index of a particular group. The fields are, in order,
109 the article number, the offset of the data for that article in the
110 overview data file for that group, the length of the overview data,
111 the time (in seconds since epoch) when the article arrived on the
112 server, the time (in seconds since epoch) when the article should
113 expire based on its Expires header field (or 0 if there is no
114 Expires header field), and the storage API token of the article.
115
116 If this option is given, the -n option must also be given to
117 specify the newsgroup on which to act.
118
119 -i Dump the master index of the overview database. This contains
120 similar information to the server active file, such as high and low
121 water marks and moderation status, and is the information that
122 nnrpd hands out to clients.
123
124 The fields are, in order, the newsgroup name, the high water mark,
125 the low water mark, the base article number (the point at which the
126 group index begins), the count of articles in the group, the group
127 status, the time (in seconds since epoch) when that newsgroup was
128 deleted or 0 if it hasn't been, and the inode of the index file for
129 that group.
130
131 A particular newsgroup can be specified with the -n option. If -n
132 is not given, the entire master index will be dumped.
133
134 -n newsgroup
135 Specify the newsgroup on which to act, required for the -c, -g, -o,
136 -O, and -R options, and optional for the -i option.
137
138 -o Dump the overview information for a newsgroup, in the same format
139 as it would be returned to clients but with one modification.
140 Appended to the end of each entry will be four additional pieces of
141 data: the article number according to the index file for that group
142 labelled with "Article:", the storage API token for that article
143 labelled with "Token:", the arrival date for that article on the
144 server in RFC 5322 date format labelled with "Arrived:", and the
145 expiration date for that article (from the Expires header field) in
146 RFC 5322 date format if there is any, labelled with "Expires:".
147
148 If this option is given, the -n option must also be given to
149 specify the newsgroup on which to act. By default, all of the
150 overview information for that newsgroup is dumped, but the -a
151 option may be given to restrict the dump to the information for a
152 single article or a range of article numbers.
153
154 -O Dump the overview information for a newsgroup in the format used by
155 overchan as input. Each line will start with the storage API
156 token, the arrival timestamp in seconds since epoch, the expires
157 timestamp in the same format (or 0 if there is no Expires header
158 field), and then the overview data.
159
160 If this option is given, the -n option must also be given to
161 specify the newsgroup on which to act. By default, all of the
162 overview information for that newsgroup is dumped, but the -a
163 option may be given to restrict the dump to the information for a
164 single article or a range of article numbers.
165
166 -p path
167 Act on the overview database rooted in path, overriding the
168 overview path specified in inn.conf.
169
170 -R path
171 Rebuild the overview for a given group from the articles stored in
172 path. The articles must be in the form of a traditional spool
173 directory; in other words, each article must be in a separate file
174 and the name of the file must match the article number of the
175 article.
176
177 If this option is given, the -n option must also be given to
178 specify the newsgroup on which to act.
179
181 Dump the master index for the overview database in /news/overview,
182 regardless of the overview path specified in inn.conf:
183
184 tdx-util -i -p /news/overview
185
186 Dump the group index for example.test:
187
188 tdx-util -g -n example.test
189
190 Dump the complete overview information for example.test:
191
192 tdx-util -o -n example.test
193
194 Dump the overview information for articles 45 and higher in
195 example.test:
196
197 tdx-util -o -n example.test -a 45-
198
199 Create an entry for example.test with mode m and low and high article
200 numbers of 4 and 23, respectively.
201
202 tdx-util -c -n example.test -f m -a 4-23
203
204 Audit the entire overview database for any problems:
205
206 tdx-util -A
207
208 Rebuild the overview information for example.test from a traditional
209 spool directory:
210
211 tdx-util -R <patharticles in inn.conf>/example/test -n example.test
212
213 The last command may be useful for recovering from a bad crash or
214 corrupted overview information for a particular group, if you are also
215 using the tradspool article storage method.
216
218 Written by Russ Allbery <eagle@eyrie.org> for InterNetNews.
219
221 inndf(8), makehistory(8), nnrpd(8).
222
223
224
225INN 2.7.1 2023-03-19 TDX-UTIL(8)