Menu

Home

Ken Salter

Welcome to the LogRotateWin Wiki!

The following pages have been created:

[LogRotate] - A page in a man style containing all information needed to configure and run logrotate.

Project Admins:


Related

Wiki: LogRotate

Discussion

  • Marcos

    Marcos - 2014-08-11

    Hi all (sorry for my english), I would like to know how to make a folder logs rotate every day, and compress the content (do not want to remove)
    This is the configuration file content:

    compress
    

    C:\Documents and Settings\synchrot\Desktop\BackupsLogsPrueba {
    rotate 5
    daily
    prerotate
    @echo off
    echo This is a test
    echo parameter pass %1
    VER | TIME > TEMP.BAT
    ECHO SET TIME=%%3>CURRENT.BAT
    DEL TEMP.BAT
    DEL CURRENT.BAT
    ECHO It's %TIME% now

    endscript
    

    }

    I Do not know how to test run, and if it is well configured.
    Could you please help me?

    Thanks.

     
    • Howard Spindel

      Howard Spindel - 2023-02-13

      For a test run, use logrotate -d configFile

      That will give you debugging output about what logrotate would do if it ran. No files will be affected.

       

      Last edit: Howard Spindel 2023-02-13
  • Howard Spindel

    Howard Spindel - 2023-02-13

    Here is my config file:

    compress
    nosmtpssl
    smtpfrom howard@sci1.com
    smtpport 25
    smtpserver mail.sci1.com
    ifempty
    missingok

    e:\FastvueSyslog\dhcp2.sci1.com\dhcp2.sci1.com.log
    {
    rotate 5
    weekly
    mail howard@sci1.com
    }

    Pretty simple. When I run logrotate, I get an error:

    logrotate: Unknown directive e:\FastvueSyslog\dhcp2.sci1.com\dhcp2.sci1.com.log

    What am I doing wrong?

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.