0

My problem is simple. I have 5 log files in a folder, like this: software1.txt, software2.txt, etc. My Logrotate script, as follows, runs daily:

/var/ftp/logs/*.txt {
  daily
  rotate 36500
  sharedscripts
  postrotate
    (restart services)
  endscript
}

This is the log I get when I run logrotate with the -d and -f option.

renaming /var/ftp/logs/apcupsd.txt.3 to /var/ftp/logs/apcupsd.txt.4 (rotatecount 36500, logstart 1, i 3),
renaming /var/ftp/logs/apcupsd.txt.2 to /var/ftp/logs/apcupsd.txt.3 (rotatecount 36500, logstart 1, i 2),
renaming /var/ftp/logs/apcupsd.txt.1 to /var/ftp/logs/apcupsd.txt.2 (rotatecount 36500, logstart 1, i 1),
renaming /var/ftp/logs/apcupsd.txt.0 to /var/ftp/logs/apcupsd.txt.1 (rotatecount 36500, logstart 1, i 0),
log /var/ftp/logs/apcupsd.txt.36501 doesn't exist -- won't try to dispose of it
rotating log /var/ftp/logs/auth.txt, log->rotateCount is 36500

As can be seen, it ignores the actual apcupsd.txt file, and only rotates the logs already rotated (so apcupsd.txt.0 does change to apcupsd.txt.1). I have never seen anything like this, and the strangest thing is it was working fine just a few weeks ago.

What could cause this?

  • 1
    Can we see the ls -l output of the /var/ftp/logs/. – slm Jul 23 '18 at 20:51
  • Pastebin here: here – BusinessGuy Jul 24 '18 at 11:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.