after upgrading from SLES12 SP2 to SP3 the logrotation from /etc/logroate.d/ via cronjob doesn’t working anymore.
So I found out, that the logrotate-file in /etc/cron.daily/ has gone away.
after upgrading from SLES12 SP2 to SP3 the logrotation from /etc/logroate.d/ via cronjob doesn’t working anymore.
So I found out, that the logrotate-file in /etc/cron.daily/ has gone away.
Is this a feature or a bug?
Is there a new way to rotate the logs?
Best Regards
Christian[/QUOTE]
Hi
A feature… things moving to systemd…
–
Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE Leap 42.2|GNOME 3.20.2|4.4.87-18.29-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!
[CODE]zypper search logrotate
Refreshing service ‘SUSE_Linux_Enterprise_Server_12_SP3_x86_64’.
Refreshing service ‘SUSE_Linux_Enterprise_Software_Development_Kit_12_SP3_x86_64’.
Refreshing service ‘Web_and_Scripting_Module_12_x86_64’.
Loading repository data…
Reading installed packages…
S | Name | Summary | Type
–±----------±----------------------------------------------------±-------
i | logrotate | Rotate, compress, remove, and mail system log files | package
[/CODE]
Hi
Hmmm, look in /usr/lib/systemd/system/ the file logrotate.timer should be there, if not force the re-install of logrotate and check again and for the softlink down in /etc/systemd/system/timers.target.wants/
[QUOTE=malcolmlewis;39858]Hi
Hmmm, look in /usr/lib/systemd/system/ the file logrotate.timer should be there, if not force the re-install of logrotate and check again and for the softlink down in /etc/systemd/system/timers.target.wants/
The timer has to be enabled. This creates the link!
/root>systemctl enable logrotate.timer
Created symlink from /etc/systemd/system/timers.target.wants/logrotate.timer to /usr/lib/systemd/system/logrotate.timer.
Hi
I would imagine it’s daily from last boot time…
systemctl status logrotate.timer
â logrotate.timer - Daily rotation of log files
Loaded: loaded (/usr/lib/systemd/system/logrotate.timer; enabled;
vendor preset: enabled) Active: active (waiting) since Tue 2017-10-17
09:26:54 CDT; 13min ago Docs: man:logrotate(8)
man:logrotate.conf(5)
Oct 17 09:26:54 oscar systemd[1]: Started Daily rotation of log files.
–
Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE Leap 42.2|GNOME 3.20.2|4.4.87-18.29-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!
[QUOTE=christianmolecki;39928]I want to logrotate the apache2 logfiles, daily at 24:00.
How can I do that with the systemd logrotate?[/QUOTE]
Hi
I would look at disabling the timer and then copy /usr/lib/systemd/system/logrotate.timer to /etc/systemd/system/ then edit OnCalander to equal --* 00:00:00 and enable/start/status the service, it should be pointing at your timer service and not the systemd one.
If you look at man systemd.time at the end there are lots of configuration options, eg add UTC if your wanting it to be at 00:00:00 UTC