Win32 image too big and restorable when SD Card was corrupt when backing up?

So the Image I’ve created with Win32 is 16GB big but rarely 4GB are even used.
I want to use this .img file on a 8GB SD card until my new setup is arrived.
How can I shrink it to a minimum?

The SD Card was already corrupt when backing up the image from it. Will my Backup .img file work?

Do a google search and you should find a guide to use something like GParted to resize the SD card so you can move the content to a smaller (8GB) card.

Depends on how corrupt. Will OH still start up?

Will look, thank you!

Yes but crashed after some hours when the controller wanted to use sectors which were corrupt.
When the memory is broken the data should be gone too right? …

Honestly I don’t know.:confused:

Since you can start OH I would maybe try using openhab-cli backup --full command. Move the backup, located in var/lib/openhab2/backups to your PC. Install a fresh OH image on the 8G SD card and start up the new OH. After it’s running use sudo systemctl stop openhab, place the backup file in var/lib/openhab2/backups and use openhab-cli restore var/lib/openhab2/backups then sudo systemctl start openhab. If your config files are not corrupt then you should be backup and running.

Thanks, I know this and wanted to do it but It’s been too late sadly…
But I’ve made a win32 .img backup and backupd my .conf about every half of a month.
So all good! :slight_smile:
I’m now starting with amanda and swap/logs go to the USB stick!

.:+1:

I’m using an SSD hard drive and works great.:wink:

Best of Luck

What a coincedence! I had the same idea and mine just arrived about 2 hours ago.
But I’m not sure if I really want to do this…
I would have to configure one SSD and 2 USB sticks (Amanda/Log&swap) + SD card (with the pointer to the SSD on bootup) and I’m not sure if the PSU needs more Ampere.
How did you managed it?

I’m using the official RPI power supply, 5v 2.5A, and no SD card. You will only need the SD card for setting up the RPI to use the SSD. After that you can remove the SD card. Since I have an SSD with 120G I just keep the logs there and use only one USB for backup.

It’s more unlikely but it can happen on a SSD or HDD too.
But I think I will try this setup :slight_smile:
How long is it up and running?

I’m keeping my fingers crossed that it last for a LONG time.:crossed_fingers:

Since August 1st

Here’s the guide I used for booting without SD card.

Yes, the sectors containing the broken (Brunt out) flash cells are gone.
The SD card “controller” for want of a better name should isolate these and use undamaged ones
BUT it really depends on the SD card. Once it starts failing the remaining not burnt out cells will burn out faster and faster.

1 Like