What's the best way to mirror my SD card to another card?

What would be the best way to mirror my SD card, realtime or otherwise, to another SD card for redundancy?

My only real concern with using and SD card is the write life on the card and possible failures. I get backups nightly by using another computer that has a samba link to the HA system, but I thought maybe if I just plugged in another SD to a USB adapter that maybe I could mirror my system each night to that card and it’s an easy swap if I have a failure.

Of course I also realize that I’m using write cycles on the new card as well, so perhaps this is a silly thing to do. Once the capability to use SSD instead of SD come along a bit more I’ll definitely move away from using SD entirely if possible.

If you are using Raspbian OS with HA supervised install, you have the sd copier application which can clone the sd card for you with the least amount of effort. If you are running HA OS, then I think the snapshots will be the easy option. I dont see an option to mirror the sd card on a daily basis.

I have been running my HA on an HDD for about an year on rpi4 and it is reliable and also official. You can easily and safely shift to an SSD right now without any concerns.


I concur with @sheminasalam on the snapshots being the easiest option. I believe there is also a built in option now to move the data partition, which is what takes the majority of the writes, to a USB attached storage device, though I’d need to go digging to find where I saw that.
An extra downside on cloning the drive each day would be that if the SD failure isn’t really sudden, and they usually aren’t, you may end up with days or weeks of semi-corrupted data in your backups.
Most of the time when SD cards go, a while before they fully give up you will get little write errors and read errors. The snapshot process will have certain levels of consistency checking that can usually catch that sort of corruption, but most method of cloning file systems or disks take the view that if there are errors, you are likely trying to make a copy of whatever you can get from failing media to something more reliable where you’ll manually try to correct the errors. And they usually will run with the source file system unmounted anyway, so it’s all just random 1s and 0s to the software, and no stateful validation will occur.

Can also vouch for system stability on SSD booting at the moment, at least on the Pi 4 and HassOS 5.10
Been good for a few months now, and was running it successfully before it was offical too :stuck_out_tongue:

1 Like

Looks like I’ll have to do some digging to figure out how to get the SSD running. I thought I read a just a few days ago that it wasn’t all that stable just yet and something else that mentioned getting HA to work on one was a bit of a challenge.