Stuck trying to move files from my PC to a volume on a Device.

Backstory: I started with a pretty vanilla version of Klutchell’s PiHole and ran that for a couple of years. Then I wanted to combine PiHole and HomeAssistant. I found a version with AdGuard Home and HomeAssistant and got that running on my main Pi. Then I started teaching myself how build out multicontainer systems on another (let’s call it a Development Pi). Through a lot of trial and error, googling, and help from y’all I have managed to build an awesome stack with PiHole, MQTT, and HomeAssistant. I can’t wait to jump over and start using it. The only problem is, I can’t figure out how to move all of my files over to the new system.

The Problem: I’ve got a backup of my HomeAssistant instance but there’s no built-in way to upload that backup onto the new system. I’ve done a bunch of research and the code to restore a backup is waaay over my head but I’ve also read that one way to make it work is to simply copy all the files from the backup to the config volume. I’ve been reading and searching for 36 hours now and can’t find out how to do that. Obviously, I can’t just pop the card into my windows PC and do it that way because windows can’t read the filesystem. I thought about creating a Linux VM and trying that but I’d be just about as lost in Linux as I am right now. I’ve seen mention of folks doing it via SMB, SSH, and more, but I can’t figure out how to do either and I can’t find a How-to anywhere. It seems that this is all pretty basic stuff that just about anyone that would be messing with things like this already knows, so no one has ever spelled it out in a stepwise format. Can anyone point me towards some guidance?

I’ve created a keypair and loaded the public key into Balena like it told me to here but have no idea what to do with the Private key and that guidance doesn’t ever tell me. When I try Balena ssh with the name of the device, I get an error that it can’t authenticate, but that’s because I’ve never told it where to look for the private key.

PiHole makes it easy to use the Teleporter feature in the GUI to backup and transfer all my settings.

In theory, I thing I can push the new build to the Main Pi and hope all the data stays since the volumes will all stay the same. But, if that doesn’t work I’ll be hosed and get to start entirely over.

Hi - I see that there’s a bunch of stuff to unpack here. Lets go step by step. First thing is to get your ssh working. I gather that you are using windows to ssh to the balena device. Is that correct? Is your device running a production image or a development one? Are you using the stock ssh command that comes wit windows or have you installed something yourself?

Thanks @anujdeshpande!

I’m running a production image, and using OpenSSH in PowerShell with BalenaCLI installed.

As an alternative, I’ve also got PuTTY on my machine if that’s easier to set up and use. I used PuTTYgen to generate the keypair.

Thought: What if I put the files that I want to copy/overwrite onto a thumbdrive and plug into the Pi? I’m assuming that I could use the terminal window on the balena dashboard to move the files then? Stop the HomeAssistant Container, copy/overwrite the files, and the restart the container?

I tried it but didn’t see anything that looked like a storage drive. opened a terminal session with HostOS, did “ls -a” and only saw .balena, .balena-engine, .docker, .rnd, and .ssh directories.

You can use persistent storage:

You can also scp files to the device’s persistent storage located HERE: /var/lib/docker/volumes/_data/_data/
scp -P 22222 bunnies.png root@<IP>:/var/lib/docker/volumes/<APP ID>_data/_data/