Moving to a bigger SD-card?

This might be (or not be) the right topic/group but hope you guys can help me out.

I started using Home assistant through hass.io and am very pleased with how it works up till now, unfortunately I installed it on a 8gb sd-card and it’s starting to run out of storage space (!!!) I’ve got a 32gb SD-card and know how to make an image of the current installation and afterwards place that image onto the bigger sd-card but will Hass.io manage the new filesize automatically?

I know the commands through the raspberry pi but since ssh access is very limited on hass.io (which I kind of dislike tbh and custom installation loses the hassio handyness) I’m not sure if it will even be worth the trouble.

I’ve got all my configurations backed-up but i’m quite sure that not everything i put in configuration.yaml is used for (as an example) the other libraries like duckdns/google assistant etc and tbh I really really reaaaallly don’t feel like reinstalling these :frowning:

even worse, I can’t update to the latest version anymore :stuck_out_tongue:

Maybe you can use the snapshot files and copy one to another computer put the new card in the pi and copy it back and restore it?

^^^This.

Also try deleting the database first to make some room.

Make a snapshot and copy it to your computer, image a new card and then restore the snapshot and everything will still be there.

What I have done. Changing from 16gb to 32gb.

Use win32diskimager to clone (in win32 will said read) 16gb , file save is ***.img file (during insert the sd card to your computer, there will be popup said to format sd card, click cancel (not format).
Use SD Memory Card Formatter to format (full) to new 32gb sd card.
Use Etcher to write the ***.img (from 16gb) to 32gb sd card.
Put in your rp3. open putty do the sudo raspi-config to change the extension file size (I cannot remember the subject, probably advance).

Sorry for my bad english. I have done this with 8gb to 16gb, 16gb to 32gb. Works perfect.

1 Like

This won’t work with hassio. Fine for Hassbian but not hassio.

:+1::+1::+1: Thanks for sharing.Another plus for Hassbian.

So any idea on how to make the snapshots i’ve seen mentions of this while searching the documentation but can’t find how to actually pull it off… Found references to it here:

Where it states: Can I restore a snapshot on a different device? Yes, any Hass.io snapshot can be restored on any device. with no links whatsoever

can’t find anything in configuration panels regaring backup/snapshots nor in the hass.io panel, I did find hassio.snapshot_full in the services panel but i’ve got no clue on how to use that command …

Oh while writing i Found someone telling me it’s hidden under “…” on the right side of hass.io I never would have thought to look there since there actually nothing in the gui with such functionality… oh well the more you know, might be nice to see this better documented (and if it is better linked on for instance the mentioned first page that shows up when googling for the feature)

Thanks to you all :slight_smile: will give this a try later today

So guys/gals. I made a backup, copied that to my desktop then created a new sd-card with the latest hassio image and apparently had to reinstall the samba server to put back the backup (fair enough). but the backup would not show up even after a full reboot and waiting several minutes to ensure it got recognized…

Nothing, thus I made a new backup, removed that one and gave my backup the filename of the newly generated backup. It seems that configuration files have been restored but not the hass.io plugins… The file is over 84mb thus I guess there is more then only the yaml files in there (and surely if the yaml files what hte only thing I could backup/restore i’m sure there wouldn’t be a snapshot feature just a copy/paste tutorial) so what am I missing…

P.s. Port number has been changed and also seems that there are certificates installed from duckdns but that’s about it…

Got it! renaming was hte issue after a few reboots, refresh clicks etc the backup appeared under the original filename and the import ran! Not sure why the filename change was an issue though (confused-sad-faced-smiley)

They are only tar files, this is whats inside mine…

image

On Hassio, after copying the snapshot file in the share folder, perform a host reboot not a hassio reboot if you want to see the restorable snapshot.

1 Like

Or just restore the image to a bigger SD card. It will expand automatically… At least it did when I tried…

not work in hassio

Does anyone know how it can be done? I want to go from a sd of 16 GB to a 64 GB

I’ll try the snapshot method

Did the snapshot method work?

I’ll tell you this weekend

I am using HASSIO. I made an image of my 8 GB card and restored it to a 32 GB. It works fine but obviously is still using only 8 GB. Any way to make HASSIO use the full 32 GB (extend partition?).

For those saying “does not work”, please be more specific on what is not working and why :slight_smile:
AFAIK any linux filesystem can be expanded given you enter the right commands.

The snapshot method worked for me to move from a 16GB SD card to a 64GB SD card. What I did:

  1. Create full snapshot Hassio-Snapshots
  2. Transfer snapshot to another device
  3. Create new Hassio image on a bigger SD card, and give it the 20 mins to set up
  4. Add the Samba plugin, set it up and start
  5. Transfer snapshot back to the Hassio device (at /backup)
  6. Now you should see the snapshot load in the Hassio-Snapshots tab. Restore from the snapshot. Let this run.
  7. Reboot the Hassio device. For some reason the web interface wasn’t working so I had to ssh in and use command > hassio host reboot
  8. Once the device rebooted it was all back to normal.

Not particularly difficult method but does take a while and hope I can find a better way!

4 Likes

I needed to do this recently. I did not have enough free space on the SD card to do a backup (took a while to figure this out because there is no error message).

I cloned the sd-card to a larger card using dd on linux. On first boot with the new card back in the pi it expanded the partitions to the full card size.

The command line steps to do this with from another linux machine.

  • Put the old SD card in a card reader.
  • Work out the device name (with the mount command or sudo parted -l), for me it was /dev/sdf
  • Unmount each partition sudo umount /dev/sdf1, sudo umount /dev/sdf2, …
  • Clone old card to an image file (note we clone the whole card /dev/sdf rather than the partitions /dev/sdf1, … )
  • sudo dd status=progress bs=16M if=/dev/sdf of=hass_backup.img
  • Remove old card and put the new larger card in the card reader
  • Again work out the device name (it might be the same or different)
  • Double check the device name
  • Unmount any partitions on the new card as above (new cards usually come with a single partition)
  • Clone image to new card sudo dd status=progress bs=16M if=hass_backup.img of=/dev/sdf
  • When this has finished run sync to be sure the data has been written.
  • Put new card in the pi, power on and wait 10 mins for the resizing to happen
1 Like

I know this is years later, but the easiest way I can think of is to clone with Balena Etcher on Windows then after you confirm it worked, use DiskPart to properly wipe and repartition the SD card so they don’t have conflicitng IDs