Logrotate is not working for the folder, which has large files.

Solution Verified - Updated -

Issue

  • Files are not rotating as per below rules:

    /var/log/test/test1/*/*.log {
        compress
        daily
        dateext
        maxage 30
        missingok
        create 640 root root
        sharedscripts
        postrotate
                /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
        endscript
    }
    
  • dataext is working but not using gz compress for all files.

Environment

  • Red Hat Enterprise Linux 6
  • Logrotate

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content