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 of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.