.\" -*- 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 "EXPIRE 8" .TH EXPIRE 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 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 history(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 CNFS 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 CNFS, 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 ctlinnd(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 ID 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 "warp" 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 news.daily(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 $alz for InterNetNews. Converted to POD by Julien Elie. .SH "SEE ALSO" .IX Header "SEE ALSO" ctlinnd(8), expire.ctl(5), expireover(8), history(5), inn.conf(5), innd(8), libinn_dbz(3), libinn_inndcomm(3), news.daily(8).