Question about openhabian Auto Backup


I have installed my RPI4 with the latest openhabian Image 1.6b with only one internal 32GB micro SD card connected. Now after all is working and configured I want to start to setup the manual way for the auto backup as described in the openhabian docs.

  1. My first question is, do I have to use an 64GB micro SD card for the backup?
  2. What are the best steps to do after the internal one fails?
  3. After swapping the card to the backup one, which size I need to buy for the new replacement 32GB or 64GB?
  4. What is to do afterwards to get the backup running again?

Hopefully someone can answer my questions.

best regards René

The backup card has to be as large as the internal one or larger.
If later on you get a replacement card then that one has to be larger-or-equal than the source (the backup card, that is).
Best is to buy 3 identical cards right away.
On #4 what do you mean by “the backup” ? SD mirroring or the “real” (Amanda) backup ?

Hi Markus,

thanks for your answer. With backup I mean SD mirroring. The docs suggest the following setup:

“get an 16 GB SD card. Also get another 32 GB or larger SD card and a USB card reader”

The problem I see is that if you swap in the backup card and do a raw dump back to the new replacement card it needs to be again double size, because you can never be sure to get the correct size again. Worst case at the end is that everytime after SD-card corruption an SD-card with double size is required.

best regards René

You just need a card of equal size. The 32GB recommendation is to use the remaining extra 16GB for backup i.e. Amanda.


what happens if the backup card has some blocks less than the working one? I will try it right now with an 32GB card with hopefully excat the same size. Yesterday I got some error messages like storage.mount not found during the finalization of the raw partition copy. Do I have to install this service at first?

“openhabian@openHABianDevice:~ $ systemctl status storage.mount
Unit storage.mount could not be found.”

best regards René

No. Set debugmode=maximum in openhabian.conf then you will see what’s happening.


it has finished now again with the failure mentioned above:

2021-01-19_10:28:17_CET [openHABian] Setting up automated SD mirroring and backup… OK
Taking a raw partition copy, be prepared this may take long such as 20-30 minutes for a 16 GB SD card
sed: can’t read /storage/syncmount/etc/systemd/system//storage.mount: No such file or directory
2021-01-19_11:35:00_CET [openHABian] Checking for default openHABian username:password combination… OK
2021-01-19_11:35:00_CET [openHABian] We hope you got what you came for! See you again soon :wink:

you did not set debugmode=maximum. Output without is useless.

Understood. I have started again 30min ago with debug at maximum. Lets see the output.



attached the log.

It’s a cosmetic error. Did you notice any faulty behavior?

No, it looks like working. How can I check this? To ensure all is working as expected?

boot from the backup card

Do I need to setup the auto backup again afterwards or will this persist?

thanks for your help and the wonderful openhabian :slight_smile:

It’ll persist, see systemctl list-timers

Perfect I will try this thanks for your time. Have a nice evening.

Hi @rene54321 ,
I would like to do exactly what you described in your original post.

I have a RPi4, installed with openhabian image ver 1.6.3 on a 32GB uSD card.
For backup purposes I bought a 64GB uSD card and an USB card reader.

For now I’m working my way through a lot of docs to understand what’s the correct way of installing and configuring Amamnda to backup and sd mirroring.

Do you have any insights about the process?

I saw in several places that the SD mirroring process of a 32GB card is not recommended on RPi. Any thoughts on that?

And did you test the restore method?
If I understood correctly, in case of an SD failure the steps I need to take are:
(assuming internal SD- 32GB, backup SD- 64GB)

  1. Place the backup card in RPi and boot
  2. Insert a new 32GB card to the external card reader
  3. Start openhabian-config and use menu option 54- should copy the mirrored partition to the new card, right?
  4. Swap the cards- return the 64GB card to the card reader, insert the new 32GB card to the internal reader and boot from it.

@mstormi @rene54321
Any thoughts and remarks would be greatly appreciated.


“several” ? Where ? Given it only fully mirrors this twice a year that’s negligible.

Of course.

This is ’ pinging’ of people and not at all appreciated over here so please don’t.

First let me apologize for any miss behavior. Fairly new at this…

Got it. Didn’t know.

I can’t find it right now but I’ll try to find it and link it here.
The saying was that a full dump of 32GB is heavy for thr RPi, but I understand what you’re saying about the frequency…

I didn’t mean to question the method, I was wondering if someone have a personal experience with restoring from backup with my current configuration (i.e. 32GB internal, 64GB external)

And about restoring- did I get the method right?

Thank you very much

Found the post…

But now I see that it’s from 3 years ago… :thinking:

I’m sorry again if I made a mess- I read through a LOT of docs yesterday and might got confused with everything. So I’ll try to explain my understandings so far, any remarks or corrections will be highly appreciated:

  1. An installation on 32GB card will require a 64GB external card to backup to.
  2. The new auto-backup feature will mirror the internal card to the external card twice a year- It’s a long process (tried it now- about an hour) but it’s negligible as mentioned above.
  3. In between Amanda will take incremental backups of the system.
  4. In addition I can use the backup script of ‘openhab-cli’ to backup just the openhab config files- this should backup also everything set using the UI (Things, Items, Links, Rules).

Did I finally get things right?

Thanks again in advance for the time and help! :hugs:

1 Like