my command is this:
Code:
logrotate -v -f /opt/backup/logrotate.conf -s /opt/backup/logrotate.log 2>&1 >> /tmp/run.log
I intend to redirect all the outputs into the /tmp/run.log file, but I failed, I can see all the outputs within the console. below are the outputs.
Code:
reading config file /opt/backup/logrotate.conf
Handling 1 logs
rotating pattern: /opt/backup/config.tar forced from command line (8 rotations)
empty log files are rotated, old logs are removed
considering log /opt/backup/config.tar
log needs rotating
rotating log /opt/backup/config.tar, log->rotateCount is 8
dateext suffix '-20171127'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
destination /opt/backup/config.tar-20171127 already exists, skipping rotation