2015-03-28 20:43 GMT+01:00 Jonny Rimkus <[email protected]>: > > Hello, > I've a question to the rotatelogs command. > I'm using following Apache Version: > > Server version: Apache/2.4.7 (Ubuntu) > Server built: Mar 10 2015 13:05:59 > > I'm using the rotatelogs command in my Vhost as follows: > "|/usr/bin/rotatelogs -p /opt/bin/apacheloguser -n 3 /path/to/logfile > 10M" combined > > according to the man page it works as expected, > when logfile size reaches 10MB it: > 1. creates a new File: logfile.1 and starts logging to this file > --> when logfile.1 reaches 10MB: > creates a new file: logfile.2 and start logging to this file > > I would like to know if it is possible to make this behaviour possible: > > 1. rename logfile.1 to logfile.2 > 2. rename logfile to logfile.1 > 3. create new file logfile and start logging to this file > > Thanks in advance and > Kind regards > Jonny Rimkus > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
Logrotate from your linux distrubution will do exactly just that. Maybe that's what you want to use instead of rotatelogs. -- *Daniel Ferradal* IT Specialist email [email protected] linkedin es.linkedin.com/in/danielferradal
