I am currently using Samba Backup on my Home Assistant with a NAS that is not always on. The NAS starts daily at 00:00 (and stays on until all Tasks are done, at least until 2:00, often longer) and is not always running to save energy. The Addon is configured to start a daily backup at 00:15.
The problem is, that the addon does not start properly, if it has no connection to the NAS (see attached log). In my experience it runs mostly fine if the NAS is online, when starting the addon, even if the NAS turns off for some time, but the addon does not stay on if the NAS is down on startup.
Log:
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/00-banner.sh
-----------------------------------------------------------
Add-on: Samba Backup
Create backups and store them on a Samba share
-----------------------------------------------------------
Add-on version: 5.2.0
You are running the latest version of this add-on.
System: Home Assistant OS 10.1 (aarch64 / raspberrypi4-64)
Home Assistant Core: 2023.4.6
Home Assistant Supervisor: 2023.04.1
-----------------------------------------------------------
Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
cont-init: info: /etc/cont-init.d/00-banner.sh exited 0
cont-init: info: running /etc/cont-init.d/01-log-level.sh
cont-init: info: /etc/cont-init.d/01-log-level.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
[23-05-07 22:28:50] INFO: ---------------------------------------------------
[23-05-07 22:28:50] INFO: Host/Share: Niklas-NAS.local/homeassistant-backup
[23-05-07 22:28:50] INFO: Target directory:
[23-05-07 22:28:50] INFO: Keep local/remote: 10/100
[23-05-07 22:28:50] INFO: Trigger time: 00:15
[23-05-07 22:28:50] INFO: Trigger days: Mon Tue Wed Thu Fri Sat Sun
[23-05-07 22:28:50] INFO: ---------------------------------------------------
[23-05-07 22:28:56] WARNING: do_connect: Connection to Niklas-NAS.local failed (Error NT_STATUS_UNSUCCESSFUL)
[23-05-07 22:28:56] FATAL: Cannot access share. Unknown reason.
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
Is it possible that the addon could only check the connection if it needs to execute a backup?
Is it also possible that the connection can fail without stoping the addon?
This could be useful because if watchdog is enabled the addon will be restarted directly after a shutdown. But it would be highly unlikely that the addon has a connection, right after it was shutdown because it has no connection. This cycle repeats for a few times until the watchdog will not try to restart the addon, which is a silent failure and depends on the user to check the addon page to manually reenable the addon.
For the record: There is a workaround, by using the hassio.addon_start service in an automation, but I personally think that the behaviour of the addon is unexpected (I would expect the addon to only need a connection if it does something, and gracefully fail) so it should maybe be adjusted or at least documented.
I am currently using Samba Backup on my Home Assistant with a NAS that is not always on. The NAS starts daily at 00:00 (and stays on until all Tasks are done, at least until 2:00, often longer) and is not always running to save energy. The Addon is configured to start a daily backup at 00:15.
The problem is, that the addon does not start properly, if it has no connection to the NAS (see attached log). In my experience it runs mostly fine if the NAS is online, when starting the addon, even if the NAS turns off for some time, but the addon does not stay on if the NAS is down on startup.
Log:
For the record: There is a workaround, by using the
hassio.addon_start
service in an automation, but I personally think that the behaviour of the addon is unexpected (I would expect the addon to only need a connection if it does something, and gracefully fail) so it should maybe be adjusted or at least documented.