#StackBounty: #files #logs #dovecot #large-files Split large log file based on date criteria, while logging facility is running

Bounty: 50

the log file is /var/log/dovecot.info, >4GB, with date format:

2019-07-01 01:07:40

My objective is:

  • have the /var/log/dovecot.info which starts with 2019-01-01 00:00:00 and contains up to now log entries
  • have the /var/log/dovecot.info.old which contains log entries before 2019-01-01 00:00:00 (cca 67% of them)
  • operation performed without shutting the dovecot daemon if possible

I’ve tried with grep and tail with offset, no luck. I also do not know if this can be done without shutting down the dovecot safely.

Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.