Best way to replace the SD card?

I’m using Hassio and have been for a while. The box has started to exhibit some signs that the SD card may be on its way out, so I have created a snapshot and saved it to my local Win 10 machine. What’s the best way to switch to a new card and keep all my custom configurations and settings? The snapshot is of the latest version of HA if that matters.

Start fresh
Boot
Go have breakfast
Once the new is up and running
Just Enable samba
Copy your snapshot to the backup folder
Restore select everything
Go have lunch
all will be good
Enjoy

I was also wondering how I can be up and ready in the shortest time possible when the SD card will inevitably fail.
My plan is to clone my existing card onto a new card and just keep it there until needed then restore a snapshot.
What’s the best way to clone an sd card to another?

No actually I would use the win 10
As long as your not needing usb.
Setup a Hyper-V

If you have access to a Linux or Mac system, you can use the “dd” command. There may be windows freeware available, but I don’t know.

To create the backup image, the command looks somethign like this, where /dev/sd?? is the path to the SD card as seen by the OS.

dd if=/dev/sd?? of=/path-to-backupfile-you-want-to-create/name-of-backup-file bs=1M

to write this out to the new card, it is the reverse:
dd if=/path-to-backupfile-you-want-to-create/name-of-backup-file of=/dev/sd?? bs=1M

1 Like

I second using snapshots. I also recommend regularly making snapshots using either the dropbox or gmail addons. It’s always easy then to recover.

If your having issues its always best to start with a clean system. The issue may not be the SSD.

I am trying to do this and am not finding a gmail, Gdrive OR DropBox add-on option… am I missing something?

The dropbox addon isn’t working for some time now but there is a gdrive one - it’s a custom addon though. There is a thread here on the forum dedicated to it. I an automation to create the backup and a bash script to take the place of dropbox addon but you need to be on a supervised install to use that.

Got it, Thank you!

I just did a restore by flashing the new SD card with a new installation of Home Assistant OS on a Raspberry Pi, and it just gave the ability to upload a full backup snapshot during the onboarding flow directly from my laptop. Might not have happened previously but it made the restore process very straightforward :slight_smile: