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

0
votes
1answer
9 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
53 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
161 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
48 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
42 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
40 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
27 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
0answers
33 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
42 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
35 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
43 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
32 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
33 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
62 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
43 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
54 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
19 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
97 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
52 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
48 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
19 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
123 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 ...
3
votes
2answers
541 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
37 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
58 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
120 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
117 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
155 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
78 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
60 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 ...
1
vote
0answers
51 views

Rotate svnserve logs; HUP needed?

I have SVN running on CentOS Linux 6.4 with svnserve and pass --log-file=/var/log/svn.log in the config file. This log is very large now and I need to start rotating it. I figure to add it to ...
0
votes
1answer
133 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 ...
-2
votes
2answers
206 views

Apache vhost log rotate by date

I've got Apache 2.2 running on Debian 7 (on a VPS), with virtual hosts defined for several different websites. I've set up individual error and access logs for each vhost, but I've not found a way to ...
2
votes
3answers
114 views

How does logrotate interact with hard linked files?

I have a service which insists on keeping it's log files in terrible locations. After all efforts to change where it keeps them failed, my next idea was to create hardlinks to those files somewhere ...
0
votes
0answers
122 views

What causes this logrotate behavior in Puppet?

After running logrotate, Puppet starts writing it's logs into /var/log/puppet/masterhttp.log-20130616. How come it doesn't keep logging in /var/log/puppet/masterhttp.log? It seems normal behavior is ...
0
votes
1answer
36 views

Yesterday-access.log is pointing to a different directory

Under /var/log/ispconfig/httpd/quotednews.com/ folder, the yesterday-access.log is pointing to a wrong directory. yesterday-access.log is just a symlink to: ...
1
vote
1answer
140 views

Debugging logrotate postrotate script

Following is my logrotate conf. /mnt/je/logs/apache/jesites/web/*.log" { missingok rotate 0 size 5M copytruncate notifempty sharedscripts ...
2
votes
1answer
137 views

unix logrotate specify chunk size

How can I specify output file size which I want after rotation? For example lets say I want to run logrotate when log file reaches 10MB and I want to split this log into chunks which are 1MB max. I ...
0
votes
0answers
99 views

MySQL replication & logrotate

I'm using MySQL Master-Slave replication for backup purposes (for a few days). Today after changing to expire_logs_days = 3 on master and slave I got this message (from slave): ...
0
votes
1answer
59 views

logrotate — moving logs by size

I want to move all logs bigger than 1M to "olddir" (/var/log/old in this case). I've googled and read the manpages, but haven't found a satisfactory solution.
0
votes
2answers
93 views

Null bytes in a file created by 2> rotated with logrotate?

I'm using the script utility to record terminal sessions, and using logrotate (with copytruncate, script ignores HUP and keeps writing to the rotated file otherwise) to periodically upload chunks of ...
-3
votes
2answers
458 views

Logrotate error for fail2ban

I get the following error when running a cron job, and I'm not too sure how to go about fixing. This is on Ubuntu 12.04 LTS. test -x /usr/sbin/anacron || ( cd / && run-parts --report ...
1
vote
1answer
253 views

Append date to domain logs with logrotate in Plesk 11

I am using plesk with a Media Temple DV 4.0 Account. It has a GUI to set up log rotation for my domains. However I need to append a date/time stamp to the logs so our stats software importer can ...
2
votes
1answer
209 views

How backup files with logrotate and Amazon S3?

I would like to create a new standard of two things: how long would be generated and be rotated the logs generated by my applications ? how to transfer the logs to Amazon S3, as a backup server ?. ...
2
votes
1answer
365 views

logrotate cron job not rotating certain logs

I added two scripts in "logrotate.d" directory for my application logs to be rotated. This is the config for one of them: <myLogFilePath> { compress copytruncate delaycompress dateext ...
0
votes
1answer
105 views

Logrotate rotating daily but should be rotating weekly

For some reason logrotate is rotating logs daily instead of weekly, even though all the config files for logrotate seem to be set to weekly. Any ideas? /etc/cron.daily/logrotate #!/bin/sh test -x ...
1
vote
1answer
154 views

Does fail2ban monitor rotated log files?

Does fail2ban continue to monitor rotated log files? For example, I have a rule monitoring /var/log/fail2ban.log which is automatically rotated by the system every week (7 days). I want to have a ...
2
votes
1answer
51 views

logrotate compress files as a different user than specified

Using the following logrotate config file, rotated files are being chowned to the specified user but not compressed ones. /var/log/file.log { notifempty missingok ...
0
votes
0answers
61 views

Logrotate 'nocompress' not honoured

Using RHEL6.1 & logrotate 3.7.8-12. I'm able to use logrotate & rotate my files. What I don't want is compression. For some reason, even after specifying 'nocompress', some files are getting ...
0
votes
1answer
309 views

How should I rotate rsyslog documents stored in mysql

I have setup rsyslog to dump syslog data into mysql so that LogAnalyzer can easily access and interact with it. How do I automate a job to remove syslog data of a certain age for the mysql database ...