RPi Setting up SD Card Imager and Amanda (Auto-Backup)

Platform information:

  • Hardware:RPi 4 8GB ram 64GB SD Card (+ another 128GB SD Card for card image)
  • OS: openHABian 64bit OS
  • Java Runtime Environment: Java 17 (whatever came pre-installed
  • openHAB version: 4.1.1 (latest stable)
  • Issue of the topic: I was a little confused as I was following the installation instructions and want to ensure that I set up the SD Card mirroring correctly in case my primary card dies.

SD Card Imager:
I used the openHABian configuration tool and selected option 53 to start SD card mirroring. After doing so, it created a copy of the 64GB primary card onto the 128GB card. A couple questions:

  • Do I need to add the backup SD Card to fstab or does this option do it automatically?
  • I am going to assume that it takes images regularly and automatically? If so, how often?

What is the difference between these 2? Is Amanda an automatic version of running sudo openhab-cli backup? Do most people implement both or just one?

This community has served me in so many way over the past 5 years. Thanks for all that y’all do!

openHABian does all this sort of thing for you.

From the docs

Full mirroring of the full SD card will take place semiannually and only for the 2nd partition (Linux root), changes will be synced once every day. See systemctl list-timers , timers are defined in /etc/systemd/system/sd*.timer .

Amanda keeps the history of changes. You don’t just get a backup of the current version of the file but a full history of the files for a time (configurable I believe).

With mirroring you have to restore the whole file system. With Amanda you can restore an individual file to become the same as it was sometime in the past.

Consider the following scenario. A file got changed which causes problems. However, the problem isn’t discovered for a few days. Your SD card mirroring will have backed up the bad changes, restoring isn’t going to fix it. You need a backup of the file from before the bad change was made.


Apparently I was doing this too late last night and missed the second half of the explanations in the docs… :man_facepalming:

Very good point!

Is it possible to somehow monitor the status of the SD Card imager? I just want to make sure it’s successfully running each night.