logrotate: no logs found

General support questions
Post Reply
joernius
Posts: 4
Joined: 2021/07/16 12:32:57

logrotate: no logs found

Post by joernius » 2021/07/16 13:06:32

Hello dear community,

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
In the directory log is a log file

Code: Select all

logrotate]# ls -lh log
total 15M
-rw-r--r--. 1 root root 14M Jul 16 14:53 mein01.log
The configuration file is kept simple
/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
}
If I start the logrotate I get the following message:
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.
In the /var/lib/logrotate/logrotate.status this call is not registered
No log found, what have I done wrong or not considered?

Best regards Jörn

joernius
Posts: 4
Joined: 2021/07/16 12:32:57

Re: logrotate: no logs found

Post by joernius » 2021/07/16 13:26:24

As soon as you write it down, you find the error: The log file must be named, not the directory...
... :cry:

Ok, please do not pay attention anymore

Post Reply