.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "TDX-UTIL 8" .TH TDX-UTIL 8 2024-04-01 "INN 2.7.2" "InterNetNews Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME tdx\-util \- Overview manipulation utility for tradindexed .SH SYNOPSIS .IX Header "SYNOPSIS" \&\fBtdx-util\fR [\fB\-AFcgioO\fR] [\fB\-a\fR \fIarticle\fR] [\fB\-f\fR \fIstatus\fR] [\fB\-n\fR \fInewsgroup\fR] [\fB\-p\fR \fIpath\fR] [\fB\-R\fR \fIpath\fR] .SH DESCRIPTION .IX Header "DESCRIPTION" \&\fBtdx-util\fR is an administrative interface to the tradindexed overview method for INN. It only works on tradindexed overview databases, not on any other type of INN overview. (See dedicated ovdb_stat(8) and ovsqlite\-util(8) programs for ovdb and ovqslite overview methods.) It allows the administrator to dump various information about the internal state of the overview, audit it for errors, and rebuild portions of the overview database. .PP The tradindexed overview method should lock properly and therefore it should be safe to run this utility and perform any operation it performs, including full repairs or per-group overview rebuilds, while the server is running. However, note that some of the operations performed by this utility can take an extended period of time and will hold locks in the overview database during that period, which depending on what the server is doing may cause the server to stall until \fBtdx-util\fR completes its operation. .PP The dump operations are \fB\-i\fR, which dumps the master index for the overview database, \fB\-g\fR, which dumps the index for an individual group, and \fB\-o\fR and \fB\-O\fR, which dump the overview information for a particular group (including the additional metadata stored in the index) in two different formats. For \fB\-g\fR, \fB\-o\fR, and \fB\-O\fR, the \fB\-n\fR option must also be given to specify a newsgroup to operate on. .PP To add a new newsgroup to the overview database, use \fB\-c\fR. A group must be specified with \fB\-n\fR. If the group status is something other than \f(CW\*(C`y\*(C'\fR, it should be specified with \fB\-f\fR, and the low and high article numbers may be specified with \fB\-a\fR. If only one number is given rather than a range, it will be taken to be the high water mark and the low mark will be set to 1. .PP To audit the entire overview database for problems, use \fB\-A\fR. Any problems found will be reported to standard error. Use \fB\-F\fR to correct the errors found. .PP To rebuild the database for a particular newsgroup, use \fB\-R\fR. The \fB\-R\fR option takes a path to a directory which contains all of the articles for that newsgroup, one per file. The names of the files must be the numbers of the articles in that group. (In other words, this directory must be a traditional spool directory for that group.) The \fB\-n\fR option must also be given to specify the newsgroup for which the overview is being rebuilt. .PP For all operations performed by \fBtdx-util\fR, a different overview database than the one specified in \fIinn.conf\fR may be specified using the \fB\-p\fR option. .PP The number of overview records stored in the database can be obtained with the \&\f(CW\*(C`inndf \-n\*(C'\fR command. .SH OPTIONS .IX Header "OPTIONS" .IP "\fB\-a\fR \fIarticle\fR" 4 .IX Item "-a article" The article number or numbers to act on. \fIarticle\fR is a valid NNTP range, meaning that it can be either a single article number or a range of article numbers (like \f(CW\*(C`1\-5\*(C'\fR). Either the start or the end (or both) of the range may be omitted, in which case they will be set to the first or last article number in the group. Passing \f(CW\*(C`\-\*(C'\fR for \fIarticle\fR is therefore equivalent to not using the \fB\-a\fR option at all. .Sp Only useful in combination with the \fB\-o\fR and \fB\-O\fR options to dump overview information or with \fB\-c\fR to specify the low and high article numbers when creating a group. .IP \fB\-A\fR 4 .IX Item "-A" Audit the entire overview database for problems. This runs the internal consistency checks built into the tradindexed overview implementation, checking such things as the validity and reachability of all group index entries, the format of the individual overview entries, the correspondence of index entries to overview data, and similar such things. No changes will be made to the database, but problems will be reported to standard error. .IP \fB\-c\fR 4 .IX Item "-c" Create a new group in the overview database. The group must be specified with \fB\-n\fR. The newsgroup status defaults to \f(CW\*(C`y\*(C'\fR but may be set with \&\fB\-f\fR. The low and high article numbers default to 1 and 0 respectively, but may be set with \fB\-a\fR. If only one number is given to \fB\-a\fR, it is taken as the high article number. .IP \fB\-F\fR 4 .IX Item "-F" Audit the entire overview database for problems, fixing them as they're detected where possible. This runs the internal consistency checks built into the tradindexed overview implementation, checking such things as the validity and reachability of all group index entries, the format of the individual overview entries, the correspondence of index entries to overview data, and similar such things. The strategy used when fixing problems is to throw away data that's unrecoverable, so be warned that using this option may result in inaccessible articles if their overview data has been corrupted. .Sp To see what would be changed by \fB\-F\fR, run \fBtdx-util\fR with \fB\-A\fR first. .IP "\fB\-f\fR \fIstatus\fR" 4 .IX Item "-f status" When creating a newsgroup with \fB\-c\fR, set the status of the newly created group to \fIstatus\fR instead of \f(CW\*(C`y\*(C'\fR. Only useful with \fB\-c\fR. .IP \fB\-g\fR 4 .IX Item "-g" Dump the index of a particular group. The fields are, in order, the article number, the offset of the data for that article in the overview data file for that group, the length of the overview data, the time (in seconds since epoch) when the article arrived on the server, the time (in seconds since epoch) when the article should expire based on its Expires header field (or 0 if there is no Expires header field), and the storage API token of the article. .Sp If this option is given, the \fB\-n\fR option must also be given to specify the newsgroup on which to act. .IP \fB\-i\fR 4 .IX Item "-i" Dump the master index of the overview database. This contains similar information to the server \fIactive\fR file, such as high and low water marks and moderation status, and is the information that \fBnnrpd\fR hands out to clients. .Sp The fields are, in order, the newsgroup name, the high water mark, the low water mark, the base article number (the point at which the group index begins), the count of articles in the group, the group status, the time (in seconds since epoch) when that newsgroup was deleted or 0 if it hasn't been, and the inode of the index file for that group. .Sp A particular newsgroup can be specified with the \fB\-n\fR option. If \fB\-n\fR is not given, the entire master index will be dumped. .IP "\fB\-n\fR \fInewsgroup\fR" 4 .IX Item "-n newsgroup" Specify the newsgroup on which to act, required for the \fB\-c\fR, \fB\-g\fR, \fB\-o\fR, \&\fB\-O\fR, and \fB\-R\fR options, and optional for the \fB\-i\fR option. .IP \fB\-o\fR 4 .IX Item "-o" Dump the overview information for a newsgroup, in the same format as it would be returned to clients but with one modification. Appended to the end of each entry will be four additional pieces of data: the article number according to the index file for that group labelled with \&\f(CW\*(C`Article:\*(C'\fR, the storage API token for that article labelled with \&\f(CW\*(C`Token:\*(C'\fR, the arrival date for that article on the server in RFC\ 5322 date format labelled with \f(CW\*(C`Arrived:\*(C'\fR, and the expiration date for that article (from the Expires header field) in RFC\ 5322 date format if there is any, labelled with \f(CW\*(C`Expires:\*(C'\fR. .Sp If this option is given, the \fB\-n\fR option must also be given to specify the newsgroup on which to act. By default, all of the overview information for that newsgroup is dumped, but the \fB\-a\fR option may be given to restrict the dump to the information for a single article or a range of article numbers. .IP \fB\-O\fR 4 .IX Item "-O" Dump the overview information for a newsgroup in the format used by \&\fBoverchan\fR as input. Each line will start with the storage API token, the arrival timestamp in seconds since epoch, the expires timestamp in the same format (or 0 if there is no Expires header field), and then the overview data. .Sp If this option is given, the \fB\-n\fR option must also be given to specify the newsgroup on which to act. By default, all of the overview information for that newsgroup is dumped, but the \fB\-a\fR option may be given to restrict the dump to the information for a single article or a range of article numbers. .IP "\fB\-p\fR \fIpath\fR" 4 .IX Item "-p path" Act on the overview database rooted in \fIpath\fR, overriding the overview path specified in \fIinn.conf\fR. .IP "\fB\-R\fR \fIpath\fR" 4 .IX Item "-R path" Rebuild the overview for a given group from the articles stored in \&\fIpath\fR. The articles must be in the form of a traditional spool directory; in other words, each article must be in a separate file and the name of the file must match the article number of the article. .Sp If this option is given, the \fB\-n\fR option must also be given to specify the newsgroup on which to act. .SH EXAMPLES .IX Header "EXAMPLES" Dump the master index for the overview database in \fI/news/overview\fR, regardless of the overview path specified in \fIinn.conf\fR: .PP .Vb 1 \& tdx\-util \-i \-p /news/overview .Ve .PP Dump the group index for example.test: .PP .Vb 1 \& tdx\-util \-g \-n example.test .Ve .PP Dump the complete overview information for example.test: .PP .Vb 1 \& tdx\-util \-o \-n example.test .Ve .PP Dump the overview information for articles 45 and higher in example.test: .PP .Vb 1 \& tdx\-util \-o \-n example.test \-a 45\- .Ve .PP Create an entry for example.test with mode m and low and high article numbers of 4 and 23, respectively. .PP .Vb 1 \& tdx\-util \-c \-n example.test \-f m \-a 4\-23 .Ve .PP Audit the entire overview database for any problems: .PP .Vb 1 \& tdx\-util \-A .Ve .PP Rebuild the overview information for example.test from a traditional spool directory: .PP .Vb 1 \& tdx\-util \-R /example/test \-n example.test .Ve .PP The last command may be useful for recovering from a bad crash or corrupted overview information for a particular group, if you are also using the tradspool article storage method. .SH HISTORY .IX Header "HISTORY" Written by Russ Allbery for InterNetNews. .SH "SEE ALSO" .IX Header "SEE ALSO" inndf(8), makehistory(8), nnrpd(8).