YunoHost-Apps / borg_ynh

An experimental Borg implementation for YunoHost
https://www.borgbackup.org/
GNU Affero General Public License v3.0
19 stars 22 forks source link

Change backup Frequency in config-panel is not applied #119

Open xoddark opened 2 years ago

xoddark commented 2 years ago

Describe the bug

When change of the backup Frequency (OnCalendar) in config-panel, the change is not applied to system.

Context

Steps to reproduce

And If you launch the command systemctl stop borg.timer on server, you have this message : Warning: The unit file, source configuration file or drop-ins of borg.timer changed on disk. Run 'systemctl daemon-reload' to reload units.

Expected behavior

When change in config-panel is saved, we expect than the change was applied. Yunohost should probably run the command (or equivalent) : systemctl daemon-reload

olberger commented 2 years ago

Just to add my +1 Before:

# systemctl status borg.timer
Warning: The unit file, source configuration file or drop-ins of borg.timer changed on disk. Run 'systemctl daemon-reload' to reload units.
● borg.timer - Run backup borg regularly
     Loaded: loaded (/etc/systemd/system/borg.timer; enabled; vendor preset: enabled)
     Active: active (waiting) since Tue 2022-05-03 14:23:26 CEST; 24min ago
    Trigger: Wed 2022-05-04 00:00:00 CEST; 9h left
   Triggers: ● borg.service

May 03 14:23:26 ynh.cgt-imt.org systemd[1]: Started Run backup borg regularly.

After:

root@ynh:~# systemctl daemon-reload
root@ynh:~# systemctl status borg.timer
● borg.timer - Run backup borg regularly
     Loaded: loaded (/etc/systemd/system/borg.timer; enabled; vendor preset: enabled)
     Active: active (waiting) since Tue 2022-05-03 14:23:26 CEST; 24min ago
    Trigger: Tue 2022-05-03 15:00:00 CEST; 11min left
   Triggers: ● borg.service

May 03 14:23:26 ynh.cgt-imt.org systemd[1]: Started Run backup borg regularly.
rochacbruno commented 2 months ago

+1 I just had this same issue, adding daemon-reload and restart borg.timer worked for me.

Can we adjust it on the package somewhere?