Hi is it possible to communicate with Home Assistant via the command line somehow? I have my Raspberry PI connected to a monitor via HDMI, so I can get the login prompt. But I feel (vaguely lol), that I have read somewhere that Home Assistant isn’t built for local configuration? (Only remote?) Can I login locally to see what CL options I have?
Basically what I want to do is clone my active Home Assistant install from the 64GB memory card I bought for it, on to the 1tb internal SSD I have also installed on my Raspberry Pi. I can’t uninstall the SSD to write directly to it, as this would mean completely dismantling what is a rather neat (and not so simple) Raspberry PI built (Nice case, extra cooling, power control board, SSD expansion board to name a few), to take the SSD out, then buy a custom SSD to USB adapter for my computer. And even then, this would require doing my entire Home Assistant install and configuration again, right from the start.
I’m pretty sure cloning your active Linux drive via the command line is a thing - and I think I have probably done this at some point in the distant past. But it has been several years since I cloned a Linux drive from the CL - and to be frank I’ve clean forgotten how to do this. (I haven’t used Linux in a long time). So are the tools present within a basic HA install to do this? If not, is it possible to install them somehow? If so how?
Thanks in advance!
I think your safest bet is to take a snapshot, download it to your desktop in Windows or whatever OS you use.
Remove the SD, install HassOS on your SSD and restore the snapshot.
Note if you have a large snapshot (bigger than 1GB I think), you will not be able to use the option of restoring at install time. Rather get HA up and running on the SSD, then use the Samba add-on to copy the snapshot back to the Backup directory and restore using Supervisor.
I have done this plenty of times - much simpler than trying to clone an existing install at the OS level.
Hi, thanks for your response. But I think you have rather missed the part where I said dismantling my entire Raspberry Pi build wasn’t really a viable option?
I want to use the command line exclusively for this task, just as can be achieved on a normal Linux install.
Are you saying that this isn’t possible? It would seem strange (although as I said I haven’t used Linux for several years), to not have direct access to the command line?
Is dd not present, as per the instructions found here? https://www.makeuseof.com/tag/2-methods-to-clone-your-linux-hard-drive/
I’m sure I have done this in the past, although the details escape me due to the time that has elapsed.
I forget for example how to list my available drives via the CL, how to format in an appropriate file system (especially in this case, for Home Assistant), how to make a cloned drive bootable - and how to ensure I have access to the full ~1TB partition, rather than just the small 64GB partition that Home Assistant currently occupies?
But first I need to be able to access the CL in Home assistant without breaking anything?
You can install the SSH add-on - that will get you to the HassOS command line. But this is a very specific version of Linux - I don’t think you are going to be able to do much.
Maybe you can ask on the HA Discord chat, a lot of the devs are regulars there: https://discord.com/invite/BzQNTqK
But no dd? Does anyone know what tools if any are available?
I’m not a fan of the discord server unfortunately. I get very frustrated and confused when using it. It seems like a very top heavy solution for most issues to me. But then that’s just me.
So just to be clear, logging in locally isn’t an option and the majority of Linux command line tools you might normally expect to find are missing?
If this was the case, it would seem a bit pointless surely? What is Linux without the standard cl tools? A bit like cutting your nose off to spite your face, lol.
I can see if it is confirmed that HA has been stripped of the majority of standard Linux cl tools, that I will be forced into the fairly bizarre scenario of having to strip my entire build down to basic parts again and buy a special adapter to do a task that would normally only take a few minutes to do on the cl? Why would Home Assistant developers do this?
What if a guy wanted to extend home assistant functionality on his own using the CL? Surely normal tools like dd would need to be present?