#Backup full system image from NVME SSD to SD card

1 messages · Page 1 of 1 (latest)

rose pasture
#

Hi,

I have rpi5 8gb with installed rpi latest full-desktop system. I followed this instruction of how to install supervised HA on it - https://github.com/HuckleberryLovesYou/Homeassistant-Supervised-on-Raspberry-Pi-5

Now I have everything running:
headless rpi OS and supervised HA on NVME SSD (250Gb)
SD Card (250Gb) is inserted and waiting for backups/cctv footage/media/etc

I've set up scheduled HA backups to Gdrive using the built in backup utility but I also want to backup the running rpi system image to an SD card, so that in case of failure I could just restore it using an rpi imager. It's specifically important to me on the installation/discovery phase I am right now with HA.

I see that so the rpi will perform full running system backups to ~3-4 Gb .img files on the SD card automatically, each day or by request from myself, keeping the amount of copies to some sensible number and automatically deleting the outdated copies.

As soon as something fails miserably, I'll take the SD card out of rpi, copy .img files from it to my laptop, run rpi imager to restore my configured system to an SD card, install it back to rpi, load desktop and replicate sd card contents to the NVME SSD. After that I take out SD card, reboot and the system is up and running again. Then I can format the SD card and use it for backups.

How can I achieve the scenario above, considering that I only got my pri two days ago, got nvme hat yesterday and have close to zero user experience with Linux?
I also have a local network storage available through WebDAV, so I'd like to use it as a secondary backup location.

I found this solution yesterday https://raspibackup.linux-tips-and-tricks.de/en/home/, but his site is only accessible using VPN for me and I prefer a solution which doesn't care about where my HA is currently located.

Thanks in advance for your suggestions!

GitHub

Install Homeassistant Supervised on your Raspberry Pi 5 running Raspberry Pi OS 64bit - Tutorial - HuckleberryLovesYou/Homeassistant-Supervised-on-Raspberry-Pi-5

raspiBackup is published under the GNU license as open source and available for free. But donations are welcome and will support further development ans support. For any questions use github…

alpine hamlet
#

Since you're already running unsupported, https://github.com/billw2/rpi-clone may be what you want. You can image from your running system to another SD/SSD.

Really though, you shouldn't be running Supervised. You should use HAOS.

#

Supervised comes with specific requirements, and you've ignored them. That will lead to problems, problems that require you to be a Linux guru to fix.

rose pasture
#

Thanks. I understand all those possible issues.
I need rpi for my campervan automation in the future, so I need to be able to run HA as a higher layer on top of a regular OS in case if HA fails to be able to quickly restore it.

#

Clone isn't the solution I'm after, btw

alpine hamlet
#

Then:

  1. Run HAOS in a VM
  2. Don't use Supervised, just use Docker
    Supervised is the worst possible choice to make here
#

Cloning will give you pretty much what you want - an immediately live bootable clone of your drive. I've used that with SD cards for years.

rose pasture
#

Cloning will give me another bootable device connected to rpi. So, the next reboot will start rpi from SD card. This isn't a desirable scenario.
I need to be able to boot from SD card, but only when the system on the SSD has failed, not after a regular backup. I described this in the initial post.
Another thing is that cloning will only give me 1 (one) backup copy, while I stated the need of several incremental/synthetic backups in .img (.gz) format, so that it would be possible to copy those backups to a laptop or another storage. Copying a whole 256 Gb SD card to your laptop after each backup might be cumbersome, don't you think?

As for the docker: no addons, no hacs and port forwarding for each and every entity.
I'm not saying that I won't switch to HAOS in the future, when everything's configured, but currently I need a full Linux system for testing purposes and SSH/RDP access to rpi in case if HA suddenly fails.

My initial question wasn't about the way of deploying HA, but about the automated backup utility. Can we discuss this matter, please?

alpine hamlet
#

HACS works with all install methods

rose pasture
#

Could be