borg_ynh icon indicating copy to clipboard operation
borg_ynh copied to clipboard

Stop backing up on reboot

Open Thatoo opened this issue 3 years ago • 4 comments

Describe the bug

Borg backup at each start, even reboot...

Steps to reproduce

  • reboot yunohost
  • borg backup on startup
  • takes all resources (cpu, bandwith...)

Expected behavior

Borg backup every week (in the middle of a night, no disturbance). It is enough for me. I don't need it to backup also everytime I reboot my server. I'd like to be able to stop the option to backup on startup.

Thatoo avatar Jun 15 '21 21:06 Thatoo

It's a bug, not a feature ^^

zamentur avatar Jul 04 '21 15:07 zamentur

Hi @Thatoo Could it be possible to get the result of those commands ?

cat /etc/systemd/system/borg.service
cat /etc/systemd/system/borg.timer

zamentur avatar Jul 04 '21 15:07 zamentur

Sure, here they are, hoping it helps :

:~$ cat /etc/systemd/system/borg.service
[Unit]
Description=Run backup borg
After=network.target

[Service]
Type=oneshot
ExecStart=/usr/bin/sudo /usr/local/bin/backup-with-borg borg
User=borg
Group=borg

#[Install]
#WantedBy=multi-user.target
:~$ cat /etc/systemd/system/borg.timer
[Unit]
Description=Run backup borg regularly

[Timer]
OnCalendar=Weekly

[Install]
WantedBy=timers.target
:~$

Thatoo avatar Jul 04 '21 18:07 Thatoo

I think you can avoid that behaviour by running:

yunohost service disable borg

zamentur avatar Jul 04 '21 18:07 zamentur