log-rotation: how to write rotated files to another directory
Hi list, using the macros $MONTH, $WEEK and $DAY it is possible to rotate the logfiles. The rotated files are written to the defined working directory. Question: Is it possible to define another directory for these rotated logs ?? The working directory should contain the current logfiles only. Hope you can help. Kind Regards Oliver Environemnt: syslog-ng 1.6.8 on RHEL ES 4 __________________________________ Yahoo! Music Unlimited Access over 1 million songs. Try it free. http://music.yahoo.com/unlimited/
On Thu, 2005-11-24 at 07:01 -0800, Oliver Lang wrote:
Hi list,
using the macros $MONTH, $WEEK and $DAY it is possible to rotate the logfiles. The rotated files are written to the defined working directory.
Question: Is it possible to define another directory for these rotated logs ??
The working directory should contain the current logfiles only.
Not really, as including time related macros in the destination file name is not really "rotation", it is simply generating destination file names according to the macros in the name. You can implement something similar with a script, e.g. find /var/log -mtime 1 -exec mv '{}' /var/log/archive \; -- Bazsi
participants (2)
-
Balazs Scheidler
-
Oliver Lang