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.

learn more… | top users | synonyms

0
votes
0answers
42 views

Log rotation configuration generates binary zip files

My log rotation setup generates binary files name type is like app-01a.log.1.gz This is my configuration: /opt/app/logs/dip/*.log { size 512M rotate 10000 compress nodateext ...
0
votes
2answers
77 views

How to make room in /var/log partition

Tracking ubuntu 14.04.3 firewall info I enabled ufw full login for a while (now turned back off). Now I'm warned I run out of space in the /var partition. Looking there in I find 3 huge files: ...
0
votes
1answer
376 views

logrotate fails to rotate logs: error setting owner

Recently I've noticed that logrotate does not rotate my logs. user1@host:~$ /usr/sbin/logrotate /home/user1/logrotate.conf -v gives me an error: error: error setting owner of /home/logs/mylog.log.1 ...
0
votes
1answer
98 views

Logrotate - keep file for two days

Is there any possibility to configure logrotate so it will keep file for 2 days instead of 1? e.g. this configuration copytruncate daily compress dateext missingok leads to compressing file every ...
1
vote
1answer
113 views

How to change the day of the week Logrotate shifts the file when configured weekly?

I have following configuration which rotates all content of google folder weekly: /var/log/google/*.log { create 0777 www-data www-data weekly missingok rotate 90 ...
0
votes
0answers
95 views

/var/log/upstart/systemd-logind.log is not rotating (Ubuntu 14.04)

On several (corporate, not personal) Ubuntu 14.04 machines, I'm seeing the following behavior: # date Wed Nov 11 21:27:50 UTC 2015 # ls -lAF /var/log/upstart/ total 2416 [...] -rw-r------ 1 root root ...
0
votes
1answer
113 views

/var/log/syslog not rotating

Our log file /var/log/syslog does not seem to be rotating, even though the logrotate config /etc/logrotate.d/rsyslog exists: /var/log/syslog { rotate 7 daily missingok notifempty ...
-1
votes
2answers
483 views

How does logrotate work?

I am trying to monitor a log file which rotates frequently by logrotate. but i am unable to get that correctly. can any one explain how actually logrotate works? Is a file renamed and a new file is ...
1
vote
1answer
58 views

How do I identify which log is incorrectly rotated?

I'm receiving email prompts from two Ubuntu 14.04 servers around unusual logrotate behaviour. I don't have any packages installed which are not installed on other servers which don't exhibit this ...
0
votes
1answer
80 views

How can I configure logrotate to SCP multiple log files

I would like to copy multiple files form logrotate, so I try this : /var/log/mysql.log /var/log/mysql/mysql.log /var/log/mysql/mysql-slow.log /var/log/mysql/error.log { daily rotate 7 ...
0
votes
0answers
65 views

logrotate broken after security breech

I downloaded a PDF which evidently had Linux malware, which executed when I ran the PDF through firefox, or atril, Im not sure which. I figured it out shortly after running clamav, and I believe ...
0
votes
1answer
42 views

Rotate binary files

I'm trying to solve a problem with rotating binary files. I have video files which are recorded from IP camera, and I want to delete oldest files when I have less then e.g. 10 Gb of free space. ...
0
votes
0answers
48 views

Logrotate errors on weekends

Update: After a lot of trial and error, I figured out that my logrotate for the giant backup was causing all the errors on the other logrotates. I had tried to only get 2 rotations so it'd look like: ...
0
votes
0answers
29 views

/etc/init.d/apache2 file is being log rotated

For the last 5 weeks, I have monitored some strange behavior. Every week at logrotate process time, the init script /etc/init.d/apache2 is being rotated as if it were a log file. The first week it ...
4
votes
2answers
3k views

Nginx logrotate logs

I am running Ubuntu 15.04 and have a standard installation of nginx (apt-get install nginx) running. Everything is running fine but I notice that the nginx logs are being rotated but nginx carries on ...
1
vote
0answers
110 views

Apache daemon problem /etc/init.d/apache2

For the last 5 weeks, I have monitored some strange behavior. Every week at logrotate process time, the init script /etc/init.d/apache2 is being rotated as if it were a log file. The first week it ...
1
vote
0answers
33 views

Log rotate daily time for specific application

I know that similar question has been already asked, but there was something I am missing: Is there any option to specify the hour of rotating the logs, but only for one application ? I know that ...
2
votes
1answer
266 views

logrotate seems work incorrect

I'm using: Linux workdesk 3.16.0-31-generic #43~14.04.1-Ubuntu SMP Tue Mar 10 20:13:38 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux Distributor ID: Ubuntu Description: Ubuntu 14.04.2 LTS Release: ...
1
vote
1answer
346 views

Can logrotate suffer race conditions?

I have a PHP application that can generate quite a lot of log information. I'd like to use logrotate to make sure these logs don't get out of hand over time. However, I'm concerned about race ...
0
votes
1answer
470 views

What exactly does logrotate do to apache log files? (apache 2.4 - ubuntu 14.04)

Other than a couple of basic VHOST's, I have default apache and apache logging configuration. Whenever I try to view my apache log files (error.log, access.log) I see that these files keep getting ...
3
votes
1answer
11k views

Ubuntu 14.04 - logrotate does not rotate /var/log/* (rsyslog config)

I have a bunch of Ubuntu 14.04 servers I manage where logrotate is not rotating anything under /var/log/*. I'm going to assume its an issue with the /etc/logrotate.d/rsyslog as I see other entries in ...
1
vote
1answer
4k views

What schedules logrotate?

I'm working on the program which creates a big log file. I want to handle it with logrotate. This is a configuration I put to /etc/logrotate.d/: /var/log/myproject.log { hourly maxsize 1 rotate ...
1
vote
1answer
501 views

Logrotate: Using multiple criteria for rotating

How can I set a rotating policy based on a disjunction of size and frequency criteria. I have tried the following: "/var/log/uwsgi/*/*.log" { ... size 400M daily rotate 14 .. } However, ...
0
votes
1answer
3k views

