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

1
vote
1answer
89 views

In logrotate, where does postrotate log errors?

If there are errors in the postrotate script block, where are they logged in Ubuntu?
3
votes
1answer
516 views

rotating logs with logrotate

I want to schedule logs rotate with these rules: log files for the last 2 day are kept untouched log files older than 2 days are archived and moved to folder named by date, they were created. (For ...
2
votes
3answers
4k views

Why does my CentOS logrotate run at random times?

I put a logrotate configuration file in /etc/logrotate.d/ and expected the logs to rotate at a consistent time; however, they do not... log rotation times are seemingly random +/- one hour. Why are ...
0
votes
1answer
295 views

Hosts.deny file not being updated by denyhost service

I have denyhosts running on my server to block IPs that repeated fail to login over ssh, for example brute force style attacks. I can see that entries in the auth.log file have not been updated in the ...
0
votes
1answer
203 views

What actually calls logrotate in CentOS 6.3

What actually calls logrotate in CentOS 6.3? I looked inside of /etc/init.d but nothing related to logrotate there. Also, nothing in the crontab for the root user. Thanks.
4
votes
1answer
942 views

Rotating logs generated by a process that logs to stdin

I have a long running process, that writes its log file to stdout. I would like to save this output to different files, automatically maintain these files (like deleting/archiving the old ones), ...
1
vote
1answer
1k views

PHP-FPM signals for pool error_log rotation

I am moving all my server's log rotation tasks for logrotate. The server has several PHP-FPM pools, each of them configured with a separated error_log directive. The logrotate recipe for the logs is ...
0
votes
2answers
60 views

Logrotater Daily situation

Every day I would like to run logrotate on /var/trafficap/captured/arch/ and zip all the zip packages I have for each day ( its 1 package.zip with a name like this : ...
1
vote
1answer
1k views

Rotating Iptables logs with logrotate

I'm running CentOS6 and I configured rsyslog to monitor my iptables warning messages and dump them in /var/log/iptables.log. I went through my logrotate.d/syslog file and added iptables.log so ...
1
vote
1answer
229 views

Linux logrotate offset delay

I have servers with huge daily size of log files ~ 1GB. I want to do daily logrotate at midnight. The problem is for each rotated file missing first 17-25 minutes after midnight and same file ...
9
votes
1answer
3k views

How can I rotate many log files into a different subdirectory per rotation?

I have a directory with many log files, all of which I would like to rotate daily. For organizational purposes I would like to be able to move the rotated logs into a different directory (or ...
1
vote
1answer
53 views

logrotate : Contents are missing

I'm using logrotate to rotate my log file periodically (in my case every 1 hour checking for log file size and rotate if needed using cron). I'm facing a serious issue in it. The following files ...
2
votes
4answers
791 views

How important is it to keep size of log files down?

I have a LAMP server where logrotate does its job once per week, and I notice some logs tend to get quite large. For example, the apache access-log is 73MB. Is it better that I tell logrotate to ...
0
votes
2answers
63 views

Logrotate, is this a proper config for what I want to do?

I started using logrotate a few days ago on a new server setup (actually three of them). My config is as follows. /var/www/mywebsite.com/logs/*.log { rotate 14 daily dateext compress ...
3
votes
2answers
3k views

How can I get logrotate dateext to reflect the log date rather than the rotation date?

My Apache logrotate config looks like this: /var/log/http/*log { monthly dateext dateformat .%Y.%m [... rest stripped for brevity ...] } This works great, except that the date on ...
1
vote
0answers
428 views

Windows Apache logrotate.conf equivalent for rotatelogs.exe to overwrite logs

Our disk is getting full real fast on Windows with Apache Logs.I want to overwrite old log files so that there are only 10 files at any 1 time with a capacity of 5M each. Is there a way to use rotate ...
0
votes
1answer
546 views

logrotate deletes all maillogs older than one day

I see only two files maillog and maillog.1 in /var/log. grepping for maillog in logrotate.d directory gives three files that have a mention of maillog. syslog /var/log/messages /var/log/secure ...
0
votes
2answers
291 views

logrotate: keep N newest files, but don't rename

I have a service that automatically creates a log file with a timestamp in the filename on startup. Thus, I don't need logrotate to rename/copy/create files, but what I do want is that logrotate shall ...
8
votes
4answers
2k views

log rotation --Windows

I am looking into log rotation for our web server (not apache) on Windows. I have heard of cronolog, CHOMP, and others. Does Windows have a built-in rotation .exe? What have you found to be a good ...
9
votes
2answers
3k views

MySQL doesn't logs error to new file after rotating?

Problem solved but I'm writing down for the future reference. /root/.my.cnf [mysqladmin] user = root password = pa$$w0rd /etc/logrotate.d/mysql /var/log/mysql-slow.log ...
1
vote
2answers
505 views

nginx - log access and error to pipe and use multilog to log rotate

What I am trying to do: Log rotate nginx access and error log using multilog My approach: Log nginx access and error to a pipe, so I can have another process that runs multilog that reads from that ...
2
votes
1answer
556 views

logrotate not deleting old files - glob failing

I'm stumped with this one. Any help is much appreciated...! Logs in /var/log/HOSTS/cacheflow_access_log/ are configured to archive to /var/log/HOSTS/archived/cacheflow_access_log/ and compress. These ...
3
votes
1answer
1k views

logrotate is not executing custom shell script in postrotate

I have following logrotate configuration file /home/application/*/shared/log/*.log { daily rotate 10 missingok nocompress notifempty copytruncate sharedscripts postrotate echo ...
6
votes
2answers
372 views

Logrotation - postrotate firing too soon?

I have a configuration file that looks like: /var/log/nginx/*.log { daily missingok rotate 90 dateext compress notifempty create 644 root adm ...
-2
votes
2answers
96 views

Compress files with logrotate [closed]

I have a directory structure which contains files already rotated (eg. there is a date part applied to the end). I would like to compress them and keep only 7 of each file type. Is this achievable ...
2
votes
0answers
112 views

Logrotate directories (not files)

I have an application creating logfiles in a structure like this: maillog/ 2012-07-02/ production_environment-2012-07-02__23_51_50-1341265910-some name.log ...
0
votes
2answers
1k views

Logrotate httpd (apache) logs - Possible without reloading httpd after log purge?

Lets start with a small dump: /var/log/httpd/*log { compress missingok notifempty sharedscripts delaycompress postrotate /sbin/service httpd reload > /dev/null ...
1
vote
1answer
846 views

Logrotate get created file name

I can produce file truncated from original log file with timestamp extention (%y%m%d%s). How can I get the name of created file in order to use this name in 'postrotate'. The following conf file does ...
1
vote
1answer
215 views

logrotate: how to detect failure

# logrotate -d /etc/logrotate.conf ... reading config info for /var/log/rsyncd.log error: rsync:12 duplicate log entry for /var/log/rsyncd.log error: found error in /var/log/rsyncd.log , skipping ...
17
votes
4answers
14k views

logrotate daily and size?

If a logrotate config is specified with "size" and "daily" parameters, which one takes precedence? Where is this documented? I would like these rotations to occur as a boolean OR operation, ie, if the ...
0
votes
1answer
471 views

logrotate not rotates my logs [duplicate]

My logrotate works perfectly, except for this configuration: /var/awdata/awarchive.*.log /var/log/awstats.log { rotate 12 } This is my logrotate -d /etc/logorate.conf output: considering ...
3
votes
1answer
6k views

manually rotating logfile with rsyslogd

I want to force logfile rotation using logrotate -f /var/log/syslog, but it's only return tones of: error: syslog:1 unknown option 'May' -- ignoring line error: syslog:1 unexpected text I know that ...
13
votes
3answers
8k views

Logrotate not working

I am trying to get logrotate to work on my VPS to rotate my apache files weekly. Currently the contents of the apache2 config file is as such. "/var/www/user/site.com/logs/*.log" { weekly ...
6
votes
2answers
1k views

How can I specify multiple rules for a particular log file(s) with logrotate?

I have a logrotate.d config file that looks something like this: /home/myapp/log/* { daily compress dateext ifempty delaycompress olddir /home/myapp/baklog } There are a few ...
2
votes
1answer
242 views

logrotate> removing delaycompress function: should I compress the last log myself?

I'm removing the delaycompress function from my logrotating script. Before running logrotate again, should I compress the last log myself ? This is the actual situation: -rw-r----- 1 root adm 4,7M ...
1
vote
2answers
152 views

Advice on apache log files

I have a small VPS that a friend and I use to host a few websites. We are both relatively inexperienced with server management and are unsure of an effective way to deal with the logs that Apache ...
2
votes
2answers
1k views

Where does logrotate save their own log?

I have a logrotate running into a EC2 AWS machine rotatting Apache logs. Once packed, apache logs are saved into AWS S3 via s3fs. The problem is that I recetly noticed that I didn't have logs rotated. ...
3
votes
3answers
103 views

logrotate security

Are there any concerns about the security of logrotate running as root? Had someone ask couldn't a malicious user subvert the config to overwrite anything? Is is okay to run logrotate out of the ...
6
votes
1answer
4k views

Logrotate does not remove old logs

for some reason the old log files are not deleted. Example with apache What the conf file says: $ cat /etc/logrotate.d/apache2 /var/log/apache2/*.log { weekly missingok rotate 2 ...
8
votes
3answers
9k views

logrotate not rotating the logs

I have this logrotate config and I am running on Ubuntu 10.04. /var/log/mysql/mysql-slow.log { daily rotate 3 compress notifempty missingok create 660 mysql adm postrotate ...
8
votes
3answers
552 views

Free-space driven log rotation on linux?

Someone just asked me 'how long should we keep logs for our application', and my answer was 'until the disk is full' as there's no reason to throw them away other than running out of space. However, ...
0
votes
1answer
309 views

Memcached logrotate file not being installed. Bug with memcached 1.4.2?

My memcached logs are getting huge (in excess of 5GB). This isn't a huge problem in itself. I can easily remove them. I've sourced the problem to the memcached 1.4.2 package not installing a ...
3
votes
1answer
208 views

Can I manually compress file when logrotate with delaycompress is active

I have a daily logrotate set up with compress, missingok, delaycompress, dateext options. I need to compress the delayed log file. Can I do it manually now or should I wait till logrotate does it when ...
0
votes
1answer
675 views

using logrotate on win7 with cygwin

I am using the famous logrotate with windows 7 and cygwin, I have the latest cygwin dll but somehow the app doesn't work for me, and the config file seems to be ok. Has anyone encountered this before? ...
0
votes
1answer
226 views

setting logrotate to use UTC time

Is it possible to force logrotate to use UTC time for one configuration? I need the dateext to be set to UTC. I was hoping it was as simple as setting a date varible. Should I just run postrotate and ...
0
votes
2answers
403 views

Apache Log Rotation

Is there any mod or program for Apache Httpd which rotate logs as well as purge them without the restarting of server processes? I have checked a few options, mod_autorotate, rotatelogs, ...
0
votes
2answers
276 views

Logrotate won't rotate logs with a space

I have a log file a service of mine makes that has the filename "Feed1 - 1.stat". logrotate refuses to rotate this file, but only when run via cron. Running logrotate via the shell will rotate the ...
12
votes
3answers
7k views

Equivalent of LogRotate for Windows?

We have a huge logfile being written by a vendor's application. Let's assume the vendor won't do anything that we ask. Is there any way of rotating that logfile somehow? We're looking at about 300 MB ...
1
vote
3answers
1k views

Apache becomes unresponsive on Sundays

For some reason, most Sundays around 5-6AM local time Apache is not working properly. I can't find the reason, and I'm stuck troubleshooting. I'm running Magento on Apache2 with an SSL certificate, ...
19
votes
4answers
4k views

Equivalent of logrotate on OSX

Is logrotate hiding somewhere on OSX, or is there an equivalent? It's not in /usr/sbin.