chiark / gitweb /
WIP inotify configure test
[inn-innduct.git] / doc / man / archive.8
1 .\" $Revision: 5909 $
2 .TH ARCHIVE 8
3 .SH NAME
4 archive \- Usenet article archiver
5 .SH SYNOPSIS
6 .B archive
7 [
8 .BI \-a " archive"
9 ]
10 [
11 .B \-c
12 ]
13 [
14 .B \-f
15 ]
16 [
17 .BI \-i " index"
18 ]
19 [
20 .BI \-p " newsgroup-list"
21 ]
22 [
23 .B \-r
24 ]
25 [
26 .I input
27 ]
28 .SH DESCRIPTION
29 .I Archive
30 makes copies of files specified on its standard input.
31 It is normally run either as a channel feed under
32 .IR innd (8),
33 or by a script before
34 .IR expire (8)
35 is run.
36 .PP
37 .I Archive
38 reads the named
39 .I input
40 file, or standard input if no file is given.
41 The input is taken as a sequence of lines;
42 blank lines and lines starting with a number sign (``#'') are ignored.
43 All other lines should specify the token of an article to archive.
44 Every article is retrieved from a token,
45 and the Xref: header is used to determine the target file in the
46 archive directory.
47 You can limit the targets taken from the Xref: header with the ``\-p'' option.
48 .PP
49 Files are copied to a directory within the archive directory,
50 .IR <patharchive\ in\ inn.conf> .
51 The default is to create a hierarchy that mimics the input files;
52 intermediate directories will be created as needed.
53 For example, if the input token represents article 2211 in the newsgroup
54 comp.sources.unix,
55 .IR archive
56 will generate a copy in
57 .IR <patharchive\ in\ inn.conf>/comp/sources/unix/2211 .
58 .SH OPTIONS
59 .TP
60 .B \-a\ archive
61 If the ``\-a'' flag is used then its argument specifies the directory to
62 archive in instead of
63 .IR <patharchive\ in\ inn.conf> .
64 .TP
65 .B \-c
66 If the ``\-c'' flag is used, then directory names will be flattened as if
67 by the ``\-f'' flag; additionally, all posts will be concatenated into a
68 .B single\ file ,
69 appending if the file already exists, with the final component of the
70 filename being YYYYMM based on the local execution time of
71 .IR archive.
72 In this case, on December 14, 1998, the file would be copied to
73 .IR <patharchive\ in\ inn.conf>/comp.sources.unix/199812 .
74 .TP
75 .B \-f
76 If the ``\-f'' flag is used, then all directory names will be
77 flattened out, replacing the slashes with periods.
78 In this case, the file would be copied to
79 .IR <patharchive\ in\ inn.conf>/comp.sources.unix/2211 .
80 .TP
81 .B \-i
82 If the ``\-i'' flag is used, then
83 .I archive
84 will append one line to the specified
85 .I index
86 file for each article that it copies.
87 This line will contain the destination name as well as the Message-ID and
88 Subject headers.
89 .TP 
90 .B \-p newsgroup-list
91 Limits the targets taken from the Xref: header to the groups specified in
92 .I newsgroup-list.
93 The
94 .I newsgroup-list
95 is a comma-separated 
96 .IR uwildmat (3)
97 list of newsgroups you wish to have
98 .IR archive
99 handle.
100 .TP 
101 .B \-r
102 By default,
103 .I archive
104 sets its standard error to
105 .IR <pathlog\ in\ inn.conf>/errlog .
106 To suppress this redirection, use the ``\-r'' flag.
107 .SH EXIT STATUS
108 If the input is exhausted,
109 .I archive
110 will exit with a zero status.
111 If an I/O error occures, it will try to spool its input, copying it to a file.
112 If there was no input filename, the standard input will be copied to
113 .I <pathoutgoing in inn.conf>/archive
114 and the program will exit.
115 If an input filename was given, a temporary file named
116 .IR input .bch
117 (if
118 .I input
119 is an absolute pathname)
120 or
121 .I <pathoutgoing in inn.conf>/input.bch
122 (if the filename does not begin with a slash) is created.
123 Once the input is copied,
124 .I archive
125 will try to rename this temporary file to be the name of the input file,
126 and then exit.
127
128 .SH EXAMPLES
129 A typical
130 .IR newsfeeds (5)
131 entry to archive most source newsgroups is as follows:
132 .PP
133 .RS
134 .nf
135 source-archive\e
136         :!*,*sources*,!*wanted*,!*.d\e
137         :Tc,Wn\e
138         :<pathbin in inn.conf>/archive \-f \-i \e
139             <patharchive in inn.conf>/INDEX
140 .fi
141 .RE
142
143 .SH HISTORY
144 Written by Rich $alz <rsalz@uunet.uu.net> for InterNetNews.
145 .de R$
146 This is revision \\$3, dated \\$4.
147 ..
148 .R$ $Id: archive.8 5909 2002-12-03 05:17:18Z vinocur $
149 .SH "SEE ALSO"
150 inn.conf(5),
151 newsfeeds(5).