Copy a full configuration from one device to a new one

I am trying to move my configuration from one server to another. I know that the configuration files contain all the things I have manually setup. The question for me is how can I capture those things that have autodiscovered or have been found when an item has been added from the add-on store.

Will copying the whole configuration folder be enough for the full configuration to travel with me?

Are you running a version of HA that has the snapshot option? That is the easiest way (IMO) to move the entire instance.

If not the config directory should catch everything. Im not 100% sure where the configs for add-ons are stored.

1 Like

What changes are you trying to make e.g. bigger drive, new OS, different hardware?
But as @silvrr says the snap shot is the better way.

Drop a bit more info in and perhaps we can work out a way?

1 Like

I am moving from a QNAP NAS to a dedicated PI4 for HA. The virtual machine in the QNAP keeps locking up and I loose HA which is annoying. I got a PI4 for christmas and it has been sitting there waiting to do something and I just thought why not, it is pretty much the most recommended platform.

Snapshot sounds like what I wanted. I looked for every combination of Backup but did not think of snapshot. Looking at it now I’ve found it in the past because there are a few sitting there.

My plan was to get my PI4 running HA on an old SSD that I have lying around. This bit is currently eluding me. I can make it work on an SD card, and I can boot regular RaspiOS on the SSD but cannot get HA to boot if I put it on the SD. If anyone knows the trick for that it would really help.

Gotcha, Pi4 isn’t always the best option but is recommended as an entry point due to affordability and low running costs. However, because it does support USB3 there is an official way to have it boot from an SSD. This ‘Chap with the Swiss accent’ demonstrates how to do it. SO if you have everything as you would want it? Do a snapshot follow the official method of adjusting the Pi firmware as reliably demonstrated by Andreas Spiess ( a mine of electronics information). You will need a USB to SSD cable and you may well never look back.
I will add this caveat; I have built various projects on the Pi platform but my HA runs on an old i5 laptop. built in UPS! I have built for fun many of the projects the Andreas explains just for fun. I offer this info as a pointer and take I no responsibility for your outcome.

Thank you, I’ve done most of that but there are a few steps there that I think will help.

I have a 2200 VA UPS covering my kit so that should keep the PI running for a while. I used to run Domoticz on a pi migrated it to a VM in the Nas and then decided to swap to HA. This will take me full circle! Technically my Nas solution is not a supported build as it is just installed on Linux. I hadn’t even thought about running it on an old laptop though. Might consider that too.

Well I’m not succeeding here and I cannot see why, I think it is about the HomeAssistant image. A straight Pi OS will happily boot from this disk. If I use BalenaEtcher to transfer the HA image onto the disk it just does not work.

I did realise the HA docs said only the 64bit would boot on PI4 USB and I was trying to use the 32 as the “recommended” version. Tried it with the 64 and it is the same. The PI just goes around a loop basically saying it cannot find a FAT OS. I suspect the image is native Unix formatted and the PI boot can only handle FAT or something. I have tried it with a much smaller disk and a different USB controller too and the same happens so it is not the size of the disk or anything. Seems like HA Just does not want to boot from an SSD. :frowning:

Probably should move this to a newly named thread though…

Are you using the Development 5 build 2 image.

Just a thought for the threaded convo. I agree that a single Pi can be troublesome. However, starting with one with the intention of creating a cluster is fantastic and reliable, especially with IoT and now the USB SSD boot support.

I’m working on a 5 node Pi4 8Gb cluster with docker swarm. I’m using SSD’s on the Pi to boot from and the Pi will also boot from a PoE switch. I plan to get get a 3D printed Pi rack in the future so that I can use my PoE rack switch 24 port instead of my 8 port PoE switch that I’ll initially use.

Cost of PoE switch, 5 Pi4 8Gb, PoE hats, USB to sata cables and Cat 5e or 6 came out to $1,100. Yes, a pricey setup but realizable and I get to retire my loud R410 dell server and move my other containers to the Pi cluster as well as getting my HA and Node-Red containers out from my Linux desktop. Consolidation, noise reduction and power savings :wink:

My point is, go for the Pi setup BUT like others have said, you have to truly think about making it redundant or at least create a good backup job with snapshots that transfers a copy off the Pi to a NAS or some other reliable destination.

Good Luck!

I’m curious, what do you use this cluster for?

Also a question on the PoE hats, they are pretty expensive, I read from some others here that they use PoE to micro USB splitter something like this. May I ask why you choose to use the PoE hats instead of the way cheaper PoE splitters?

