Logs gzipped and not gzipped
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
Recently I've changed logs configuration for letsencrypt, because there was no given one and I have files:
letsencrypt.log
letsencrypt.log.1
letsencrypt.log.10
letsencrypt.log.10.gz
letsencrypt.log.11
letsencrypt.log.11.gz
letsencrypt.log.12
letsencrypt.log.12.gz
letsencrypt.log.13
letsencrypt.log.13.gz
letsencrypt.log.14
letsencrypt.log.14.gz
letsencrypt.log.15
letsencrypt.log.15.gz
letsencrypt.log.16
letsencrypt.log.16.gz
where even files have 1409 bytes and odd files have 0 bytes. Gzipped files however have some content (which differs). The configuration for log rotate is:
/var/log/letsencrypt/*.log
daily
rotate 32
compress
delaycompress
missingok
notifempty
create 644 root root
How should I change the log rotate configuration to leave only:
- first two files not gzipped,
- rest of the files gzipped,
- get rid of empty files?
linux logs gzip logrotate letsencrypt
|
show 1 more comment
up vote
1
down vote
favorite
Recently I've changed logs configuration for letsencrypt, because there was no given one and I have files:
letsencrypt.log
letsencrypt.log.1
letsencrypt.log.10
letsencrypt.log.10.gz
letsencrypt.log.11
letsencrypt.log.11.gz
letsencrypt.log.12
letsencrypt.log.12.gz
letsencrypt.log.13
letsencrypt.log.13.gz
letsencrypt.log.14
letsencrypt.log.14.gz
letsencrypt.log.15
letsencrypt.log.15.gz
letsencrypt.log.16
letsencrypt.log.16.gz
where even files have 1409 bytes and odd files have 0 bytes. Gzipped files however have some content (which differs). The configuration for log rotate is:
/var/log/letsencrypt/*.log
daily
rotate 32
compress
delaycompress
missingok
notifempty
create 644 root root
How should I change the log rotate configuration to leave only:
- first two files not gzipped,
- rest of the files gzipped,
- get rid of empty files?
linux logs gzip logrotate letsencrypt
Do you have two sets of cron jobs running tho log rotation?
– Kusalananda
Dec 8 at 10:17
@Kusalananda No, surely not.
– pbies
Dec 8 at 10:22
2
@Kusalananda When you keep changing the log rotation scheme, either you have to rename or backup/delete logs. The old dangling names wont delete themselves alone.
– Rui F Ribeiro
Dec 8 at 10:46
Yes, I had made experiments changing the log rotate configuration but each time I've removed all the logs. No success yet.
– pbies
Dec 8 at 10:50
@RuiFRibeiro I don't think your comment was for me, was it?
– Kusalananda
Dec 8 at 12:16
|
show 1 more comment
up vote
1
down vote
favorite
up vote
1
down vote
favorite
Recently I've changed logs configuration for letsencrypt, because there was no given one and I have files:
letsencrypt.log
letsencrypt.log.1
letsencrypt.log.10
letsencrypt.log.10.gz
letsencrypt.log.11
letsencrypt.log.11.gz
letsencrypt.log.12
letsencrypt.log.12.gz
letsencrypt.log.13
letsencrypt.log.13.gz
letsencrypt.log.14
letsencrypt.log.14.gz
letsencrypt.log.15
letsencrypt.log.15.gz
letsencrypt.log.16
letsencrypt.log.16.gz
where even files have 1409 bytes and odd files have 0 bytes. Gzipped files however have some content (which differs). The configuration for log rotate is:
/var/log/letsencrypt/*.log
daily
rotate 32
compress
delaycompress
missingok
notifempty
create 644 root root
How should I change the log rotate configuration to leave only:
- first two files not gzipped,
- rest of the files gzipped,
- get rid of empty files?
linux logs gzip logrotate letsencrypt
Recently I've changed logs configuration for letsencrypt, because there was no given one and I have files:
letsencrypt.log
letsencrypt.log.1
letsencrypt.log.10
letsencrypt.log.10.gz
letsencrypt.log.11
letsencrypt.log.11.gz
letsencrypt.log.12
letsencrypt.log.12.gz
letsencrypt.log.13
letsencrypt.log.13.gz
letsencrypt.log.14
letsencrypt.log.14.gz
letsencrypt.log.15
letsencrypt.log.15.gz
letsencrypt.log.16
letsencrypt.log.16.gz
where even files have 1409 bytes and odd files have 0 bytes. Gzipped files however have some content (which differs). The configuration for log rotate is:
/var/log/letsencrypt/*.log
daily
rotate 32
compress
delaycompress
missingok
notifempty
create 644 root root
How should I change the log rotate configuration to leave only:
- first two files not gzipped,
- rest of the files gzipped,
- get rid of empty files?
linux logs gzip logrotate letsencrypt
linux logs gzip logrotate letsencrypt
asked Dec 8 at 10:13
pbies
15110
15110
Do you have two sets of cron jobs running tho log rotation?
– Kusalananda
Dec 8 at 10:17
@Kusalananda No, surely not.
– pbies
Dec 8 at 10:22
2
@Kusalananda When you keep changing the log rotation scheme, either you have to rename or backup/delete logs. The old dangling names wont delete themselves alone.
– Rui F Ribeiro
Dec 8 at 10:46
Yes, I had made experiments changing the log rotate configuration but each time I've removed all the logs. No success yet.
– pbies
Dec 8 at 10:50
@RuiFRibeiro I don't think your comment was for me, was it?
– Kusalananda
Dec 8 at 12:16
|
show 1 more comment
Do you have two sets of cron jobs running tho log rotation?
– Kusalananda
Dec 8 at 10:17
@Kusalananda No, surely not.
– pbies
Dec 8 at 10:22
2
@Kusalananda When you keep changing the log rotation scheme, either you have to rename or backup/delete logs. The old dangling names wont delete themselves alone.
– Rui F Ribeiro
Dec 8 at 10:46
Yes, I had made experiments changing the log rotate configuration but each time I've removed all the logs. No success yet.
– pbies
Dec 8 at 10:50
@RuiFRibeiro I don't think your comment was for me, was it?
– Kusalananda
Dec 8 at 12:16
Do you have two sets of cron jobs running tho log rotation?
– Kusalananda
Dec 8 at 10:17
Do you have two sets of cron jobs running tho log rotation?
– Kusalananda
Dec 8 at 10:17
@Kusalananda No, surely not.
– pbies
Dec 8 at 10:22
@Kusalananda No, surely not.
– pbies
Dec 8 at 10:22
2
2
@Kusalananda When you keep changing the log rotation scheme, either you have to rename or backup/delete logs. The old dangling names wont delete themselves alone.
– Rui F Ribeiro
Dec 8 at 10:46
@Kusalananda When you keep changing the log rotation scheme, either you have to rename or backup/delete logs. The old dangling names wont delete themselves alone.
– Rui F Ribeiro
Dec 8 at 10:46
Yes, I had made experiments changing the log rotate configuration but each time I've removed all the logs. No success yet.
– pbies
Dec 8 at 10:50
Yes, I had made experiments changing the log rotate configuration but each time I've removed all the logs. No success yet.
– pbies
Dec 8 at 10:50
@RuiFRibeiro I don't think your comment was for me, was it?
– Kusalananda
Dec 8 at 12:16
@RuiFRibeiro I don't think your comment was for me, was it?
– Kusalananda
Dec 8 at 12:16
|
show 1 more comment
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
Ok, so I've managed to make proper log rotate:
/var/log/letsencrypt/*.log
weekly
rotate 9
compress
delaycompress
missingok
create 644 root root
So the difference is that I've removed notifempty
.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f486744%2flogs-gzipped-and-not-gzipped%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
Ok, so I've managed to make proper log rotate:
/var/log/letsencrypt/*.log
weekly
rotate 9
compress
delaycompress
missingok
create 644 root root
So the difference is that I've removed notifempty
.
add a comment |
up vote
0
down vote
accepted
Ok, so I've managed to make proper log rotate:
/var/log/letsencrypt/*.log
weekly
rotate 9
compress
delaycompress
missingok
create 644 root root
So the difference is that I've removed notifempty
.
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
Ok, so I've managed to make proper log rotate:
/var/log/letsencrypt/*.log
weekly
rotate 9
compress
delaycompress
missingok
create 644 root root
So the difference is that I've removed notifempty
.
Ok, so I've managed to make proper log rotate:
/var/log/letsencrypt/*.log
weekly
rotate 9
compress
delaycompress
missingok
create 644 root root
So the difference is that I've removed notifempty
.
answered Dec 12 at 12:55
pbies
15110
15110
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f486744%2flogs-gzipped-and-not-gzipped%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Do you have two sets of cron jobs running tho log rotation?
– Kusalananda
Dec 8 at 10:17
@Kusalananda No, surely not.
– pbies
Dec 8 at 10:22
2
@Kusalananda When you keep changing the log rotation scheme, either you have to rename or backup/delete logs. The old dangling names wont delete themselves alone.
– Rui F Ribeiro
Dec 8 at 10:46
Yes, I had made experiments changing the log rotate configuration but each time I've removed all the logs. No success yet.
– pbies
Dec 8 at 10:50
@RuiFRibeiro I don't think your comment was for me, was it?
– Kusalananda
Dec 8 at 12:16