i have Raspberry Pi4 with 32GB of micro SD Card and now it has 55% space remaining i need a bigger size SD Card 128GB, How can i move all data include system to new and bigger SD Card? like it is clone, if it can use by Home assistant system in app config it will very nice.
What install mechanism did you use.
If it’s haos backup install your drive then install HAOS on that drive then restore your backup. Done
This is also your standard disaster recovery motion. Get good at it.
Yes i use HAOS, previously i need to let the system work by collect all sensor in real time and move data together, it will not miss any data like Temp Voltage, but backup is the best and easy way to do now, i will try it, thank you so much
Yes backup restore will put you exactly back tk the point where backup happened. And is the best way. Even better you can backup current disk and pull it and set it aside (full rollback) put in new disk and install then restore and now you have new disk, have practiced Dr and have a spare disk.
I upgraded my SD with the dd command on Linux
Step 1: shut down HA and put the SD in to your Linux PC
-
take note what the SD card is with the lsblk command.
-
Make a copy of the original SD to the new.
Here I created a file to keep as a backup
dd if=/dev/sde of=/zpool1/BACKUP/PCs/homeassistant-2025103.dd bs=4k status=progress
Swap the SD card and ensure its device allocation with lsblk
Now dump the image to the new SD
dd of=/dev/sde if=/zpool1/BACKUP/PCs/homeassistant-2025103.dd bs=4k status=progress
Note: i just changed the if & of values (input file, Output file) -
Expand the partition to use all of the new card.
I used gparted to expand the hassos-data partition to the end of the card.
Then expand the file system with
sudo fsadm resize /dev/sde8 500000000 -v
The 500000000 value is bogus to tell me how big the new sd card is
resize2fs 1.47.0 (5-Feb-2023)
The containing partition (or device) is only 7613184 (4k) blocks.
You requested a new size of 500000000 blocks.
Use this in the resize command
sudo fsadm resize /dev/sde8 7613184 -v
You can now use the new SD with all its space available.
This also a good way to create backups but it requires downtime.
