logrotate.d has a convenient command "compressoptions" which allows you to send options to gzip (or another compressor if you are using something different).
One handy thing about this is that you can rename your rotated log files to have the date-time in them for convenience of both appearance and for running scripts and reports against them.
You can do this (with gzip as your compressor) as follows:
compressoptions -S .`date -I`.gz
This causes logrotate to send the -S (suffix) command to gzip to change its suffix to the date in ISO 8601 format.
Thursday, May 3, 2007
Subscribe to:
Post Comments (Atom)
1 comment:
Did it not occur to you to use the 'dateext' option in logrotate?
Post a Comment