I elected the PoE hats because it’s a lot cleaner. With the splitter, I would still need a power supply to power the device and I think it’s limited to 10/100. I wanted something that I could power directly from the switch without using any additional power bricks. The hat I chose also provides power isolation so that you don’t have any short circuits when running other components that require power.

In short, it’s cleaner and I get to use the native ethernet port and better power protection. They are $25 so yes, expensive but this is going to be my home production system that manages all of my automation including alarm system. I need reliability for sure.

As for what I use the cluster for or will use the cluster for, here is a list of docker containers I’ll be running:

  • Home Assistant
  • Node-Red
  • Sonarr
  • Radarr
  • Pi-Hole

All will be booted with SSD’s but SSD’s are expensive so I am starting the build with two nodes until I can purchase the other 3 SSD’s I need :wink:

No, you don’t need a separate power supply or any other additional cable and there are Gbit models available as well. I only see the power protection as an advantage.

I like your setup (or planned setup), but give them Pis some more tasks, they’ll get bored :stuck_out_tongue_winking_eye:
FWIW I run HA and a bunch of other stuff on a cheap i3 NUC for more than 3 years without any unplanned downtime.

1 Like

I didn’t know they had 1g versions of these but good to know. My thing was isolating power for some protection and having something a little cleaner (less wiring). I have a NUC but I am also fascinated by the new 8GB pi’s + the fun in building a cluster of them. I really wanted to make an impact on power savings too. Nothing here is special. More of a preference, really but with a few pet-peeve of mine :wink:

I’ll start a separate thread this weekend when I start building it. I’m thinking of starting a channel to share my hobbies so I may add that there too. Not looking to do a how-to channel. I just want to document and share my experience. HowTo’s take up time but at least sharing ideas help blossom more ideas from others.

See, I may now do a Beowulf cluster using some NUC’s for some heavier stuff, like PLEX (with an external GPU) all because you reminded me of those small but powerful desktop devices :wink:

1 Like

The PI cluster sounds fun, but complicated. Techie in me wants to do that :slight_smile:

I moved to NAS based to be a more professional setup. Challenge is the Virtualisation software seems to cause reliability problems on my NAS so I ended up with something less supportable than a PI (the previous one never had a problem). Realising that I thought to use the PI I got for Christmas but the SD card dying had always been a worry, hence thinking of SSD.

Having seen that NUC is officially supported I’m wondering about a bit of NUCky too. Home many cores does you i3 have? Does it run a core linux build or is lit like the SD version for the PI?

2 cores, it’s an i3-7100U. More than enough resources for whatever I threw at it in the last 3 years :slight_smile: I run Proxmox and have different VMs, one HA production VM (Home Assistant Container), one HA “development” VM (Home Assistant Container) and one HA test VM (Home Assistant Supervised) and some other non-HA related VMs.
With a NUC you could also run Home Assistant OS by installing the NUC image (which is the equivalent of the SD version image for the Pi), but I prefer to run other things on my NUC and not only Home Assistant.

OK, this sort of answers a question I was going to ask. I have just loaded Proxmox onto an ASUS PN50 mini then installed a VM with HA (container) on it. The changeover from my Pi4b, using a snapshot, was almost painless although I had to do some stuffing around to get my zigbee2mqtt dongle working. The only other VM I have installed is a Unifi controller, so I have heaps of spare capacity.

Both existing VMs use an nvme drive. I have a physical SSD drive installed which is not doing anything yet, so I was pondering whether to load another HA (container) VM on that and basically keep it as a “hot spare” which would only need loading with the latest snapshot, a quick change of IP address and MAC address and could be up and running in a hurry. Have you split your HA VMs onto different drives, or are all of your eggs in one basket, so to speak?

They are all on the same drive. I configured an automatic full backup to an external NAS daily at 3am for the important VMs. If the SSD ever fails,I buy a new one, install Proxmox, restore the backup and I’m exactly at the point where I left, no configuration, installation of an OS, nothing.

1 Like

I want to do the same thing because my installation (Pi4) fails to start. I can mount and read the partitions on my laptop so can access all the configurations.
I made a new image then copied in everything in the data partition/homeassistant but it’s still missing a lot (e.g. helpers) so I’m wondering whether anyone knows all the folders I need to import to get back my old configuration. Er, yeah, I didn’t have auto-backup working and my backups are old :grimacing:
Any help appreciated, thanks.

You need to copy the hidden files and directories too (the ones starting with a dot)