Public bug reported:

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

** Affects: logrotate (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, 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

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to