Network drive for backups

So I have an Unraid NAS that I of course want to use as a file server for backups with HA. The problem is I shut the thing down every night for a few hours via a script, and then cycle power on a Z-wave outlet with the motherboard set to “always on” to bring it back up. Worked flawlessly for years. All I needed to do was avoid DVR recordings during the off time. For a special event I would just pause the script and outlet rule on Hubitat.

But now HA gets mad when the backup drive isn’t available, and therefore breaks the connection.

So my questions are…

  1. Is there a timeout setting I can change in the CLI to avoid the server outage? Like maybe since the server is down for 5 hours a day, I could set the timeout for say 305 minutes.

  2. Is there a polling interval in the middle of the night for the network drive? Any way to shut that off?

  3. Is this issue due to hard-code and if so do I just have to set up another Samba server on another device like maybe an unused router to get around it? Then copy any new files via startup script when Unraid comes back on line?

So as you can see I have options. I’m just trying to figure out the best one.

2 Likes

I don’t have a complete solution for you, but remote storage mounted volumes is handled by the HA Supervisor. There is an Supervisor API for mounts that HA Core can use to talk to the Supervisor.

One can use the Curl command in the HA Core for this.
For a GET you can use:

$curl -sSL -H "Authorization: Bearer $(printenv SUPERVISOR_TOKEN)" http://supervisor/mounts

For your particular case, there is a “reload” for a given mount using PUT.
So if you can get this to work, you could use an automation to call say a shell_command to execute this reload after the NAS has become ready.

1 Like

Thanks Tommy. But the weird thing is the mount for Backup throws an error, and then when I go to manually reload it fails. I can erase it and re-create it within 15 seconds or so and it works, but for some odd reason it won’t simply reload to correct it.