1ARCHIVE(8)                InterNetNews Documentation                ARCHIVE(8)
2
3
4

NAME

6       archive - Usenet article archiver
7

SYNOPSIS

9       archive [-cfr] [-a archive] [-i index] [-p pattern] [input]
10

DESCRIPTION

12       archive makes copies of files specified on its standard input.  It is
13       normally run either as a channel feed under innd or by a script before
14       news.daily is run.
15
16       archive reads the named input file, or standard input if no file is
17       given.  The input is taken as a sequence of lines; blank lines and
18       lines starting with a number sign ("#") are ignored.  All other lines
19       should specify the token of an article to archive.  Every article is
20       retrieved from a token, and the Xref: header is used to determine the
21       target file in the archive directory.  You can limit the targets taken
22       from the Xref: header with the -p option.
23
24       Files are copied to a directory within the archive directory,
25       patharchive in inn.conf (or some other directory given with -a).  The
26       default is to create a hierarchy that mimics a traditional news spool
27       storage of the given articles; intermediate directories will be created
28       as needed.  For example, if the input token represents article 2211 in
29       the newsgroup comp.sources.unix, archive will by default store the
30       article as:
31
32           comp/sources/unix/2211
33
34       in the archive area.  This can be modified with the -c and -f options.
35

OPTIONS

37       -a archive
38           If the -a flag is given, its argument specifies the root of the
39           archive area, instead of patharchive in inn.conf.
40
41       -c  If the -c flag is given, directory names will be flattened as
42           described under the -f option.  Then, additionally, all posts will
43           be concatenated into a single file, appending to that file if it
44           already exists.  The file name will be "YYYYMM", formed from the
45           current time when archive is run.  In other words, if given an
46           article in comp.sources.unix on December 14th, 1998, the article
47           would be appended to the file:
48
49               comp.sources.unix/199812
50
51           in the archive area.
52
53           Articles will be separated by a line containing only "-----------".
54
55       -f  If the -f flag is used, directory names will be flattened,
56           replacing the slashes with the periods.  In other words, article
57           2211 in comp.sources.unix will be written to:
58
59               comp.sources.unix/2211
60
61           in the archive area.
62
63       -i index
64           If the -i flag is used, archive will append one line to the file
65           index for each article that it archives.  This line will contain
66           the destination file name, the Message-ID: header, and the Subject:
67           header of the message, separated by spaces.  If either header is
68           missing (normally not possible if the article was accepted by
69           innd), it will be replaced by "<none>".  The headers will be
70           transformed using the same rules as are used to generate overview
71           data (unfolded and then with tabs, CR, and LF replaced by spaces).
72
73       -p pattern
74           Limits the targets taken from the Xref header field to the groups
75           specified in pattern.  pattern is a uwildmat pattern matching
76           newsgroups that you wish to have archive handle.
77
78       -r  By default, archive sets its standard error to pathlog/errlog.  To
79           suppress this redirection, use the -r flag.
80

RETURN VALUE

82       If the input is exhausted, archive will exit with a zero status.  If an
83       I/O error occurs, it will try to spool its input, copying it to a file.
84       If there was no input filename, the standard input will be copied to
85       pathoutgoing/archive and the program will exit.  If an input filename
86       was given, a temporary file named input.bch (if input is an absolute
87       pathname) or pathoutgoing/input.bch (if the filename does not begin
88       with a slash) is created.  Once the input is copied, archive will try
89       to rename this temporary file to be the name of the input file, and
90       then exit.
91

EXAMPLES

93       A typical newsfeeds(5) entry to archive most source newsgroups is as
94       follows:
95
96           source-archive!\
97               :!*,*sources*,!*wanted*,!*.d\
98               :Tc,Wn\
99               :<pathbin>/archive -f -i <patharchive>/INDEX
100
101       Replace <pathbin> and <patharchive> with the appropriate paths.
102

HISTORY

104       Written by Rich $alz <rsalz@uunet.uu.net> for InterNetNews.  Converted
105       to POD by Russ Allbery <eagle@eyrie.org>.
106

SEE ALSO

108       inn.conf(5), libinn_uwildmat(3), newsfeeds(5).
109
110
111
112INN 2.6.5                         2022-02-18                        ARCHIVE(8)
Impressum