after many hours of frustrating googling I turn to this board with hope.
I would like to run logrotate for a test under the following conditions:
I work from the directory /root/logrotate and have under this directory the folders log and old-log
Code: Select all
ls -1
log
old-log
Code: Select all
logrotate]# ls -lh log
total 15M
-rw-r--r--. 1 root root 14M Jul 16 14:53 mein01.log
/etc/logrotate_2.conf
Code: Select all
maxsize 1M
daily
rotate 40
create 0600 root root
dateext
dateformat -%Y%m%d-%s
compress
notifempty
olddir /root/logrotate/old-log
/root/logrotate/log {
maxsize 100k
hourly
rotate 4
missingok
}
logrotate]# logrotate -vdf /etc/logrotate_2.conf
Code: Select all
reading config file /etc/logrotate_2.conf
olddir is now /root/logrotate/old-log
Allocating hash table for state file, size 15360 B
Handling 1 logs
rotating pattern: /root/logrotate/log forced from command line (4 rotations)
olddir is /root/logrotate/old-log, empty log files are not rotated, log files >= 1048576 are rotated earlier, old logs are removed
No logs found. Rotation not needed.
No log found, what have I done wrong or not considered?
Best regards Jörn