Cloning of SD cards?

Hi Guys,

This is a bit off topic, sorry if I have oversteps some boudery, but, I have Home assistant set up on a dedicated SD card in a Rasberry Pi. I use that setup for the sole purpous of running curtain motors in Hubitat. That is all it is used for.

Someone said that SD cards are not that reliable and suggested I implement some kind of bakup rutine. I am thinking clonging the card. Anyone have any experience of a good tool to clone SD cards?

Cheers,

I believe you can do it with the Raspberry Pi Imager program if i am not mistaken.

A simpler option would also be to simply use either a good quality USB stick, or get a USB ssd for the Pi.

1 Like

An M.2 SATA SSD with a USB adapter is a much better storage option for a PI4 (less so with a PI3). I have two PI4s using SATA SSDs with UGREEN USB adapters. 10X performance compared to an SD card.

3 Likes

Just use "dd" from the command line. Something like:

dd if=/dev/sda of=/dev/sdb bs=32M status=progress ; sync

Assuming that /dev/sda is the current sd-card and /dev/sdb is the new/backup sd-card.

3 Likes

I use Raspberry Pi Imager and just clone my card regularly. It works well. But I will have to look into using an M.2 SSD drive.

1 Like

Using a higher quality SD card (often “high endurance” models) can reduce the risk of data corruption for many RPi use cases.

Like other forms of flash storage, not all SD cards are created equal.

5 Likes

Agreed. Just want to add that sometimes these are referred to as "industrial" models.

2 Likes

The other thing to set up is automatic off-system backups. There is one to upload to GDrive and another to go to OneDrive. I use the OneDrive backup simply because use that quota for nearly nothing else. It uploads a backup daily.

3 Likes

I use win32 Disk Imager. strong texthttps://www.makeuseof.com/how-to-back-up-your-raspberry-pi-sd-card-on-windows/

1 Like

Is this a Switchbot Curtains? If "yes" as of today Switchbot Hub 2 is supporting Curtains via Matter with excellent @kkossev Matter Bridge Driver. This could be better options vs. running HA. Actually I am running HA. I Started with Rpi but quickly switched to Odroid. My HA integrations handles many different devices which are not directly supported by HE.

3 Likes

If you use any of the disk imager programs you may find that you can't restore it to another SD card of the same capacity because the sector counts don't match.

What I use is Clonezilla (free, live CD) which backups by files/partitions rather than imaging. So you get a backup that's like 90% smaller and is restorable to any size SD card (as long as all the files will fit) without regard to number of sectors.

3 Likes

Hi all,

Thank you grately for all your excellent suggestions!

Cheers,

1 Like

My curtain motors are Aqara. But thanks, I did not know that.

Interesting. How did you go about doing this backup? Do you know if there are only cloud options or is there a local backup storage option?

@magnus.s

I agree with @marktheknife and recommend Swissbit. They are one of the manufactures that we have used in our products at work and they are available from digikey. They are pricy - $50 for a 32GB, $75 for a 64GB, etc. But the reliability & endurance is way better than you get with anything off amazon.

https://www.digikey.ca/en/products/filter/memory-cards/501?s=N4IgjCBcpgLATFUBjKAzAhgGwM4FMAaEAeygG0R54B2ANngiPgE5YwxqQiwAGa5gKywu4AByiAzLE5NaYAT0RFRtWKKXgB-fiPgTmEsMxABdIgAcALlBABlSwCcAlgDsA5iAC%2B3WMeghUSExcQhJyEAlqAQFIkTp4Wh5hIkjohBFUmNFTC2tIO0dXD28QAFpEf0DHAFdQ0kgKAVNPEoqKHAB3JxwcACMnazMQWiQQJwATG1LeRhArGxFLAE9zPBsMHFQWoA

4 Likes

That's the "industrial" brand/model I had in mind when I posted earlier in this thread. Just couldn't remember the brand name for the life of me .....

3 Likes

A company called ATP makes similarly targeted products but they are not available through Digikey.

edit - Micron is actually now making their own branded uSD as well, but even harder to get a hold of.

2 Likes

?shouldn't you be out selling shoes?
:grinning:

1 Like

HA! I sound like a sales guy. As I was replying i wondered if i should put in a disclaimer that I had no interest in any of the mentioned companies .... so, i have no interest in any of the mentioned companies.

this was my poorly aimed joke

1 Like