top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to rebuild logrotate.status on centos?

+1 vote
421 views

I have a problem in that at first all my log files were dated 12-31-1969 and logrotate has:

# more /var/lib/logrotate.status
logrotate state -- version 2
"/var/log/yum.log" 1969-12-31-20:26:1
"/var/named/data/named.run" 1969-12-31-20:26:1
"/var/log/httpd/error_log" 2015-8-27-4:43:1
"/var/log/wtmp" 1969-12-31-20:26:1
"/var/log/chrony/*.log" 2015-8-19-22:0:0
"/var/log/spooler" 1969-12-31-20:26:1
"/var/log/btmp" 1969-12-31-20:26:1
"/var/log/maillog" 1969-12-31-20:26:1
"/var/log/wpa_supplicant.log" 2015-8-19-22:0:0
"/var/log/secure" 1969-12-31-20:26:1
"/var/log/ppp/connect-errors" 2015-8-19-22:0:0
"/var/log/messages" 1969-12-31-20:26:1
"/var/log/cron" 1969-12-31-20:26:1
"/var/log/httpd/access_log" 2015-8-27-4:43:1

How do I get this file rebuilt with the dates currently on the files listed?

posted Sep 8, 2015 by Ankit

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

Whenever I've had a problem with logrotate.status files, I just delete them and let logrotate regenerate it the next time it runs
I hope this will help you.

answer Sep 10, 2015 by Alok Sharma
Similar Questions
0 votes

I am trying to use logrotate but struggling with it and not able to get the desired result. Can someone help me with some pointers or so which I can apply to rotate the files.
Any example of configuration will be great.

+2 votes

I am used to traditional update-rc.d et all.

Now I wonder how to add a a script that used to called by init.d (with start/sop ..) to the new "service start xx" regime.

All the tutorials I found talk about how to use update-rc.d..

+2 votes

I'm having an issue getting a C6.6 install to work on a 3 TB dual hard drive system, raid 0. I'm hoping that someone here can help.

So, I install as normal, but then reboot, and it comes to a grub prompt. Going into the system via Linux rescue, I see that most of the files dealing with the kernel haven't been installed.

I asked the maker of the server and he said that they have noticed this happen recently. A solution is to put the kernel files on a thumb drive, and then point the OS to look for them there.

I have yet to try it, but is there a better way to deal with this issue that anyone else has done?

+1 vote

I've been asked to give someone sudo rights across an entire environment without the benefit of something like puppet or chef or cfengine et al.

What I've come up with so far is this:

ssh -t miaprbicsra04v sudo -S /bin/echo "rsherman ALL=(ALL) NOPASSWD: /sbin/service /bin/rm /usr/bin/du /bin/df" >> sudo tee /etc/sudoers

Right now that's just to one host, but I plan on substituting a list of hosts once I get farther along. Problem is, the output hangs on the tee command. Not sure why. Any suggestions?

...