Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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. In S3 I have old logs from day 48->60 but the 1->47 doesn't appear.

My question is where does logrotate save their own log?! It's possible that I have some kind of problem with s3fs, but I need to know before I do anything. I tried to find somewhere the logs but I couldn't find it out.

Any idea?

Thank's!

share|improve this question
add comment

2 Answers

up vote 4 down vote accepted

logrotate does not log anything by default. normally it should be in your cron somewhere, for instance:

cron.daily/logrotate:/usr/sbin/logrotate /etc/logrotate.conf

you can either run that manually to see what is wrong, or redirect the logrotate output to a file in the above cron to see what happened next day.

likely somewhere the config is incorrect and caused the logrotate run to break.

share|improve this answer
    
+1 on running logrotate manually to see what's wrong –  cjc Apr 19 '12 at 12:20
    
thanks for the answer, but what I really want to know what has happened in my system to get this kind result. Thank's! –  enedebe Apr 19 '12 at 21:26
    
does manually run logrotate give any errors? if there are errors, you need to fix them in the conf file or /etc/logrotate.d/apache (or apache2). –  johnshen64 Apr 19 '12 at 21:50
add comment

If you're running logrotate from cron and not redirecting the output, the output, if there is any, will go to email for which ever id is running the cron job. I redirect my output to a log file.

For example:

25 3 * * 7 /usr/sbin/logrotate -s /home/user/conf/mwarelogrotate.state /home/user/conf/mwarelogrotate.conf >> /home/user/logs/logrotate.log 2>&1

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.