Backup of HAOS on RPi - ease of process

I’m currently using an RPi 4 with 1GB RAM to mess around with HAOS and experiment, intending to move to more capable piece of hardware when I move home in May, to set up an actual smart home hub.

One topic I am yet to consider is backup of the system, as if it goes down I would really need it to be back up ASAP. Couple of questions for the more experienced than me:

  1. I’m currently using an SD card, and I understand the limitations with this but the simplicity makes it pretty attractive for where I am at. Is it possible to backup the SD card with the HAOS system on it to another SD card, such that if the original card fails I can simply pop it out and pop the backup one in?
  2. If go the route of using an SSD connected via USB/SATA, and configure to boot from USB, is it possible to backup the SSD with the HAOS system on it to another SSD, such that if the original drive fails I can simply connect the backup drive via USB to the same port?

If neither of these is possible, how involved is the restore process?

Ideally, what I’m really looking for here is some sort of redundancy/failover, but in the absence of running parallel instances (which is beyond my capability I think), I’m trying to figure out what the easiest restore process would be. Something that I could theoretically get my other half to do if given instructions over text would be the north star here.

There are a few things to consider here.

First, the default HA backup process saves the backup file to the same drive that the HA OS lives on. This complicates things. The most likely reason to need a backup is because the drive failed. So, having it there is pointless. There’s also the issue of excessive writes to an SD or even SSD drive.

This has led to lots of workarounds. There are add-ons which will copy the backup to another storage location, like a NAS or Google Drive. This puts the backup in a safe place, but it does nothing to reduce writes.

You can even mount a NAS drive and backup to that, but again, the backup is initially created on the local SD or SSD, and copied to the NAS. Same problem.

My solution, crude though it may be, gets me around these issues. I only do HA backups immediately prior to my monthly HA Core update. In between, I use a utility to “synchronize” the HA Config directory to my NAS. I use the SAMBA add-on to expose the Config directory, then read from that at another machine. No writes to the SD card this way.

This would allow me to restore the most recent (up to a month old) backup, then copy the most recent config directory back, which should result in no loss of data before my last sync.