logrotate changing the date & time of files to today's date during second time execution while deleting old logs

Bug #1829018 reported by Penchal Reddy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
logrotate (Ubuntu)
New
Undecided
Unassigned

Bug Description

using ubuntu 14.04 ISO image
logrotate version is 3.8.7

below configuration i am using in logrotate:

/home/data/logs/production_logs/int_conf??????.log*-????????
/home/data/logs/production_logs/rou_stat.log*-????????
/home/data/feedLogs/genericLog/*????????.*.dup
/home/data/feedLogs/genericLog/*????????.*.log
{
        rotate 0
        missingok
        sharedscripts
        firstaction
                find /home/data/logs/production_logs -maxdepth 1 -mtime +10 -name "int_conf??????.log*-????????" -print -delete
                find /home/data/logs/production_logs -maxdepth 1 -mtime +10 -name "rou_stat.log*-????????" -print -delete
                find /home/data/feedLogs/genericLog -maxdepth 1 -mtime +10 -name "R????????.*.dup" -print -delete
                find /home/data/feedLogs/genericLog -maxdepth 1 -mtime +10 -name "R????????.*.log" -print -delete
        endscript
}

results:
when i run first time it is working as expected (removing old logs and not touching other logs)

and when i run again it is not removing any logs as expected but changing timestamp so it is a problem as removing old logs is completely depend on modified timme (-mtime) on find command

please suggest not to modify timestamp when i run second time

Revision history for this message
Penchal Reddy (pr8721) wrote :

Please someone take a look and confirm thanks

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.