You are not logged in.
I set up an automatic snapshot mechanism with yabsnap.
I want to change the default .timer file. The default .timer file proposes this frequency: OnCalendar=*-*-* *:30:00. I want to change to one weekly snapshot only. Thus I wrote this drop-in file :
/etc/systemd/system/yabsnap.timer.d/yabsnap-weekly.conf
OnCalendar=Mon *_*_* 02:00:00But it looks like my file doesn't work, as reported by the command:
$ systemctl list-timers
Wed 2024-09-11 17:30:14 CEST 1min 58s Wed 2024-09-11 16:30:24 CEST 57min ago yabsnap.timer yabsnap.serviceWe can see the timer doesn't take into account my new settings.
What am I doing wrong? I stop/started the timer and ran
systemctl daemon-reloadLast edited by gabx (2024-09-15 16:04:37)
Offline
Change your drop in to:
OnCalendar=
OnCalendar=Mon *_*_* 02:00:00Eenie meenie, chili beanie, the spirits are about to speak -- Bullwinkle J. Moose
It's a big club...and you ain't in it -- George Carlin
Registered Linux user #149839
perl -e 'print$i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10); '
Offline
Looks like it doesn't change anything:
$ cat /etc/systemd/system/yabsnap.timer.d/yabsnap-weekly.conf
# each monday at 2:00 AM
OnCalendar=
OnCalendar=Mon *_*_* 02:00:00
-------
$ systemctl list-timers
Thu 2024-09-12 00:00:00 CEST 3h 45min Wed 2024-09-11 00:00:09 CEST - shadow.timer shadow.serviceOffline
You need to use the [Timer] section Header.
Sometimes it's necessary to First assigne the key to No value to clear IT before re-assigning it.
Offline
$ cat /etc/systemd/system/yabsnap.timer.d/yabsnap-weekly.conf
[Timer]
OnCalendar=
OnCalendar=Mon *_*_* 02:00:00
$ systemctl list-timers
- - Thu 2024-09-12 19:33:52 CEST 1min 58s ago yabsnap.timer yabsnap.serviceAdding the header section, [Timer], will indeed achieve what I am looking for.
Offline
error
Last edited by gabx (2024-09-15 16:05:37)
Offline
Does removing the drop-in actually solved that problem? What does the yabsnap.timer look like? Did you update the package (though I'm not sure it's even coming from there - there doesn't seem to be a timer in the upstream github)
Offline