Logrotate: glob finding old rotated logs failed

General Tech Bugs & Fixes 2 years ago

0 1 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Bugs & Fixes related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (1)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

 

I am having problems with logrotate. The configuration is the following

/var/log/cron
/var/log/maillog
/var/log/messages
/var/log/secure
/var/log/spooler
/var/log/unused.log
/var/log/kern.log
/var/log/daemon.log
{
    #Modified by CGSL!
    compress
    dateext
    maxage 90
    rotate 100
    missingok
    notifempty
    size +4096k
    create 640 root root
    sharedscripts
    postrotate
        /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
    endscript
}

I am interested in rotating the /var/log/daemon.log, the output of executing

logrotate -fv /etc/logrotate.d/syslog

is

reading config file /etc/logrotate.d/syslog
reading config info for /var/log/cron
/var/log/maillog
/var/log/messages
/var/log/secure
/var/log/spooler
/var/log/unused.log
/var/log/kern.log
/var/log/daemon.log


Handling 1 logs

rotating pattern: /var/log/cron
/var/log/maillog
/var/log/messages
/var/log/secure
/var/log/spooler
/var/log/unused.log
/var/log/kern.log
/var/log/daemon.log
 forced from command line (100 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/cron
  log needs rotating
considering log /var/log/maillog
  log needs rotating
considering log /var/log/messages
  log needs rotating
considering log /var/log/secure
  log needs rotating
considering log /var/log/spooler
  log does not need rotating
considering log /var/log/unused.log
  log needs rotating
considering log /var/log/kern.log
  log needs rotating
considering log /var/log/daemon.log
  log needs rotating
rotating log /var/log/cron, log->rotateCount is 100
dateext suffix '-20190411'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
rotating log /var/log/maillog, log->rotateCount is 100
dateext suffix '-20190411'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
rotating log /var/log/messages, log->rotateCount is 100
dateext suffix '-20190411'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
destination /var/log/messages-20190411.gz already exists, skipping rotation
rotating log /var/log/secure, log->rotateCount is 100
dateext suffix '-20190411'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
rotating log /var/log/unused.log, log->rotateCount is 100
dateext suffix '-20190411'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
rotating log /var/log/kern.log, log->rotateCount is 100
dateext suffix '-20190411'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
glob finding old rotated logs failed
rotating log /var/log/daemon.log, log->rotateCount is 100
dateext suffix '-20190411'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
glob finding old rotated logs failed
set default create context

What does this error mean?

glob finding old rotated logs failed

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.