Do you clone your SD card?

In my Raspian systems, it’s real easy to use the “Copy SD” program in the Accessories window to make a clone of my SD card. I then swap out the cards and reboot. This way I have a rolling backup and a restore is as simple as going back to the prior SD card before the cloning. It only takes a few minutes to make the clone and I have a very reliable backup if I completely screw up the OS with my experiments.

I would like to clone my HassOS SD card to make the same rolling backup, but nothing I’ve tried works.
Yes, I could just make a snapshot and copy all of my Node-Red flows and yaml files, then start over with a new SD card, but I don’t want to upgrade my OS at the same time. (The last time I tried, it took me two days to get my Home Assistant Pi working right again.)

I’ve tried Cygwin dd on the PC, I’ve tried Win32 Disk Imager, I’ve tried Aomei Partition Manager, and EaseUS Partition manager. Some crashed on the PC and the others aren’t happy with the HassOS SD card, but none worked.

Does anyone else clone their SD as a backup process? How do you do it?

Thanks,
Sig

Snapshots are the best way and if you don’t want to use the latest Hass.io, you can always roll back the version before you restore. Not sure how often you are needing to restore… it’s VERY VERY rare here… Only ever done it actually when I was either changing the hardware or going from ResinOS-hassos-Raspbian/docker…

1 Like

Here is a link to a SD card cloning method on Windows:

I haven’t used the Windows method, but have used a method for cloning on macOS using Terminal. It is a very slow process.

2 Likes

Thanks for the reply. As I said in the OP, I’ve tried Win32 Disk Imager. It and other processes that have failed complain that they don’t recognize the filetype. Which is surprising for a block-for-block imaging program- it shouldn’t matter what the disk structure is.

Having a clone of the last known good system is a super fast rollback if I screw it up… Just pop in the prior clone SD card.

I am spoiled with the ease of the SD copy in Raspian (which is simply a GUI for dd), but it, too, complains about the HassOS file structure. (The GUI won’t let me select the HassOS SD as the source). I am doing more experiments with the raw dd on a Debian system.

Maybe HassOS is different now, but when I ran HassIO on an RPi earlier this year, I used Win32 Disk Imager to clone it once a month. I just imaged to a file on my Windows PC hard drive and not to another card though, although it shouldn’t be any different.

I am running HassOS, and I do this for most updates…

  1. Unplug and take out SD card
  2. Use Win32 to copy to PC
  3. Use Win32 to duplicate onto a new SD (biggest issue there is the SD cards need to be the same brand, different brands will throw and error there is not enough space even if they are both 32GB)
  4. Put the “new” SD card in and upgrade.

I also use Syncback on my PC to keep a copy of the major yaml files, this runs daily.

1 Like

Thanks gregg098 and jasondreher (and everyone else who replied so quickly). I tried using Win32 Disk Imager on two different PC’s and both complained about not recognizing the disk format. (Not the PC, but Win32 Disk Imager).

However dd on a Debian system did make a clone for me, so that’s the process I’ll be using.

I Like making clones because if an update doesn’t work correctly, I can easily drop back to my prior SD clone and analyze the issue. Without a clone, it would take hours or days to restore my Home Assistant on a new SD card.

3 Likes