Trouble running/triggering a manual backup of the microSD card after installation/setup with auto-backup

  • Platform information:
    • Hardware: Raspberry Pi 4, 4GB
    • microSD card: 64GB
    • microSD card for backup: 128GB (in USB card-reader)
    • OS: Openhabian 1.7 (Raspbian GNU/Linux 11 (bullseye)) (install image file: openhabian-pi-raspios32-202201271414-git08bc4ff-crcdd86375a.img.xz)
    • Java Runtime Environment: default (don’t know which it is)
    • openHAB version: 3.2.0 - Release Build
  • Issue of the topic:

I am setting up a new installation of OpenHab using Openhabian and want to have backups from the get go. I set up the backup-functionality as described here using the following configuration:

# external SD card device to backup and mirror the internal SD card to
backupdrive=/dev/sda
storageconfig=openhab-dir
storagedir=/storage
storagetapes=15
storagecapacity=32768

I am using a 64GB microSD card and backing up to a 128GB microSD card in a USB card-reader.
The setup of the backup seems to have worked correctly and I was able to successfully boot the backup microSD for testing.

I now did some modifications and wanted to trigger the backup manually before continuing with other changes. I am unsure how to do this.

From what I read in the forum, I assumed it would be as easy as to select sudo openhabian-config -> 50 Backup/Restore -> 55 | Sync SD to trigger an incremental backup. But when I select that, it asks me where I want to backup to, i.e.:


and

And when I select sda2 as shown, I get the following:

I am unsure, if this is me not using it correctly or if this is an issue with the configuration not being correct. I assumed, I need to select sda2, because that is where the root-partition is copied to (I saw this by mounting it to /mnt using sudo mount /dev/sda2 /mnt ). Also I read that Amanda backs up to the remaining space, which should be sda3, which is mounted /storage:

For what its worth:

  • I would not have expected to be asked where to store at all. I thought that the location where to backup, is what is setup by the auto-backup during the installation or (alternatively) with menu point 53. And that menu points 54 and 55 just trigger the backup to those locations - but obviously this was a misunderstanding.
  • Also I was unable to find the corresponding information in the openhabian docs … did I miss them?

Any help is greatly appreciated to help me trigger the backups manually …

Thank you and kind regards,
Michael

55 will sync diffs of a single partition (Linux root) so of course you have to select the destination as there’s more than one. But it’s not built to be used like that anyway.
When you have run 53 and keep the external SD plugged, openHABian keeps it synced at any time. If you want to have another full SD copy for off-site storage, use 54.

Dear Markus,
thank you for your fast reply. I have follow-up questions …

When you have run 53 and keep the external SD plugged, openHABian keeps it synced at any time.

So I understand correctly, that this is “somewhat like a RAID” in the sense that any change to the system SD will be “immediately” synced to the external SD? If so, I am confused by the timers that are shown when running systemctl list-timers:

Tue 2022-03-29 02:01:48 CEST 4h 23min left        Mon 2022-03-28 02:03:18 CEST 19h ago       sdrsync.timer                sdrsync.service

and

Fri 2022-07-01 01:15:00 CEST 3 months 2 days left Sun 2022-03-27 00:46:53 CET  1 day 19h ago sdrawcopy.timer              sdrawcopy.service

Which I understood to be run only infrequently (i.e. nightly and quarter-yearly).

Also to repeat my question: Is there a place, where the settings for openhabian-config are documented. I was unable to find it (sorry to bug you on this, but if there is, I could read it up on it myself).

Thanks again and best regards,
Michael

No. The timer calls a sync ‘diff’ run once a night.

It’s where you would expect it: in the official docs.

Thanks for the clarifications! I had read that, but thought maybe there is some additional info …

I just realized that I have another, somewhat related issue:
It seems that Amanda was not correctly set up during the installation with auto-backup. As note in my initial post, I used these settings for auto-backup:

backupdrive=/dev/sda
storageconfig=openhab-dir
storagedir=/storage
storagetapes=15
storagecapacity=32768

However, looking at /storage I do not see any Amanda files (I expected it to be stored there). I also tried doing sudo su backup and get this error message:

This account is currently not available.

I also tried these commands which I found here:

amadmin openhab-dir find  openhabianpi /dev/mmcblk0 /var/lib/openhab

and

amcheck openhab-dir

But I get command not found for both:

-bash: amadmin: command not found
-bash: amcheck: command not found

So it seems something went wrong with setting up Amanda. Are the auto-backup setting for unattended install correct as described above? Is there an install-log that I can check?

Thanks again for your support …

Don’t change topic please. This is a forum not a 1:1 support call.

/boot/first-boot.log

Read the debug guide then setup again from the menu.

Sorry for changing topic and thank you for pointing me to the log and debug guide. I will check to find out what went wrong and open a new topic in case I need help.
Thanks,
Michael