Home assistant in SCALE - Upload backup ?

sos_nz

Explorer
Joined
Mar 17, 2023
Messages
58
Is there a way, either with the official or Truecharts Home assistant app, to upload a backup file?

Having just installed Home assistant in TrueNAS scale (using the default options), then logging in with a new user account, navigating to "Settings > System > Backups", there doesn't seem to be a way to upload the backup file which I saved from my existing install (which is a 'supervised' install type, running in a VM on a Win 10 box).

On my existing VM install, if I go the "Settings > System > Backups" there are 3 dots on the top right, which allows "Upload backup", but the 3 dots aren't there on the TrueNAS Home assistant installation. I've tried both the native & Truecharts versions.

EDIT: On further reading, I think this just isn't an option for docker/kubernetes-type installs of HA, given it's not a supervised version of HA.

The way around this will be to install HA in a VM under TrueNAS.
 
Last edited:

tprelog

Patron
Joined
Mar 2, 2016
Messages
297
You just need to extract your backup to the correct location. It would be a lot easier if you could just use hostpath to mount the home assistant configuration inside the container like normal docker.

There are some helper tools for TrueCharts (I think it's called heavy script) that can help you temporarily mount the data set to your NAS so you can copy files.

Personally, I'm not a fan of data being hidden away in a PVC, so I do not use any scale apps or TrueCharts.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703

sos_nz

Explorer
Joined
Mar 17, 2023
Messages
58
You just need to extract your backup to the correct location
I managed to get the .tar backup file into the correct location, using shell to copy it from my SMB share to HA's backups directory. And in Home Assistant's web interface, the backup now shows up. So far so good.

BUT - there's no GUI way to restore the backup. And although I could extract all of the individual backup files from the archive (and there are sub archives for each of the addons), it would be a nightmare to ensure they're all in the correct place. In addition, this method wouldn't pull in the necessary addons automagically, like the supervised GUI version is able to.

So - VM it is, since the non-supervised version of HA (on any platform) is so crippled in that there is no HACS function, and, it appears, very limited ability to restore a full config.

I appreciate the above is not a limitation of TrueNAS per se, but rather how HA packages its various iterations.
 

tprelog

Patron
Joined
Mar 2, 2016
Messages
297
So you are correct, only the supervisor can restore backups from the tar files using the GUI. For other installation methods, you need to extract the tar file yourself and only copy the home assistant config directory to the correct location.

If you are moving away from HAOS or supervisor, you would no longer have add-ons. Instead you would install those apps separately from TrueCharts, for example. Then you would need to extract and copy the corresponding add-on folder from your tar backup to each new app individually.

All installation methods of home assistant support HACS. And home assistant is exactly the same as well. The functionality that appears missing from other installation types is provided by the supervisor and supervisor integration, not really home assistant itself.

But I agree your best bet is going with HAOS in a VM, if you want to run it from TrueNAS and want home assistant to easily work as advertised. Or have a VM to run native docker for Home Assistant. Or install the docker compose app from TrueCharts and run home assistant inside of that.

I don't mean to say the home assistant apps are bad, it's just home assistant was not designed for kubernetes. One conflict, for example is the use of host networking. Without it, you lose discovery. Sure you can configure all your devices manually but without host network you are considered not running home assistant in a supported way by their developers... But TrueCharts clearly states they will not support host network. One way or another you'll be doing something unofficial and unsupported when you try to use these kubernetes apps for home assistant.
 

sos_nz

Explorer
Joined
Mar 17, 2023
Messages
58
Sorted, thanks to you (tprelog) & others :)


Installed using the haos image method above, to a new ZVOL, then booted the ZVOL as a linux VM. It required using the exact commands and image indicated above, specifiying the /dev/zvol/mydisc path, rather than /mnt/tank/mydisc, and using a fresh shell instance, otherwise I ran into permission problems and the zvol wasn't bootable.

Anyway, upon successful installation I uploaded my backup & restored from it, resetting the network details in router & home-assistant & all is up and running in TrueNAS. Very nice...although the long wait while the new install of Home Assistant pulls the necessary addons is disconcerting. I left it overnight, and was pleasantly pleased to see it all working in this morning :)
 
Top