FAILED (destination mounted) installing Backup with openhabian but dev is mounted

I tried to install Backup using openhabian-config Menu 50.

First I installed a new 64 GB SD card on a USB reader on my Pi 4 B, which appears to have mounted:

[09:45:58] openhabian@openhab:/dev$ systemctl status storage.mount
● storage.mount - /storage mount
   Loaded: loaded (/etc/systemd/system/storage.mount; enabled; vendor preset: enabled)
   Active: active (mounted) since Thu 2021-02-11 09:29:06 MST; 18min ago
    Where: /storage
     What: /dev/sda3
    Tasks: 0 (limit: 4915)
   CGroup: /system.slice/storage.mount

Feb 11 09:29:06 openhab systemd[1]: Mounting /storage mount...
Feb 11 09:29:06 openhab systemd[1]: Mounted /storage mount.

I removed the “#” in /etc/openhabian.conf in front of backupdrive=/dev/sda

In reading the above closely, I see at the beginning, it says that this file is only used for the initial configuration and that changes should be made thereafter using the openhabian-config menus, but I don’t see anywhere in the menus where I can change this.

I then ran Menu 53 and received the FAILED (destination mounted) error. I repeated it several times, each with the same eror.

lsblck shows that 3 partitions were created:

[10:11:39] openhabian@openhab:/dev$ lsblk
NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda           8:0    1 58.2G  0 disk
├─sda1        8:1    1  256M  0 part
├─sda2        8:2    1 29.6G  0 part
└─sda3        8:3    1 28.4G  0 part /storage
mmcblk0     179:0    0 29.8G  0 disk
├─mmcblk0p1 179:1    0  256M  0 part /boot
└─mmcblk0p2 179:2    0 29.6G  0 part /

I changed the log setting to maximum and reran the Backup install from the menu. Here is the output:

+ echo -e '\n\033[90;01m$ apt-get install --yes gdisk \033[39;49;00m'

$ apt-get install --yes gdisk
+ apt-get install --yes gdisk
Reading package lists... Done
Building dependency tree
Reading state information... Done
gdisk is already the newest version (1.0.3-1.1).
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
+ return 0
+ echo OK
OK
+ cond_redirect install -m 755 /opt/openhabian/includes/set-partuuid /usr/local/sbin
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ install -m 755 /opt/openhabian/includes/set-partuuid /usr/local/sbin \033[39;49;00m'

$ install -m 755 /opt/openhabian/includes/set-partuuid /usr/local/sbin
+ install -m 755 /opt/openhabian/includes/set-partuuid /usr/local/sbin
+ return 0
+ [[ -n 1 ]]
+ select_blkdev '^sd' 'Setup SD mirroring' 'Select USB device to copy the internal SD card data to'
+ [[ -z 1 ]]
+ array=()
+ declare -a array
+ read -r id foo foo size foo foo foo
++ lsblk -i
++ tr -d '`\\|'
++ grep -E '^sd'
++ tr -d '\\-'
+ array+=("$id" "$size")
+ read -r id foo foo size foo foo foo
+ [[ 2 -eq 0 ]]
+ (( count=2 + 8 ))
++ whiptail --title 'Setup SD mirroring' --cancel-button Cancel --ok-button Select --menu '\nSelect USB device to copy the internal SD card data to' 10 76 0 sda 58.2G
+ retval=sda
+ [[ -z sda ]]
+ dest=/dev/sda
++ blockdev --getsize64 /dev/sda
+ [[ -n 62534975488 ]]
+ mount
+ grep -q /dev/sda
+ echo 'FAILED (destination mounted)'
FAILED (destination mounted)
+ return 1
+ '[' 1 -ne 0 ']'
+ whiptail --msgbox 'There was an error or interruption during the execution of:\n  "50 | Backup/Restore"\n\nPlease try again. If the error persists, please read /opt/openhabian/docs/openhabian-DEBUG.md or https://github.com/openhab/openhabian/blob/main/docs/openhabian-DEBUG.md how to proceed.' 14 80
+ return 0
+ true
+ show_main_menu
+ local choice
+ local version
+++ get_git_revision
+++ local branch
+++ local latestTag
+++ local revCount
+++ local shorthash
++++ git -C /opt/openhabian rev-parse --abbrev-ref HEAD
+++ branch=main
++++ git -C /opt/openhabian describe --tags --abbrev=0
+++ latestTag=v1.6.3
++++ git -C /opt/openhabian log --oneline
++++ wc -l

I would appreciate any suggestions of what to try next to troubleshoot this.

I think you have some fundamental lack of understanding here … menu 53 is SD mirroring, not backup.
Menu 52 is to be used to install Amanda, the backup system. If you want to use the extra space on your external SD, enter /storage when asked for the backup destination area.

Thanks for the response.

I was trying to implement Mirroring (as a backup solution, I hoped). It looks a lot easier than Amanda and gets me what I want (I think).

That is not backup then but mirroring.
Update openHABian (main branch) and try again.

PS: and go install Amanda, you will want to have it in place

Thanks for the response. I will reread the Amanda documentation and give it a try. In the meantime I would like to get the mirroring going.

I updated the openHABian main branch and tried to install mirroring, with the same results as before.

OK
+ cond_redirect install -m 755 /opt/openhabian/includes/set-partuuid /usr/local/sbin
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ install -m 755 /opt/openhabian/includes/set-partuuid /usr/local/sbin \033[39;49;00m'

$ install -m 755 /opt/openhabian/includes/set-partuuid /usr/local/sbin
+ install -m 755 /opt/openhabian/includes/set-partuuid /usr/local/sbin
+ return 0
+ [[ -n 1 ]]
+ select_blkdev '^sd' 'Setup SD mirroring' 'Select USB device to copy the internal SD card data to'
+ [[ -z 1 ]]
+ array=()
+ declare -a array
+ read -r id foo foo size foo foo foo
++ lsblk -i
++ tr -d '`\\|'
++ grep -E '^sd'
++ tr -d '\\-'
+ array+=("$id" "$size")
+ read -r id foo foo size foo foo foo
+ [[ 2 -eq 0 ]]
+ (( count=2 + 8 ))
++ whiptail --title 'Setup SD mirroring' --cancel-button Cancel --ok-button Select --menu '\nSelect USB device to copy the internal SD card data to' 10 76 0 sda 58.2G
+ retval=sda
+ [[ -z sda ]]
+ dest=/dev/sda
++ blockdev --getsize64 /dev/sda
+ [[ -n 62534975488 ]]
+ mount
+ grep -q /dev/sda
+ echo 'FAILED (destination mounted)'
FAILED (destination mounted)
+ return 1
+ '[' 1 -ne 0 ']'
+ whiptail --msgbox 'There was an error or interruption during the execution of:\n  "50 | Backup/Restore"\n\nPlease try again. If the error persists, please read /opt/openhabian/docs/openhabian-DEBUG.md or https://github.com/openhab/openhabian/blob/main/docs/openhabian-DEBUG.md how to proceed.' 14 80
+ return 0
+ true
+ show_main_menu
+ local choice
+ local version
+++ get_git_revision
+++ local branch
+++ local latestTag
+++ local revCount
+++ local shorthash
++++ git -C /opt/openhabian rev-parse --abbrev-ref HEAD
+++ branch=main
++++ git -C /opt/openhabian describe --tags --abbrev=0
+++ latestTag=v1.6.3
++++ git -C /opt/openhabian log --oneline
++++ wc -l
+++ revCount=1201
++++ git -C /opt/openhabian log --pret

What should I try next?

Thanks

try again please.

Thanks. It now works. Thanks for your help.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.