Logrotate: run every N hours

Consider a server which generates extensive logging, which are archived using logrotate and bz2: "/var/log/uwsgi/*/*.log" { copytruncate daily rotate 14 compress delaycompress missingok ...
8
votes
0answers
616 views

Upstart not reopening log files on logrotation

We use upstart to manage our services on our Ubuntu servers. They produce logs which are logged out to /var/log/upstart/SERVICE_NAME.log Then daily, the log files are rotated using the logrotation ...
0
votes
3answers
1k views

How to prevent logs from getting too big?

I have a cronjob that runs some Python scripts and they generate massive log file. How do I prevent them from getting so big? It'd be perfect if the file was deleted once it hit a certain size. ...
0
votes
2answers
87 views

How can I know how many archived logs are saved?

In /var/log/apt, I am seeing: $ /var/log/apt $ ls -l total 100 -rw-r--r-- 1 root root 3343 Feb 14 22:34 history.log -rw-r--r-- 1 root root 2156 Jan 31 06:03 history.log.1.gz -rw-r--r-- 1 root root ...
2
votes
2answers
11k views

Log files are taking too much space and I can't delete\clear them

After using Ubuntu for 2.5 months, my /var directory reached around 37 GB or RAM while my / directory is all 50 GB or RAM and the rest of space is for my /home. I found that the following files are ...
5
votes
1answer
2k views

Configuring logrotate without root access (per user log rotation)

How best can logrotate be configured, on a per-user basis, to rotate files in the home directory of the user, under control of a per-user crontab -e?
1
vote
2answers
3k views

Purpose of “postrotate invoke-rc.d rsyslog rotate” when logrotating, and is this command outdated?

When using logrotate to keep log files rotating, I have seen postrotate invoke-rc.d rsyslog rotate > /dev/null endscript I know postrotate makes bash execute the following ...
0
votes
1answer
2k views

Make the daily log rotate run on exact time

I have Ubuntu 12.04.2 LTS server. My daily log rotations which are listed under /etc/logrotate.d/ are executed at the morning around 7:00 am, but it is not on exact time, each day it changed on range ...
5
votes
2answers
5k views

Which script rotates /var/log/auth.log?

I cannot figure out where /var/log/auth.log is rotated. I found the file /var/log/auth.log.2013-09-16 on my system, which contains log entries previously found in /var/log/auth.log. Where does that ...
1
vote
3answers
674 views

tail stops displaying in case of a log rotation

I have to tail the log of a server (servicemix) and the log rotation is enabled. As soon as the rotation happens, tail stops displaying. I did some investigations and it is a bug in Debian : Debian ...
4
votes
1answer
5k views

How can I configure logrotate to copy/SSH apache log files

I'm working on an apache logs analyser, it requires the apache log files to be imported into a directory for processing. I cannot simply point it to the apache logs directory as it imports each file ...
1
vote
1answer
9k views

How To rotate syslog daily?

I want to rotate my syslog daily... How do I do this? How to check whether log rotate is working? How to make it run daily? By default, does Ubuntu Server run logrotate daily? Or do I have to set it ...
1
vote
3answers
2k views

how to change file permission of a file permanently that is set back to default on boot

I have a file /var/logs/apache2/error.log. And every time I boot, Its file permission is changed to default (unwritable) by the system. So, i have to run chmod command every time i boot-up. How to ...
13
votes
1answer
22k views

Specify the time of daily log rotate

I noticed that daily log rotations which are listed under /etc/logrotate.d/ are executed in the morning around 6:40 am. This is clear from the beginning and ending of the log files. Can I customize ...