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 field is used to determine
21       the target file in the archive directory.  You can limit the targets
22       taken from the Xref header field 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 field, and the
67           Subject header field of the message, separated by spaces.  If
68           either header is missing (normally not possible if the article was
69           accepted by innd), it will be replaced by "<none>".  The headers
70           will be transformed using the same rules as are used to generate
71           overview data (unfolded and then with tabs, CR, and LF replaced by
72           spaces).
73
74       -p pattern
75           Limits the targets taken from the Xref header field to the groups
76           specified in pattern.  pattern is a uwildmat pattern matching
77           newsgroups that you wish to have archive handle.
78
79       -r  By default, archive sets its standard error to pathlog/errlog.  To
80           suppress this redirection, use the -r flag.
81

RETURN VALUE

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

EXAMPLES

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

HISTORY

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

SEE ALSO

109       inn.conf(5), libinn_uwildmat(3), newsfeeds(5).
110
111
112
113INN 2.7.0                         2022-07-10                        ARCHIVE(8)
Impressum