-1

I had to configure logrotate on a server configured by other system-network administration. First of all I detected that there is no crond, so I had to install sudo yum install vixie-cron. All other setup seems ok /etc/cron.daily/logrotate file exists. Next I ran sudo logrotate -d -f logrotate.conf to check how it will works. At the end of execution I see this:

rotating pattern: /var/log/btmp  forced from command line (1 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/btmp
  log needs rotating
rotating log /var/log/btmp, log->rotateCount is 1
dateext suffix '-20131004'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
glob finding old rotated logs failed
renaming /var/log/btmp to /var/log/btmp-20131004
creating new /var/log/btmp mode = 0600 uid = 0 gid = 22

But nothing happens with /var/log/btmp still same size, and /var/log/btmp-20131004 not exists.

happy_marmoset
  • 201
  • 2
  • 5

1 Answers1

1

You told it not to. From the man page on logrotate:

   -d, --debug
          Turns on debug mode and implies -v.  In debug mode, no changes
          will be made to the logs or to the logrotate state file.

Note "no changes will be made to the logs".

MadHatter
  • 78,442
  • 20
  • 178
  • 229