Re: logrotate and timer script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/4/20 7:11 PM, Alex wrote:
I have a fedora32 system and would like the maillog to rotate exactly
at a specific time. How do I do that? It used to be that I could
create a crontab entry but now there appears to be this timer service,
including /usr/lib/systemd/system/logrotate.timer included with the
package that appear to control that.

Yes, so if you want to change the time it runs, then copy that file to /etc/systemd. Edit it and remove the "AccuracySec=1h" line and edit the "OnCalendar=daily" to set the time you want it to run.

See "man systemd.time" for details on the time formats. For example "OnCalendar=*-*-* 01:00:00 would run it every day at 1AM.

After you're finished, run "systemctl daemon-reload" so that the new file is picked up.

However, there doesn't seem to be a timer entry in systemctl output.
Ideas on how to get started would be appreciated.

It seems that the triggering timer isn't mentioned in the log, but you should see the log entries for running logrotate.
"journalctl -b -u logrotate" will list only those.
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux