Trouble getting logs to autorotate with logrotate

Maxximiliann

New Member
Credits
17
Ubuntu 20.04.2 LTS
Gnome 3.36.8

Code:
$ logrotate --version
logrotate 3.14.0

It's been impossible to get logs to rotate automatically once they reach a size of 125M. Here's the config file saved to /etc/logrotate.d:

Code:
/home/App/Logs/*.log 
{
    missingok
    size 125M
    rotate 14
    create
}


What's missing?
 


Lord Boltar

Active Member
Credits
2,705
you do not have a time set - has to be daily, weekly or monthly the tool will attempt to rotate the logs on that basis- size sets the minimum size for the rotation to take place each log and will not be rotated until it reaches 125MB.

monthly
missingok
size 125M
rotate 14
compress
create
 

Maxximiliann

New Member
Credits
17
you do not have a time set - has to be daily, weekly or monthly the tool will attempt to rotate the logs on that basis- size sets the minimum size for the rotation to take place each log and will not be rotated until it reaches 125MB.

monthly
missingok
size 125M
rotate 14
compress
create

As it turns out this was the issue but thanks for your suggestions :)
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Staff online

Members online


Top