logrotate is designed to ease administration of systems that generate large numbers of log files. It allows automatic rotation, compression, removal, and mailing of log files. Each log file may be handled daily, weekly, monthly, or when it grows too large.

learn more… | top users | synonyms

-2
votes
0answers
14 views

Apache error.log fails to update during Log Rotation

I have configure my Apache to create rotated logs for every periodic time. It worked fine with my local PC, but when it is being configured on to a server system, the actual error.log file is not ...
1
vote
1answer
24 views

logrotate: neither rotate nor compress empty files

i have just set up an (r)syslog server to receive the logs of various clients, which works fine. only logrotate is still not behaving as intending. i want logrotate to create a new logfile for each ...
0
votes
1answer
25 views

How to rotate log files when running pyapns and twistd

I use pyapns (Iphone push server) which in turn uses twisted (twistd daemon). twistd daemon produces twistd.log files. It rotates them to twistd.log.1, twistd.log.2 and so on when twistd.log reaches ...
0
votes
1answer
14 views

Configuring Logrotate for Fluentd files. Necessary?

I have the following fluent.conf <source> type forward </source> <source> type monitor_agent port 24220 </source> # Listen DRb for debug <source> type ...
0
votes
1answer
22 views

PDNS log rotation

I wonder what's the recommended way to rotate PowerDNS log files. I added the following entry to logrotate: # cat /etc/logrotate.d/pdns /var/log/pdns/*.log { daily rotate 7 compress ...
0
votes
0answers
23 views

How to make permission of mysql log file stick?

I am running a custom cron script to do log rotation and email newly compressed log files. Due to permission problems, I have to set the group user to root instead of the default mysql so that the ...
0
votes
1answer
35 views

Rotate whole /var/log

I want to rotate the whole /var/log folder on my server every day so I have the /var/log folder and compressed files like "log.1.gz" which contains the whole directory. I can't found anything on the ...
0
votes
1answer
45 views

apache error logs issue

I have a vps server but the vps provider stop managed service. I having problem with logs file. Every thing seems was alright, but after few month auto logs deletion does not working. Every minute the ...
12
votes
3answers
494 views

How to continue redirecting stdout to a file after logrotate moves it?

I have a simple script which outputs a bunch of logs to screen and I piped the STDOUT to a file to store the logs. Since this script is long running, I needed to rotate the log files so they are ...
2
votes
1answer
55 views

Why auth.log gets rotated multiple times every day?

I noticed a suspicious behaviour of my auth.log. For some reason it is getting rotated multiple times everytime it should rotate. 2014-06-15 06:25:06,102 fail2ban.filter : INFO Log rotation ...
1
vote
4answers
229 views

Logrotate appends “1” at the end of compressed file

I have a script which runs as a cronjob every 30 mins and takes mysqldump of some tables. The dump files are stored in /var/log/ as ...
0
votes
0answers
20 views

Apache logging: Are there any alternatives to piped logging that allow for automatic compression?

Are there any alternatives to Apache's rotatelog that will also compress logs? Logrotate is not an option due to requiring a restart. Ideally this would be a utility that can be used to pipe logs from ...
1
vote
2answers
170 views

How to go about rotating logs which are arbitrary named and placed in deeply nested directories?

I have a couple of hosts which are basically a playground for developers. On these hosts, each of them has a directory under /tmp where he is free to do all he wants - store files, write logs etc. Of ...
2
votes
1answer
109 views

Rotate haproxy logs

I tried few things but still not able to rotate haproxy logs efficiently. I need to rotate logs when log files crosses 500 MB size. Considering haproxy is serving large no. of static tcp connections, ...
0
votes
0answers
70 views

Remove old logrotate entries

Recently I have removed nginx on my server running Debian Linux and since then, I keep getting the following email every day: root@server:~# tail /var/mail/root Content-Type: text/plain; ...
0
votes
0answers
43 views

How do I go about rotating nginx + passenger logs?

I've got nginx with passenger running on debian squeeze. passenger's error output goes to master error log, as you may know. And when logrotate rotates the log, ruby applications continue to write to ...
1
vote
2answers
109 views

Changing LogRotate's default way of rotating the log files

