This will backup /etc/openhab2/ and /var/lib/openhab2/
This way, the information about installed addons is backuped, but not the addons itself, so when installing openhab2 new, the actual version of the bindings will be installed.
The only things to backup in addition, are the manually installed addons.
Thanks for sharing. I tried the described “dd” commands unter MacOS instructions. --> Pi didn’t boot… no blinking LED nothing…
The strange thing is that I only see the marked partition 0 in the MacOS related screenshot on the openhabian based SD card.
I make regular backups of openhab with the backup script - but I also want to capture the configurations and installations outside openhab (like USB/serial client).
No, this would kill my running openhabian installation currently Pi boots fine with my productive SD Card running openhabian. If I clone this card to another SD card the Pi is silent…
But could give it a try with another SD and totally different OS installation…
@H102 Are you using an openhabian Image? What happens when you put it in your SD card reader? Is it mounted and do you see all partitions or do you also get a notification that it can not be mounted ?
(only partition 0 visible by using e.g. diskutil list)
@bernd_d it kinda sounds like the SD card is bad. I still think it’s worth a shot to install raspbian or some other OS on SD card and see if that will work in your Pi. At least this will prove the SD card is good.
While I wait for a new my SD Card to be delivered:
Is it normal that the openHABian based SD-Card (that boots in my Pi) can not be mounted in a Mac while I can mount and see the files from another “non-openhabian image” installed Pi Card ?
Or is just the SD Card crap and I’m lucky that my openhabian boots in the Pi at all?
@mstormi This is what worries me at my current installation setup. I got new SD Cards, tried with another one to restore the openhabian based image. Same result. Doesn’t boot. If I check the paritions on the running openhabian sd card I see this:
So it looks like some partitions do not show up in the openhabian based image, although the sd card boots, but not if I create another one with this image…
What partitions do you see on your openhabian based sd card?
Like I already said, an ext4 and a FAT-32 boot partition.
Don’t understand what you mean by “openhabian image restore” but if you flash the (original) openHABian 1.5 image to an SD (and have not messed with your Pi’s firmware), it’ll boot.
So if yours does not use a different tool to flash (such as Etcher on Windows or dd on the Pi itself)
[17:32:59] root@openhabianpi:/home/openhabian# fdisk -l /dev/sda
Disk /dev/sda: 14,9 GiB, 15931539456 bytes, 31116288 sectors
Disk model: STORAGE DEVICE
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xfc7531cb
Device Boot Start End Sectors Size Id Type
/dev/sda1 8192 93236 85045 41,5M c W95 FAT32 (LBA)
/dev/sda2 94208 14774271 14680064 7G 83 Linux
Yes, the Fat-32 boot partition can’t be seen on the openhabian sd card. I wonder why it boots on the Pi. Unfortunately the clone of the sd card looks the same - but this can’t boot…
What I meant with “image restore” was that I tried to clone the productive / running openhabian installation by capturing an image of the configured environment.
@H102@mstormi thank you for your feedback and food for thoughts.
I finally made it - it turned out that with the new SD card it seemed to be the same issue. So I tried with another SD card reader - using the micro sd card adapter that is shipped with the cards. My “old” card reader supposed to be able to write to micro sd card directly without an adapter but it turned out that the last several clones I created that way didn’t contain a bootable partition (etcher warned here, applepibaker didn’t…).
It looks like the combination of using the micro sdcard adapter with another sd card reader helped.
Thanks again for your thoughts!
Regards, Bernd (who isn’t nervous about the backup anymore )
Up to now I made the openhabian configuration backups by using the backup script provided in
$OPENHAB_RUNTIME/bin/backup
The sd card clone in addition is to capture the other native Pi related configurations / installations / settings over the years…
It looks like amanda can do an sd card clone as well - thanks for the link!