AXISHK
asked on
Setup logrotate on Linux
I have setup a logrotate for a linux daemon, under /etc/logrotate.d/xxxx. Is that all for setting up a logrotate ? How can I click out a logrotate to test the logrotate at once ? Tks
/var/log/xxxx.log /var/log/yyyy.log {
missingok
notifempty
size 1M
daily
compress
create 0600 root root
}
/var/log/xxxx.log /var/log/yyyy.log {
missingok
notifempty
size 1M
daily
compress
create 0600 root root
}
ASKER
Yes, I want to verify whether my new created logrotate works or not.
Under /etc/logrotate.d/, do I need to add your_logrotate.conf or just your_logrotate (without .conf) ?
Currently, I'm using the latter one.
Tks
Under /etc/logrotate.d/, do I need to add your_logrotate.conf or just your_logrotate (without .conf) ?
Currently, I'm using the latter one.
Tks
You have to use your conf file (/etc/logrotate.d/xxxx) ;-)
ASKER
Do I need to add extension to the file , ie should the file be rsyncd or rsyncd.conf ?
Tks again.
Tks again.
I suggest you add ".conf"
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Try :
logrotate /etc/logrotate.d/lsyncd
cat /var/lib/logrotate.status. The status show two lines below. However, the file doesn't rotate as expected. THe script was attached above. Any idea ? Tks
"/var/log/lsyncd/lsyncd.lo g" 2015-7-22
"/var/log/lsyncd/lsyncd-st atus.log" 2015-7-22
logrotate /etc/logrotate.d/lsyncd
cat /var/lib/logrotate.status.
"/var/log/lsyncd/lsyncd.lo
"/var/log/lsyncd/lsyncd-st
ASKER
Tks
Open in new window
http://www.thecave.info/execute-logrotate-command-manually/