2
## 50-manpage.dpatch by Paul Martin <pm@debian.org>
4
## All lines beginning with `## DP:' are a description of the patch.
8
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
12
[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
13
patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
16
-patch) patch $patch_opts -p1 < $0;;
17
-unpatch) patch $patch_opts -p1 -R < $0;;
19
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
26
diff -urNad /home/pm/deb/logrotate/logrotate-3.7/logrotate.8 logrotate-3.7/logrotate.8
27
--- /home/pm/deb/logrotate/logrotate-3.7/logrotate.8 2003-09-22 20:11:12.000000000 +0100
28
+++ logrotate-3.7/logrotate.8 2004-02-11 21:03:50.000000000 +0000
31
logrotate \- rotates, compresses, and mails system logs
33
-\fBlogrotate\fR [-dv] [-f|--force] [-s|--state \fIfile\fR] \fIconfig_file\fR+
34
+\fBlogrotate\fR [\fB\-dv\fR] [\fB\-f\fR|\fB\-\-force\fR]
35
+[\fB\-s\fR|\fB-\-state\ \fIstatefile\fR] \fIconfig_file\fR ..
37
\fBlogrotate\fR is designed to ease administration of systems that generate
38
large numbers of log files. It allows automatic rotation, compression,
40
weekly, monthly, or when it grows too large.
42
Normally, \fBlogrotate\fR is run as a daily cron job. It will not modify
43
-a log multiple times in one day unless the criterium for that log is
44
-based on the log's size and \fBlogrotate\fR is being run multiple times
45
-each day, or unless the \fB-f\fR or \fB-force\fR option is used.
46
+a log more than once in one day unless the criterion for that log is
47
+based on the log's size and \fBlogrotate\fR is being run more than once
48
+each day, or unless the \fB-f\fR or \fB-\-force\fR option is used.
50
Any number of config files may be given on the command line. Later config
51
files may override the options given in earlier files, so the order
52
-in which the \fBlogrotate\fR config files are listed in is important.
53
+in which the \fBlogrotate\fR config files are listed is important.
54
Normally, a single config file which includes any other config files
55
which are needed should be used. See below for more information on how
56
-to use the \fIinclude\fR directive to accomplish this. If a directory
57
+to use the \fBinclude\fR directive to accomplish this. If a directory
58
is given on the command line, every file in that directory is used as
62
be made to the logs or to the \fBlogrotate\fR state file.
66
+\fB-f\fR, \fB-\-force\fR
67
Tells \fBlogrotate\fR to force the rotation, even if it doesn't think
68
this is necessary. Sometimes this is useful after adding new entries to
69
-\fBlogrotate\fR, or if old log files have been removed by hand, as the
70
-new files will be created, and logging will continue correctly.
71
+a \fBlogrotate\fR config file, or if old log files have been removed
72
+by hand, as the new files will be created, and logging will continue
76
-\fB-m, -\-mail <command>\fR
77
+\fB-m\R, \B-\-mail <command>\fR
78
Tells \fBlogrotate\fR which command to use when mailing logs. This
79
command should accept two arguments: 1) the subject of the message, and
80
2) the recipient. The command must then read a message on standard input
81
-and mail it to the recipient. The default mail command is \fB/bin/mail
82
+and mail it to the recipient. The default mail command is \fB/usr/bin/mail
86
-\fB-s, -\-state <statefile>\fR
87
+\fB-s\fR, \fB-\-state <statefile>\fR
88
Tells \fBlogrotate\fR to use an alternate state file. This is useful
89
-if logrotate is being run as a different user for various sets of
90
+if \fBlogrotate\fR is being run as a different user for various sets of
91
log files. The default state file is \fI/var/lib/logrotate/status\fR.
95
Prints a short usage message.
98
+\fB-v\fR, \fB--verbose\fR
99
+Display messages during rotation.
101
.SH CONFIGURATION FILE
103
\fBlogrotate\fR reads everything about the log files it should be handling
104
from the series of configuration files specified on the command line. Each
105
configuration file can set global options (local definitions override
106
global ones, and later definitions override earlier ones) and specify
107
-a logfile to rotate. A simple configuration file looks like this:
108
+some logfiles to rotate. A simple configuration file looks like this:
116
- /sbin/killall -HUP syslogd
117
+ /sbin/killall -HUP syslogd
125
- /sbin/killall -HUP httpd
126
+ /sbin/killall -HUP httpd
131
olddir /var/log/news/old
134
- kill -HUP `cat /var/run/inn.pid`
135
+ kill -HUP `cat /var/run/inn.pid`
140
The first few lines set global options; in the example, logs are
141
compressed after they are rotated. Note that comments may appear
142
anywhere in the config file as long as the first non-whitespace
143
-character on the line is a #.
144
+character on the line is a \fB#\fR.
146
-The next section of the config files defined how to handle the log file
147
+The next section of the config file defines how to handle the log file
148
\fI/var/log/messages\fR. The log will go through five weekly rotations before
149
being removed. After the log file has been rotated (but before the old
150
version of the log has been compressed), the command
151
@@ -117,13 +123,13 @@
153
The next section defines the parameters for both
154
\fI/var/log/httpd/access.log\fR and \fI/var/log/httpd/error.log\fR.
155
-They are rotated whenever is grows over 100k is size, and the old logs
156
+Each is rotated whenever it grows over 100k is size, and the old log
157
files are mailed (uncompressed) to www@my.org after going through 5
158
rotations, rather then being removed. The \fBsharedscripts\fR means that
159
the \fBpostrotate\fR script will only be run once, not once for each
160
-log which is rotated. Note that the double quotes around the first filename
161
-at the beginning of this section allows logrotate to rotate logs with
162
-spaces in the name. Normal shell quoting rules apply, with ', ", and \\
163
+log which is rotated. Note that log file names may be enclosed in
164
+quotes (and that quotes are required if the name contains spaces).
165
+Normal shell quoting rules apply, with \fB'\fR, \fB"\fR, and \fB\\\fR
166
characters supported.
168
The last section defines the parameters for all of the files in
169
@@ -135,29 +141,33 @@
170
rotate all files, including previously rotated ones. A way around this
171
is to use the \fBolddir\fR directive or a more exact wildcard (such as *.log).
173
+If the directory \fI/var/log/news\fR does not exist, this will cause
174
+\fBlogrotate\fR to report an error. This error cannot be stopped with
175
+the \fBmissingok\fR directive.
177
Here is more information on the directives which may be included in
178
a \fBlogrotate\fR configuration file:
182
-Old versions of log files are compressed with \fBgzip\fR by default. See also
184
+Old versions of log files are compressed with \fBgzip\fR(1) by default.
185
+See also \fBnocompress\fR.
189
Specifies which command to use to compress log files. The default is
190
-\fBgzip\fR. See also \fBcompress\fR.
191
+\fBgzip\fR(1). See also \fBcompress\fR.
195
Specifies which command to use to uncompress log files. The default is
201
Specifies which extension to use on compressed logfiles, if compression
202
-is enabled. The default follows that of the configured compression
204
+is enabled. The default follows that of the default compression
208
\fBcompressoptions\fR
213
-Truncate the original log file in place after creating a copy,
214
-instead of moving the old log file and optionally creating a new one,
215
-It can be used when some program can not be told to close its logfile
216
+Truncate the original log file to zero size in place after creating a copy,
217
+instead of moving the old log file and optionally creating a new one.
218
+It can be used when some program cannot be told to close its logfile
219
and thus might continue writing (appending) to the previous log file forever.
220
Note that there is a very small time slice between copying the file and
221
truncating it, so some logging data might be lost.
223
Immediately after rotation (before the \fBpostrotate\fR script is run)
224
the log file is created (with the same name as the log file just rotated).
225
\fImode\fR specifies the mode for the log file in octal (the same
226
-as \fBchmod(2)\fR), \fIowner\fR specifies the user name who will own the
227
+as \fBchmod\fR)(2), \fIowner\fR specifies the user name who will own the
228
log file, and \fIgroup\fR specifies the group the log file will belong
229
to. Any of the log file attributes may be omitted, in which case those
230
attributes for the new file will use the same values as the original log
231
@@ -202,20 +212,20 @@
234
Postpone compression of the previous log file to the next rotation cycle.
235
-This has only effect when used in combination with \fBcompress\fR.
236
-It can be used when some program can not be told to close its logfile
237
+This only has effect when used in combination with \fBcompress\fR.
238
+It can be used when some program cannot be told to close its logfile
239
and thus might continue writing to the previous log file for some time.
242
\fBextension \fIext\fR
243
Log files are given the final extension \fIext\fR after rotation. If
244
-compression is used, the compression extension (normally \fB.gz\fR)
245
+compression is used, the compression extension (normally \fI.gz\fR)
246
appears after \fIext\fR.
250
-Rotate the log file even if it is empty, overiding the \fBnotifempty\fR
251
-option (ifempty is the default).
252
+Rotate the log file even if it is empty, overriding the \fBnotifempty\fR
253
+option (\fBifempty\fR is the default).
256
\fBinclude \fIfile_or_directory\fR
257
@@ -226,12 +236,12 @@
258
which are ignored are files which are not regular files (such as
259
directories and named pipes) and files whose names end with one of
260
the taboo extensions, as specified by the \fBtabooext\fR directive.
261
-The \fBinclude\fR directive may not appear inside of a log file
262
+The \fBinclude\fR directive may not appear inside a log file
266
\fBmail \fIaddress\fR
267
-When a log is rotated out-of-existence, it is mailed to \fIaddress\fR. If
268
+When a log is rotated out of existence, it is mailed to \fIaddress\fR. If
269
no mail should be generated by a particular log, the \fBnomail\fR directive
276
-Old versions of log files are not compressed with \fBgzip\fR. See also
278
+Old versions of log files are not compressed. See also \fBcompress\fR.
286
-Don't mail old log files to any address.
287
+Do not mail old log files to any address.
291
@@ -289,12 +298,12 @@
295
-Logs are rotated in the same directory the log normally resides in (this
296
+Logs are rotated in the directory they normally resides in (this
297
overrides the \fBolddir\fR option).
300
\fBnosharedscripts\fR
301
-Run \fBprerotate\fR and \fBpostrotate\fR scripts for every script which
302
+Run \fBprerotate\fR and \fBpostrotate\fR scripts for every log which
303
is rotated (this is the default, and overrides the \fBsharedscripts\fR
306
@@ -315,16 +324,15 @@
307
\fBpostrotate\fR/\fBendscript\fR
308
The lines between \fBpostrotate\fR and \fBendscript\fR (both of which
309
must appear on lines by themselves) are executed after the log file is
310
-rotated. These directives may only appear inside of a log file definition.
311
-See \fBprerotate\fR as well.
312
+rotated. These directives may only appear inside a log file definition.
313
+See also \fBprerotate\fR.
316
\fBprerotate\fR/\fBendscript\fR
317
The lines between \fBprerotate\fR and \fBendscript\fR (both of which
318
must appear on lines by themselves) are executed before the log file is
319
rotated and only if the log will actually be rotated. These directives
320
-may only appear inside of a log file definition. See \fBpostrotate\fR
322
+may only appear inside a log file definition. See also \fBpostrotate\fR.
325
\fBfirstaction\fR/\fBendscript\fR
326
@@ -340,30 +348,31 @@
327
must appear on lines by themselves) are executed once after all log
328
files that match the wildcarded pattern are rotated, after postrotate script
329
is run and only if at least one log is rotated. These directives may only
330
-appear inside of a log file definition. See \fBlastaction\fR as well.
331
+appear inside a log file definition. See also \fBlastaction\fR.
334
\fBrotate \fIcount\fR
335
-Log files are rotated <count> times before being removed or mailed to the
336
+Log files are rotated \fIcount\fR times before being removed or mailed to the
337
address specified in a \fBmail\fR directive. If \fIcount\fR is 0, old versions
338
are removed rather then rotated.
342
+\fBsize \fIsize\fR[\fBG\fR|\fBM\fR|\fBk\fR]
343
Log files are rotated when they grow bigger then \fIsize\fR bytes. If
344
\fIsize\fR is followed by \fIM\fR, the size if assumed to be in megabytes.
345
-If the \fIk\fR is used, the size is in kilobytes. So \fBsize 100\fR,
346
-\fIsize 100k\fR, and \fIsize 100M\fR are all valid.
347
+If the \fIG\fR suffix is used, the size is in gigabytes.
348
+If the \fIk\fR suffix is used, the size is in kilobytes. So \fBsize 100\fR,
349
+\fIsize 100k\fR, \fIsize 100M\fR and \fIsize 1G\fR are all valid.
353
-Normally, \fBprescript\fR and \fBpostscript\fR scripts are run for each
354
+Normally, \fBprerotate\fR and \fBpostrotate\fR scripts are run for each
355
log which is rotated, meaning that a single script may be run multiple
356
times for log file entries which match multiple files (such as the
357
-/var/log/news/* example). If \fBsharedscript\fR is specified, the scripts
358
+\fI/var/log/news/*\fR example). If \fBsharedscript\fR is specified, the scripts
359
are only run once, no matter how many logs match the wildcarded pattern.
360
However, if none of the logs in the pattern require rotating, the scripts
361
-will not be run at all. This option overrides the \fbnosharedscripts\fR
362
+will not be run at all. This option overrides the \fBnosharedscripts\fR
366
@@ -377,18 +386,21 @@
368
\fBtabooext\fR [+] \fIlist\fR
369
The current taboo extension list is changed (see the \fBinclude\fR directive
370
-for information on the taboo extensions). If a + precedes the list of
371
-extensions, the current taboo extension list is augmented, otherwise it
372
+for information on the taboo extensions). If a \fB+\fR precedes \fIlist\fR,
373
+the current taboo extension list is augmented by \fIlist\fR, otherwise it
374
is replaced. At startup, the taboo extension list
375
-contains .rpmorig, .rpmsave, ,v, .swp, .rpmnew, and ~.
376
+contains .rpmorig, .rpmsave, .dpkg-dist, .dpkg-old, .dpkg-new, .disabled,
377
+,v, .swp, .rpmnew, and ~. The members of the list are separated by spaces,
383
Log files are rotated if the current weekday is less then the weekday
384
of the last rotation or if more then a week has passed since the last
385
rotation. This is normally the same as rotating logs on the first day
386
-of the week, but it works better if \fIlogrotate\fR is not run every
388
+of the week, but if \fBlogrotate\fR is not being run every night a log
389
+rotation will happen at the first valid opportunity.
393
@@ -400,11 +412,16 @@
394
Configuration options.
401
+The \fBkillall\fR(1) program in Debian is found in the \fIpsmisc\fR package.
405
Erik Troan <ewt@redhat.com>
407
Preston Brown <pbrown@redhat.com>
409
+Corrections and changes for Debian by Paul Martin <pm@debian.org>