Questions tagged [logrotate]

A program for managing and archiving individual log files. It allows automatic rotation, compression, removal, and mailing of log files. Jobs can be configured to run hourly, daily, weekly, monthly, yearly or when reaching a certain size or age.

Filter by
Sorted by
Tagged with
0
votes
0answers
21 views

The size of log files is still big after logrotate on ubuntu 20.04

logrotate was setup on Ubuntu 20.04 to limit the besu log file size to 10MB, keep 4 weeks log with rotating weekly and delete the old log file. Here is the besu conf: #for besu log /home/log/besu/* { ...
0
votes
0answers
19 views

Log files gone after reboot or crash

I am having log files deleted from a new machine running Ubuntu 20.04. I have verified that the log files are being rotated in the /var/log/ directory; if I leave the machine on for more than 24 ...
0
votes
2answers
36 views

How do I get the latest logrotate, which isn't yet in the apt repositories?

I'm on 20.04, which has logrotate 3.14.0. I need a later version which has important bugfixes. This page shows that 20.04 has version 3.14.0, and this page shows that 21.04 has version 3.18.0 (the one ...
0
votes
1answer
94 views

Mysql logrotation doesn't work

I'm having trouble making Mysql log rotation working. I don't know why this is so complicated , even though I followed documentation and internet advice, still cannot make it work. I have enabled all ...
0
votes
1answer
33 views

Trouble getting logs to autorotate with logrotate

Ubuntu 20.04.2 LTS Gnome 3.36.8 $ logrotate --version logrotate 3.14.0 It's been impossible to get logs to rotate automatically once they reach a size of 125M. Here's the config file saved to /etc/...
0
votes
0answers
145 views

Setting a size limit for current syslog

Based on other threads, the only way to set a size limit on current syslog (/var/log/syslog) seems to be via rsyslog which is a bit tricky. I ended up replacing the line below in /etc/rsyslog.d/50-...
0
votes
1answer
44 views

Syslog start logging in the morning! why?

Hello I've a Ubuntu server 18.04 running. But the problem is syslog start logging at every morning not at 00:00 midnight! Jan 5 06:25:03 localhost snmpd[810]: truncating integer value > 32 bits ...
0
votes
1answer
79 views

Why My Logrotate Configurations Doesn't Work Correctly for MySQL-MariaDB?

I am using an MariaDB Galera 3-Cluster and I saw that the mysql logs on Node 2 grows up to 100gb and I decided to limited these logs that will not grow a lot. I used logrotate for that, so an file ...
0
votes
0answers
417 views

/var/log/syslog not getting rotated

I have a fresh install of ubuntu 20.04. I have set daily rotation in /etc/logrotate.d/rsyslog file with a maxsize of 1M but the /var/log/syslog and kern.log file keeps increasing. Here is the rsyslog ...
2
votes
2answers
2k views

logrotate succeeds when manually run as root, but fails with “Read-only file system” when run by logrotate.service

I have a (formerly working) logrotate setup for OpenResty that I took from a previous Ubuntu 18.04 installation. Yet the logrotate.service fails with this error now ... error: error renaming /usr/...
0
votes
1answer
1k views

logrotate - file owner issue

