.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35) .\" .\" 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 .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . 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 .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "TDX-UTIL 8" .TH TDX-UTIL 8 "2015-09-12" "INN 2.6.4" "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 \- Tradindexed overview manipulation utility .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 \s-1INN.\s0 It only works on tradindexed overview databases, not on any other type of \s-1INN\s0 overview. 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. .SH "OPTIONS" .IX Header "OPTIONS" .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\-a\fR \fIarticle\fR" 4 .IX Item "-a article" The article number or numbers to act on. \fIarticle\fR is a valid \s-1NNTP\s0 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 option to dump overview information or with \fB\-c\fR to specify the low and high article numbers when creating a group. .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 (or 0 if there is no Expires: header), and the storage \s-1API\s0 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\-i\fR, \fB\-o\fR, and \&\fB\-R\fR options. .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 \s-1API\s0 token, the arrival timestamp in seconds since epoch, the expires timestamp in the same format (or 0 if there is no Expires: header), 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. .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 \s-1API\s0 token for that article labelled with \&\f(CW\*(C`Token:\*(C'\fR, the arrival date for that article on the server in \s-1RFC\s0\ 5322 date format labelled with \f(CW\*(C`Arrived:\*(C'\fR, and the expiration date for that article (from the Expires: header) in \s-1RFC\s0\ 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. .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. .PP \&\f(CW$Id:\fR tdx\-util.pod 9767 2014\-12\-07 21:13:43Z iulius $ .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBmakehistory\fR\|(8), \fBnnrpd\fR\|(8).