Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Hi,
I have a CentOS 5 , I wanted to rotate the current system log files manually and download them for trouble shooting , so I went to /etc/logrotate.d and executed this command "logrotate syslog" , but when I went to /var/log directory , there was no messages.1 file ! the messages file was new , but seems messages.1 file is deleted ! is it normal ?
what is the proper way to rotate logs ?
Regards
Thank you , but the problem is that rotation has been done , but the file was missing ! there was messages and messages.2 file , but there was no messages.1 !
Hi,
I have a CentOS 5 , I wanted to rotate the current system log files manually and download them for trouble shooting , so I went to /etc/logrotate.d and executed this command "logrotate syslog" , but when I went to /var/log directory , there was no messages.1 file ! the messages file was new , but seems messages.1 file is deleted ! is it normal ?
what is the proper way to rotate logs ?
Regards
I've observed this issue with logrotate in the past, I'm not sure there is a solution. Anytime I use -f /path/to/conf/filename.conf it ends up wiping a log. I filed a bug report on the behavior at one point.
I've observed this issue with logrotate in the past, I'm not sure there is a solution. Anytime I use -f /path/to/conf/filename.conf it ends up wiping a log. I filed a bug report on the behavior at one point.
Could it be that it's wiping one because you have it set to only keep so many copies? default is usually 4 at most. Change your conf to keep longer retention on rotated logs.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.