My observation of logrotation is that to rotate any log file, the logrotate process, in the following order copies the log file in question (lets call it file1.log) with a new name (adding time ...
0
votes
1answer
28 views

logrotate mailing of uncompressed logs

The man page of logrotate has this sample configuration file: # sample logrotate configuration file compress /var/log/messages { rotate 5 weekly postrotate ...
0
votes
1answer
19 views

Log not readable after rotation by daemontools

I have a log, which looks perfectly fine. However, after the log rotation by daemontools, it is no longer human readable. What could be the problem?
0
votes
1answer
295 views

Logrotate for node.js app deployed using monit and upstart

I deployed a web application in node.js by following the guide: Deploying Node.js With Upstart and Monit . The app produces some log via console.log(). In the upstart script, it's redirected to a log ...
1
vote
1answer
334 views

SELinux permissions for LogRotate and Apache

With the directory structure: /www/live/website1/app/ /www/live/website1/files/ /www/live/website1/logs/ Where Apache needs at least the following access: app: read-only access, but read-write is ...
2
votes
1answer
208 views

Manually rotate a log file

I have an Ubuntu web server running Nginx. I had never configured logfile rotation and have just discovered some multi-gigabyte monolithic log files. I have configured log rotation now per these ...
1
vote
1answer
269 views

Squid3 logrotate error in Ubuntu 12.04

In a Ubuntu 12.04 server, logrotate for Squid3 is not working. I have found the problem while noticing the partition is getting full from squid3 logs. A forced logrotate yields the following error: ...
1
vote
1answer
325 views

Logrotate: Postrotate setfacl failed with no such file or directory error

I set some extended ACL entries for /var/log/squid3/ and /var/log/squid3/access.log. sudo setfacl -m u:jetty:r-x,g:adm:r-x /var/log/squid3 sudo setfacl -m u:jetty:r--,g:adm:r-- ...
1
vote
1answer
130 views

Is it possible to schedule a python script to run at the end of logrotate?

I am using Piwik Analytics on a site that doesn't run any javascript and I would prefer to have data created from the access logs instead of from the image tracker - results from the logs are actually ...
0
votes
1answer
68 views

does the sharedscripts setting for logrotate apply to all processed logs, or only those in the current context?

So I have a number of apache logs I like to handle with logrotate on a developer box. Some of them are for user sandboxes, others are for staging versions and such. The logrotate config looks like: ...
0
votes
1answer
91 views

Linux cp with gzip and numbered backup in one step?

I'm wanting to copy a file and gzip it in a single command/step But I want to do numbered backup if the file already exists i.e. "cp --backup=numbered" or similar. The reason for the single step is ...
-1
votes
1answer
44 views

Web server stops logging [closed]

I have Virtual Hosts set up so that each VH has its own set of logs for access and errors. For some reason, these stop logging and returns to the default server logs randomly after logrotate kicks in ...
1
vote
2answers
90 views

Log rotate log from standard out

I have a program which takes an argument to allow extra debug from a piece of hardware we use. The log is just written to standard out so normally we just pipe the standard out to a file i.e. ...
0
votes
1answer
73 views

logrotate httpd on centOS 6.4

I am attempting to set up logrotate. I am getting unexpected results; some log files have multiple dates and/or zero bytes in size. I would like to have a log for each day and have the date in the ...
0
votes
1answer
65 views

Logrotate Ubuntu 12.04 LTS [closed]

Is logrotate set up by default on Ubuntu 12.04 LTS? Or do I need to configure it? I can see /etc/cron.daily/logrotate so I guess it should be working out of the box? Is it rotating all files inside ...
1
vote
2answers
58 views

Rotatelogs rotating log files mid log entry

I have a c++ tool that outputs to STDOUT via printf i.e. printf ("%s\n", logline); I then pipe that to rotatelogs i.e. tool | rotatelogs /tmp/logs/log_%s 60 Everything works great, but ...
0
votes
0answers
107 views

/etc/cron.daily/logrotate: line 4: 12425 Segmentation fault

I receive every day this error, I checked with strace, this is output: root@vps2 [~]# strace /etc/cron.daily/logrotate execve("/etc/cron.daily/logrotate", ["/etc/cron.daily/logrotate"], [/* 27 vars ...
0
votes
0answers
84 views

Sleeping for a random interval in postrotate in logrotate

I'm having trouble with the following logrotate config. It doesn't seem to want to release that file once it has done it's rotate and I'm wondering it the sleep is messing with the restart. ...
0
votes
0answers
89 views

Logrotate config for a laravel application

I have a laravel application which writes the log file names like log-apache2handler-2013-11-17.txt In my logrotate script, I am doing *.txt however this filename is going to change everyday, so by ...
0
votes
1answer
26 views

log rotation unable to process mailfirst

I have configured log rotation on my Ubuntu server named custom in the directory /etc/logrotation.d/custom the entries are as follows /var/log/apache2/access.log { daily mailfirst ...
5
votes
1answer
131 views

How does logrotate handle concurrency?

In the case that logrotate runs the same time as the log file is being updated, what will happen? Will the new log be rotated into a historical log file? Or it will stay in the current log file? ...
1
vote
2answers
99 views

make logrotate to only rotate at service startup

i'd like to do logfile rotation for whenever i start a service, but never "automatically". i'm running a python-based service that logs to a specific logfile. the service (currently) does not support ...
0
votes
0answers
74 views

Apache2 on Windows - Log Files don't rotate

I've got an Apache 2.4.6 (64 Bit) running on a Windows Server 2012 (64 Bit) machine. I want to achieve a log file rotation every day or if a size of 29MB is reached. As documented on ...
0
votes
0answers
32 views

logrotate by size outside the daily schedule

We have a couple of applications that generate huge log files. It's not enough to rotate those logs daily, so I created the following logrotate conf: /var/log/ourapp/*log { compress copytruncate ...
0
votes
1answer
217 views

Debian cron complaining about log dir ownership since upgrade to Wheezy

I'm getting errors from cron like this: /etc/cron.daily/logrotate: error: skipping "/var/log/apache2/access.log" because parent directory has insecure permissions (It's world writable or ...
4
votes
2answers
1k views

Rsyslog stops sending data to remote server after log rotation

In my configuration, I have rsyslog who is in charge of following changes of /home/user/my_app/shared/log/unicorn.stderr.log using imfile. The content is sent to another remote logging server using ...
-1
votes
1answer
40 views

specify multiple filenames in one line. bash

guys. im trying to add to logrotate files from a some directory. it should be either *.txt files or *_log files. wtat's the right syntax for this: /var/www/html/groupware/horde_logs/[*.txt|*_log]{ ...
-2
votes
1answer
85 views

CentOS 6.3: logrotate and btmp

I had to configure logrotate on a server configured by other system-network administration. First of all I detected that there is no crond, so I had to install sudo yum install vixie-cron. All other ...
0
votes
1answer
283 views

How to stop logrotate from changing the rotated logs owner

I have a logfile owner by the 'apache' user that I would like to rotate with logrotate. I would like to do that by running logrotate as a different user, say 'web' using the copytruncate strategy. ...
1
vote
1answer
500 views

Mongodb - proper way to rotate logs

Mongo docs say that I can: use -SIGUSR1 signal and get the old log renamed and current switched use logrotate from OS I want the OS's logrotate ability to zip old files and remove oldest, but see ...
0
votes
1answer
279 views

using logrotate with prerotate/postrotate scripts

I need to deliver csv file with some data which will come from my application. Structure of file shall look like this: time,time,meas_type,meas_val[1],meas_val[2],meas_val[3] ...
0
votes
1answer
124 views

Disk usage of Puppet reports

We are running puppet-dashboard on the puppetmaster which processes all the reports and puts them in a MySQL table. Every month about 5GB of reports are generated however in /var/lib/puppet/reports. ...
0
votes
1answer
90 views

Best way to rotate Magento logs?

We have a lot of sites on Magento and the logs are getting gigantic, so I'm wondering if the best way is to use a cron script to rotate them or logrotate. I want to avoid making file copies as it ...
0
votes
1answer
246 views

Daily queries log file

Has MySQL a daily log rotation system? like Apache that creates daily log files? I'm having a very hard time to find any good info about this. Win Server 2008 R2 MySQL 5.1.11 I'm logging all ...