I want to rotate the syslog for testing. sudo logrotate -f /var/log/syslog [sudo] password for stephen: error: Ignoring /var/log/syslog because the file owner is wrong (should be root or user with ...
1
vote
1answer
216 views

Cannot run logrotate utility automatically from cron

I run sudo crontab -e and append the following line: * * * * * logrotate -f /etc/logrotate.d/adraw; touch /ADraw/Data/Logs/test.txt The file test.txt is successfully created, but I see no results of ...
2
votes
0answers
524 views

Logrotate not doing his job, hdd full because of logs

I have a small microSD ( 3GB ) on a ARM Samsung Artik, with Ubuntu installed. I have installed syslog-ng and Logrotate to manage my logs, because otherwise my memory get filled quickly. My problem ...
0
votes
0answers
260 views

Logrotate doesn't work in read only mode

I am running a device in read only mode with ubuntu and also I need to run Mysql server. Mysql server creates error log files in /var/log/mysql directory. But since I am running it in read only mode, ...
1
vote
0answers
275 views

syslog-ng leaving empty log files after rotation

Let me start by saying I am new to syslog-ng and logrotation and am doing this at home to learn. I have log files that are being sent to my syslog server from my router and are logging no problem ...
1
vote
1answer
933 views

How to enable a logrotation with Jenkins

I need to enable the logrotate service with Jenkins in order to rotate its log files (/var/log/jenkins/jenkins.log). So, I configured a script in /etc/logrotate.d with right permissions: /var/log/...
1
vote
3answers
161 views

Logrotate on “not always on” system

I have several Ubuntu 16.04 and 18.04 systems, whose have no defined operating hours, for example desktop, laptop or VMs runt on demand. What are the right ways and tools to automatically rotate logs ...
1
vote
2answers
3k views

Ubuntu 18.10 Tomcat8 catalina.out file path

In previosu version, I saw that the catalina.out file was created at /var/log/tomcat8/catalina.out location. As I was study for my current installation, Ubuntu 18.10 and last package version, I saw ...
3
votes
1answer
5k views

How to set size for system log

My server dumps because of huge system log files. I've heard that we could limit the size of system log by adding such a line size 100m into the file /etc/logrotate.d/rsyslog to do so. Now my /etc/...
0
votes
0answers
237 views

Mysql bin.log file rotation

I am trying to change the binary log rotation from days to hours. By default there is an option only for days in mysql config file: expire_logs_days. Is there any way, where i could change binary log ...
1
vote
2answers
4k views

Where should I look for logrotate config file of /var/log/mail.log

I would like to change the suffix of mail.log rotated files to include the date, such as /var/log/mail.log.20180920 I read from this question that /etc/cron.weekly/sysklogd should be changed, but I ...
3
votes
1answer
4k views

What is the syntax for commenting out lines in logrotate config files?

Not sure if this is possible at all. And what about empty lines? Update: Testing the config with logrotate -d /etc/logrotate.d/apache2 returns error: /etc/logrotate.d/apache2:1 lines must begin ...
0
votes
1answer
389 views

Does logrotate handle wildcards the same as ls?

I'd like to specify the files for logrotate to handle via the following wildcard string: /home/deploy/*/logs/nginx-*.log If I do ls with this wildcard string, it shows exactly the files I want to be ...
0
votes
0answers
64 views

logrotate is unable to list the created files in linux

i created my logrotate in /etc/logrotate.d/rsyslog /var/log/pcapcapture/capture.log { maxsize 100k minsize 100k hourly ...
4
votes
2answers
7k views

Logrotate configuration: it works, but always keeps 'current' log empty

I moved logging for openvpn into its own log and attempted to set up log rotation for it, but I've obviously done something wrong. Logging occurs as desired but always into the 2nd logfileopenvpn.log....
1
vote
0answers
799 views

Daily compress log files not working

This is the log file I am using to compress log files on a daily basis. /home/ubuntu/logs/server.log { daily missingok rotate 1 compress create dateext dateyesterday ...
0
votes
1answer
344 views

logrotate weekly archiving empties out daily files

My aim is to maintain 4 days' worth of log files so that on the fifth day, a zip file with all four log files is created. The four log files created so far are deleted. This is my logrotate.conf: /...
3
votes
1answer
825 views

How to configure logrotate in a default, most basic conf for an all-default system?

I have an all-default Ubuntu VPS machine with Nginx, for a few light WordPress sites with say up to 5 plugins, 10 webpages, 20 images each. So far I cleaned all default logs (or at least some of them)...
1
vote
1answer
2k views

What is the easiest way to setup Log rotation [duplicate]

Recently, I have setup a script that outputs to a single log file... After quite a while this file begins to become too large to manage. I was wondering what the easiest way is to setup log rotations ...
1
vote
0answers
1k views

rsyslog not write log after logrotate

OS: Ubuntu 16.04.3 LTS (GNU/Linux 4.4.0-101-generic x86_64) rsyslog not writing logfile mail.log after logrotate, file mail.log is empty. After restart rsyslog (service rsyslog restart) mail.log ...
1
vote
0answers
574 views

Log rotation is not working automatically

Trying to create log rotation, but it's not working automatically. write following code in .sh file and store in /etc/logratate.d/xxx: /var/log/xxx/*.log { daily missingok rotate 10 compress ...
2
votes
1answer
939 views

How to rotate graphite's logs?

We have the graphite-web package installed, which came with its /etc/logrotate.d/graphite-web. Unfortunately, the "out-of-the-box" file is broken -- the files are rotated, but the daemons writing ...
0
votes
2answers
900 views

How do I rotate my logs despite having running processes?

I'm running Ubuntu 14.04. I have this Rails project and my logs are exploding out of control size-wise ... myuser@myapp:~$ ls -al /home/rails/myapp/log/ total 3118220 drwxr-xr-x 2 rails rails ...
1
vote
1answer
39 views

logrotate does not produce any output

I set up a logrotate configuration file containing containing two entries. the file contains the following: /var/www/designer-24.com/var/log/* { daily missingok rotate 7 dateext ...
3
votes
1answer
8k views

How to rotate a log file in ubuntu on size basis hourly?

/opt/variable/log/myapp.log { rotate 24 hourly maxsize 10k compress ifempty postrotate reload rsyslog > /dev/null 2> & 1 || true endscript } I have copied ...
2
votes
1answer
11k views

How can I configure logrotate without having `/etc/logrotate.d/rsyslog`?

I am trying to configure log rotation on my Ubuntu machine so that logs are rotated every day and kept for 14 days. Most tutorials I find, such as this one, mention that I should modify /etc/logrotate....
5
votes
3answers
2k views

Why do only some of my logs get rotated?

I'm using Ubuntu 14.04. I have the following in my /etc/logrotate.conf file ... /home/rails/myproject/log { daily rotate 3 compress delaycompress missingok ...
0
votes
2answers
662 views

How to add custom logrotate configuration files to Ubuntu core?

Is there a way to add custom logrotate configuration files to Ubuntu core? /etc/logrotate.d is not writable. Should /writable/system-data/etc/logrotate.d be sourced? It doesn't seem to work and also ...
0
votes
2answers
3k views

Logrotate is deleting my logs

I have this logrotate config which is not in /etc/logrotate.d /path/to/my/logfile.log { su root root daily maxage 365000 copytruncate dateext dateformat -%d.%m.%Y } I run it ...
0
votes
0answers
736 views

How do I use logrotate to remove old log tarballs?

I'm using Ubuntu 14.04. I want to rotate log files daily, including deleting old tarballs. I edited my logrotate.conf file, /etc/logrotate.conf, like so /home/rails/myproject/log { daily ...
0
votes
0answers
3k views

Why logrotate is not running automatically in ubuntu 16.04?

I am on ubuntu 16.04 but from recent time I have seen complaints of very low system space. I tried to find and found that it was due to old log files so I find that the old files can be rotated as by ...
1
vote
1answer
297 views

Best ways to manipulate system logs

I want to manipulate logs. So far, for me the best way to clear system logs is: truncate -s 0 /var/log/*log I'm searching for the best ways to: 1 - Do the above periodically. I have already try ...
6
votes
3answers
8k views

MySQL logrotate error

I'm new to Linux and have setup a VPS running Ubuntu 16.04 with postfix, dovecot and rouncube using mariadb for the database. It all seem to be working okay but I regularly receive the following email:...
1
vote
1answer
1k views

logrotate - no such file or directory

Every morning I wake up to this e-mail from the Cron Daemon: /etc/cron.daily/logrotate: error: error accessing /var/log/ejabberd: No such file or directory error: ejabberd:1 glob failed for /var/log/...
2
votes
2answers
2k views

How to compress , keep and empty original file with gzip

For some reason I'm not being able to use logotate to compress files periodically. So I decided to write my own script, it's not the most hard thing but one small detail is pinning me down. When using ...
3
votes
1answer
30k views

Why is logrotate not running automatically?

I have set up a Syslog-ng server with some filters to split certain traffic into different files. I modified the logrotate file located at /etc/logrotate.d/syslog-ng to rotate these files daily, but ...
1
vote
0answers
744 views

Apache crashing with seg fault on a graceful restart on Ubuntu 14.04

One of the servers I manage runs Ubuntu 14.04.5 LTS with Apache 2.4.7 and PHP 7.0.11 , and uses PHP's Zend OPcache v7.0.11. It is noted that apache went down every time when we ran the service apache2 ...
3
votes
0answers
216 views

How to force log rotation more than one time in a day?

I'm trying to force the Apache logs rotations by executing sudo logrotate -f /etc/logrotate.d/apache2. When I executed the command for the first time, I get the logs rotated correctly. But if I ...
3
votes
0answers
1k views

how to make logrotate.d daily rotate each day at 00:00 exactly

I've followed the method shown at https://askubuntu.com/a/24526/498355 to make daily logrotate.d rotate at exactly 00:00. I have 2 physical servers which ubuntu 16.04 with the same date and timezone. ...
1
vote
1answer
2k views

Annoying access problem on /var/log/nginx

On my system (14.04), I'm not using www-data as the owner of nginx and php-fpm, using web instead. (for the curious: 1. because www-data is a ugly name, 2. for not using a user that everyone knows is ...