On 15/06/2014 10:49 AM, André Nunes Batista wrote:
> # logrotate -f -v /etc/logrotate.d/ 2> logrotate.txt
>
> # cat logrotate.txt | grep syslog
> reading config file rsyslog
> rotating pattern: /var/log/syslog
> considering log /var/log/syslog
> rotating log /var/log/syslog, log->rotateCount is 7
> error: error creating output file /var/log/syslog.1.gz: File exists
> log /var/log/syslog.8.gz doesn't exist -- won't try to dispose of it
>
> # ls -lsh /var/log/syslog.1.gz
> 0 -rw-r----- 1 root adm 0 Feb 9 07:35 /var/log/syslog.1.gz
>
> # ls -lsh /var/log/syslog.1
> 3.8M -rw-r----- 1 root adm 3.8M Feb 8 07:35 /var/log/syslog.1
>
> So this issue appears to go back some months already, but I have no clue
> why it started. Also, it does no happen to every log file on /var/log,
> just some, eg., messages, debug, kern.log, auth.log.
It may have happened when logrotate tried to run twice on the same day.
The easiest thing to do is to rename the /old/ problem files (or move
them) and then try again to do a logrotate.
Cheers
A.