.\" $Revision: 5909 $ .TH ARCHIVE 8 .SH NAME archive \- Usenet article archiver .SH SYNOPSIS .B archive [ .BI \-a " archive" ] [ .B \-c ] [ .B \-f ] [ .BI \-i " index" ] [ .BI \-p " newsgroup-list" ] [ .B \-r ] [ .I input ] .SH DESCRIPTION .I Archive makes copies of files specified on its standard input. It is normally run either as a channel feed under .IR innd (8), or by a script before .IR expire (8) is run. .PP .I Archive reads the named .I input file, or standard input if no file is given. The input is taken as a sequence of lines; blank lines and lines starting with a number sign (``#'') are ignored. All other lines should specify the token of an article to archive. Every article is retrieved from a token, and the Xref: header is used to determine the target file in the archive directory. You can limit the targets taken from the Xref: header with the ``\-p'' option. .PP Files are copied to a directory within the archive directory, .IR . The default is to create a hierarchy that mimics the input files; intermediate directories will be created as needed. For example, if the input token represents article 2211 in the newsgroup comp.sources.unix, .IR archive will generate a copy in .IR /comp/sources/unix/2211 . .SH OPTIONS .TP .B \-a\ archive If the ``\-a'' flag is used then its argument specifies the directory to archive in instead of .IR . .TP .B \-c If the ``\-c'' flag is used, then directory names will be flattened as if by the ``\-f'' flag; additionally, all posts will be concatenated into a .B single\ file , appending if the file already exists, with the final component of the filename being YYYYMM based on the local execution time of .IR archive. In this case, on December 14, 1998, the file would be copied to .IR /comp.sources.unix/199812 . .TP .B \-f If the ``\-f'' flag is used, then all directory names will be flattened out, replacing the slashes with periods. In this case, the file would be copied to .IR /comp.sources.unix/2211 . .TP .B \-i If the ``\-i'' flag is used, then .I archive will append one line to the specified .I index file for each article that it copies. This line will contain the destination name as well as the Message-ID and Subject headers. .TP .B \-p newsgroup-list Limits the targets taken from the Xref: header to the groups specified in .I newsgroup-list. The .I newsgroup-list is a comma-separated .IR uwildmat (3) list of newsgroups you wish to have .IR archive handle. .TP .B \-r By default, .I archive sets its standard error to .IR /errlog . To suppress this redirection, use the ``\-r'' flag. .SH EXIT STATUS If the input is exhausted, .I archive will exit with a zero status. If an I/O error occures, it will try to spool its input, copying it to a file. If there was no input filename, the standard input will be copied to .I /archive and the program will exit. If an input filename was given, a temporary file named .IR input .bch (if .I input is an absolute pathname) or .I /input.bch (if the filename does not begin with a slash) is created. Once the input is copied, .I archive will try to rename this temporary file to be the name of the input file, and then exit. .SH EXAMPLES A typical .IR newsfeeds (5) entry to archive most source newsgroups is as follows: .PP .RS .nf source-archive\e :!*,*sources*,!*wanted*,!*.d\e :Tc,Wn\e :/archive \-f \-i \e /INDEX .fi .RE .SH HISTORY Written by Rich $alz for InterNetNews. .de R$ This is revision \\$3, dated \\$4. .. .R$ $Id: archive.8 5909 2002-12-03 05:17:18Z vinocur $ .SH "SEE ALSO" inn.conf(5), newsfeeds(5).