Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

/etc/cron.daily/logrotate & new logs 1

Status
Not open for further replies.

datadan

IS-IT--Management
Jul 22, 2002
283
0
0
US
I have installed a new virus package on my rh7.3 postfix server.

It creates a bunch of logs in /var/log/vams/vams.log

I want my logrotate to copy the vams.log each week, just like it does my maillog.

MAN LOGROTATE states I should have entries like:
/var/log/messages {
rotate 5
weekly
postrotate
/sbin/killall -HUP syslogd
endscript
}

in my logrotate.conf file, but I do not my logrotate.conf:


# rotate log files weekly
weekly

# keep 4 weeks worth of backlogs
rotate 4

# create new (empty) log files after rotating old ones
create

# uncomment this if you want your log files compressed
#compress

# RPM packages drop log rotation information into this directory
include /etc/logrotate.d

# no packages own wtmp -- we'll rotate them here
/var/log/wtmp {
monthly
create 0664 root utmp
rotate 1
}

# system-specific logs may be also be configured here.

------------
Do I add info after the system-specific section? How does my system know to rotate my existing /var/log files now as nothing is configured? --> Logs have been rolling for nearly a year.

Thanks,
 
Look in /etc/logrotate.d for configuration files. You can copy one of them to a new name and them modify the new one as needed.

Check the "syslog" file in there, also. It might do what you want and you'll just need to add your logfile name to the definition.
 
Thanks lgarner.....you're a star!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top