|
|
d9c745 |
From 4810afca1223099c1546da8d73d653c0d1eff96e Mon Sep 17 00:00:00 2001
|
|
|
d9c745 |
From: Kamil Dudka <kdudka@redhat.com>
|
|
|
d9c745 |
Date: Tue, 27 Apr 2021 18:36:30 +0200
|
|
|
d9c745 |
Subject: [PATCH 1/2] logrotate.8: unify documentation of
|
|
|
d9c745 |
copy/copytruncate/renamecopy
|
|
|
d9c745 |
|
|
|
d9c745 |
Bug: https://bugzilla.redhat.com/1934629
|
|
|
d9c745 |
|
|
|
d9c745 |
Closes: https://github.com/logrotate/logrotate/pull/386
|
|
|
d9c745 |
|
|
|
d9c745 |
Upstream-commit: 6ac9fe5759678b4c2b312eea490ebbae25092213
|
|
|
d9c745 |
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
|
|
d9c745 |
---
|
|
|
d9c745 |
logrotate.8.in | 18 +++++++++++++-----
|
|
|
d9c745 |
1 file changed, 13 insertions(+), 5 deletions(-)
|
|
|
d9c745 |
|
|
|
d9c745 |
diff --git a/logrotate.8.in b/logrotate.8.in
|
|
|
d9c745 |
index f27c279..8064d68 100644
|
|
|
d9c745 |
--- a/logrotate.8.in
|
|
|
d9c745 |
+++ b/logrotate.8.in
|
|
|
d9c745 |
@@ -411,7 +411,8 @@ Make a copy of the log file, but don't change the original at all.
|
|
|
d9c745 |
This option can be used, for instance, to make a snapshot of the current
|
|
|
d9c745 |
log file, or when some other utility needs to truncate or parse the file.
|
|
|
d9c745 |
When this option is used, the \fBcreate\fR option will have no effect,
|
|
|
d9c745 |
-as the old log file stays in place.
|
|
|
d9c745 |
+as the old log file stays in place. The \fBcopy\fR option allows storing
|
|
|
d9c745 |
+rotated log files on the different devices using \fBolddir\fR directive.
|
|
|
d9c745 |
|
|
|
d9c745 |
.TP
|
|
|
d9c745 |
\fBnocopy\fR
|
|
|
d9c745 |
@@ -427,7 +428,9 @@ and thus might continue writing (appending) to the previous log file forever.
|
|
|
d9c745 |
Note that there is a very small time slice between copying the file and
|
|
|
d9c745 |
truncating it, so some logging data might be lost.
|
|
|
d9c745 |
When this option is used, the \fBcreate\fR option will have no effect,
|
|
|
d9c745 |
-as the old log file stays in place.
|
|
|
d9c745 |
+as the old log file stays in place. The \fBcopytruncate\fR option allows
|
|
|
d9c745 |
+storing rotated log files on the different devices using \fBolddir\fR
|
|
|
d9c745 |
+directive.
|
|
|
d9c745 |
|
|
|
d9c745 |
.TP
|
|
|
d9c745 |
\fBnocopytruncate\fR
|
|
|
d9c745 |
@@ -438,9 +441,14 @@ Do not truncate the original log file in place after creating a copy
|
|
|
d9c745 |
\fBrenamecopy\fR
|
|
|
d9c745 |
Log file is renamed to temporary filename in the same directory by adding
|
|
|
d9c745 |
".tmp" extension to it. After that, \fBpostrotate\fR script is run
|
|
|
d9c745 |
-and log file is copied from temporary filename to final filename. This allows
|
|
|
d9c745 |
-storing rotated log files on the different devices using \fBolddir\fR
|
|
|
d9c745 |
-directive. In the end, temporary filename is removed.
|
|
|
d9c745 |
+and log file is copied from temporary filename to final filename. In the end,
|
|
|
d9c745 |
+temporary filename is removed. The \fBrenamecopy\fR option allows storing
|
|
|
d9c745 |
+rotated log files on the different devices using \fBolddir\fR directive.
|
|
|
d9c745 |
+
|
|
|
d9c745 |
+.TP
|
|
|
d9c745 |
+\fBnorenamecopy\fR
|
|
|
d9c745 |
+Do not rename and copy the original log file
|
|
|
d9c745 |
+(this overrides the \fBrenamecopy\fR option).
|
|
|
d9c745 |
|
|
|
d9c745 |
.TP
|
|
|
d9c745 |
\fBshred\fR
|
|
|
d9c745 |
--
|
|
|
d9c745 |
2.30.2
|
|
|
d9c745 |
|