.\" Automatically generated by Pod::Man 4.14 (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 .. .\" 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 "EXPIRE 8" .TH EXPIRE 8 "2024-05-19" "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" expire \- Usenet article and history expiration program .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\fBexpire\fR [\fB\-iNnptx\fR] [\fB\-d\fR \fIdir\fR] [\fB\-f\fR \fIfile\fR] [\fB\-g\fR \fIfile\fR] [\fB\-h\fR \fIfile\fR] [\fB\-r\fR \fIreason\fR] [\fB\-s\fR \fIsize\fR] [\fB\-v\fR \fIlevel\fR] [\fB\-w\fR \fInumber\fR] [\fB\-z\fR \fIfile\fR] [\fIexpire.ctl\fR] .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\fBexpire\fR scans the \fBhistory\fR\|(5)\-format text file \fIpathdb\fR/history and uses the information recorded in it to purge itself of old news articles. Its behaviour depends on the setting of \fIgroupbaseexpiry\fR in \fIinn.conf\fR. .PP When \fIgroupbaseexpiry\fR is false, article expiration is primarily done by \&\fBexpire\fR based on the expiration rules in \fIexpire.ctl\fR that match the storage class of each article. The articles and the history entries are removed by \fBexpire\fR, and then \fBexpireover\fR does the additional cleanup of removing the overview database entries. History entries of expired articles are removed only if they are older than the number of days specified in the \&\f(CW\*(C`/remember/\*(C'\fR line in \fIexpire.ctl\fR. Articles stored using a storage method that has self-expire functionality like \s-1CNFS\s0 are by default not affected by \&\fBexpire\fR's primary behaviour (but see the \fB\-N\fR flag to disable this). .PP When \fIgroupbaseexpiry\fR is true, article expiration is primarily done by \&\fBexpireover\fR based on the expiration rules in \fIexpire.ctl\fR that match each newsgroup. Articles are removed from the news spool by \fBexpireover\fR, and then \fBexpire\fR does some additional cleanup to remove old history database entries. .PP For articles in self-expiring storage methods when \fIgroupbaseexpiry\fR is set to false in \fIinn.conf\fR and the \fB\-N\fR flag is not given, or for \fIall\fR articles when \fIgroupbaseexpiry\fR is set to true, \fIexpire.ctl\fR is ignored except the \f(CW\*(C`/remember/\*(C'\fR line; \fBexpire\fR then only probes to see if the article still exists, and purges the relevant history entries if appropriate. .PP Regardless the setting of \fIgroupbaseexpiry\fR, \fBexpireover\fR should be run along with \fBexpire\fR, usually via \fBnews.daily\fR out of cron. .PP Note that \fBexpire\fR never purges articles which do not match any entry in \fIexpire.ctl\fR. .PP Also note that if \fIgroupbaseexpiry\fR is true, the server needs an overview database in order to expire articles in storage backends that are not self-expiring. If you do not plan to have an overview database, it would then be better to only use self-expiring backends like \s-1CNFS,\s0 as the history entries will still get cleaned up by \fBexpire\fR when it detects that an article no longer exists in that backend. .SH "OPTIONS" .IX Header "OPTIONS" .IP "\fB\-d\fR \fIdir\fR" 4 .IX Item "-d dir" If the \fB\-d\fR flag is used, then the new \fIhistory\fR file and database is created in the specified directory \fIdir\fR. This is useful when the filesystem does not have sufficient space to hold both the old and new history files. When this flag is used, \fBexpire\fR leaves the server paused and creates a zero-length file named after the new history file, with an extension of \f(CW\*(C`.done\*(C'\fR to indicate that it has successfully completed the expiration. The calling script should install the new history file and unpause the server. The \fB\-r\fR flag should be used with this flag. .IP "\fB\-f\fR \fIfile\fR" 4 .IX Item "-f file" To specify an alternate history file, use the \fB\-f\fR flag. This flag is valid when used with the \fB\-d\fR flag, and the output will be written to the specified file. The default without \fB\-f\fR is \f(CW\*(C`history\*(C'\fR. .IP "\fB\-g\fR \fIfile\fR" 4 .IX Item "-g file" If the \fB\-g\fR flag is given, then a one-line summary equivalent to the output of \fB\-v 1\fR, except preceded by the current time, will be appended to the specified \fIfile\fR. .IP "\fB\-h\fR \fIfile\fR" 4 .IX Item "-h file" To specify an alternate input text history file, use the \fB\-h\fR flag. \&\fBexpire\fR uses the old \fIdbz\fR database to determine the size of the new one. (If the \fB\-d\fR flag is not used, the output filename will be the same as the input filename with an extension of \f(CW\*(C`.n\*(C'\fR.) .Sp The default without the \fB\-h\fR flag is \fIpathdb\fR/history. .IP "\fB\-i\fR" 4 .IX Item "-i" To ignore the old database, use the \fB\-i\fR flag. .IP "\fB\-N\fR" 4 .IX Item "-N" The control file is normally ignored for articles in storage methods which have self-expire functionality. If the \fB\-N\fR flag is used, \&\fBexpire\fR still uses the control file for these articles. .Sp This parameter is only useful when \fIgroupbaseexpiry\fR is set to false in \&\fIinn.conf\fR. .IP "\fB\-n\fR" 4 .IX Item "-n" If \fBinnd\fR is not running, use the \fB\-n\fR flag and \fBexpire\fR will not send the \f(CW\*(C`pause\*(C'\fR or \f(CW\*(C`go\*(C'\fR commands. (For more details on the commands, see \fBctlinnd\fR\|(8)). Note that \fBexpire\fR only needs exclusive access for a very short time \-\-\ long enough to see if any new articles arrived since it first hit the end of the file, and to rename the new files to the working files. .IP "\fB\-p\fR" 4 .IX Item "-p" \&\fBexpire\fR makes its decisions on the time the article arrived, as found in the \fIhistory\fR file. This means articles are often kept a little longer than with other expiration programs that base their decisions on the article's posting date. To use the article's posting date, use the \fB\-p\fR flag. .IP "\fB\-r\fR \fIreason\fR" 4 .IX Item "-r reason" \&\fBexpire\fR normally sends a \f(CW\*(C`pause\*(C'\fR command to the local \fBinnd\fR daemon when it needs exclusive access to the \fIhistory\fR file, using the string \&\f(CW\*(C`Expiring\*(C'\fR as the reason. To give a different reason, use the \fB\-r\fR flag. The process \s-1ID\s0 will be appended to the reason. When \fBexpire\fR is finished and the new \fIhistory\fR file is ready, it sends a \f(CW\*(C`go\*(C'\fR command. See also the \fB\-n\fR flag. .IP "\fB\-s\fR \fIsize\fR" 4 .IX Item "-s size" \&\fBexpire\fR determines the optimal size of the new \fIhistory\fR file from the size of the old one. In case you want to force a specific size, use this flag to optimize the new history database for approximately \fIsize\fR key-value pairs (i.e. lines in \fIhistory\fR). Accurately specifying the size will create a more efficient database. (The size should be the estimated eventual number of articles, typically the size of the old \fIhistory\fR file, in lines.) .IP "\fB\-t\fR" 4 .IX Item "-t" If the \fB\-t\fR flag is used, then \fBexpire\fR will generate a list of the tokens that should be removed on its standard output, and the new \fIhistory\fR file will be left in \fIhistory.n\fR, \fIhistory.n.dir\fR, \fIhistory.n.index\fR and \fIhistory.n.hash\fR. This flag is useful for debugging when used with the \fB\-n\fR flag. Note that if the \fB\-f\fR flag is used, then the name specified with that flag will be used instead of \fIhistory\fR. .IP "\fB\-v\fR \fIlevel\fR" 4 .IX Item "-v level" The \fB\-v\fR flag is used to increase the verbosity of the program, generating messages to standard output. The \fIlevel\fR should be a number, where higher numbers result in more output. Level one will print totals of the various actions done (not valid if a new \fIhistory\fR file is not written), level two will print a report on each individual file, while level five results in multiple lines of output for every history line processed. .IP "\fB\-w\fR \fInumber\fR" 4 .IX Item "-w number" Use the \fB\-w\fR flag to \*(L"warp\*(R" time so that \fBexpire\fR thinks it is running at some time other than the current time. The value should be a signed floating point number indicating the number of days to use as the offset. .IP "\fB\-x\fR" 4 .IX Item "-x" If the \fB\-x\fR flag is used, then \fBexpire\fR will not create any new history files. This is most useful when combined with the \fB\-n\fR and \fB\-t\fR flags to see how different expiration policies would change the amount of disk space used. .IP "\fB\-z\fR \fIfile\fR" 4 .IX Item "-z file" If the \fB\-z\fR flag is used, then articles are not removed, but their names are appended to the specified \fIfile\fR. See the description of \fBdelayrm\fR in \fBnews.daily\fR\|(8). If a filename is specified, it is taken as the control file and parsed according to the rules in \fIexpire.ctl\fR. A single dash (\f(CW\*(C`\-\*(C'\fR) may be used to read the file from standard input. If no file is specified, the file \fIpathetc\fR/expire.ctl is read. .SH "HISTORY" .IX Header "HISTORY" Written by Rich \f(CW$alz\fR for InterNetNews. Converted to \&\s-1POD\s0 by Julien Elie. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBctlinnd\fR\|(8), \fBexpire.ctl\fR\|(5), \fBexpireover\fR\|(8), \fBhistory\fR\|(5), \fBinn.conf\fR\|(5), \fBinnd\fR\|(8), \&\fBlibinn_dbz\fR\|(3), \fBlibinn_inndcomm\fR\|(3), \fBnews.daily\fR\|(8).