[Bug 1829018] Re: logrotate changing the date & time of files to today's date during second time execution while deleting old logs
Penchal Reddy
pr8721 at att.com
Wed May 22 10:33:42 UTC 2019
Please someone take a look and confirm thanks
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to logrotate in Ubuntu.
https://bugs.launchpad.net/bugs/1829018
Title:
logrotate changing the date & time of files to today's date during
second time execution while deleting old logs
Status in logrotate package in Ubuntu:
New
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
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/logrotate/+bug/1829018/+subscriptions
More information about the foundations-bugs
mailing list