Incomplete Amanda Config and missing slots

I’m trying to setup Amanda from the openhabian-config.

The Configuration finished “sucessfully”, however, amcheck does not.

[10:46:58] backup@openhabian:~$ amcheck openhab-dir
'/etc/amanda/openhab-dir/amanda.conf', line 7: an integer is expected
'/etc/amanda/openhab-dir/amanda.conf', line 7: TAPECYCLE must be positive
ERROR: errors processing config file

and indeed, no value entered in the config under tapecycles:

org "openHABian openhab-dir"                      # Organization name for reports
mailto "my@mail.com"                           # Email address to receive reports
dumpuser "backup"                        # User to run dumps under
netusage 90000 Kbps                           # Bandwidth limit, 90M
dumpcycle 7                                   # do a full dump once a week
runspercycle 7                                # Run 7 times within dumpcycle i.e. each day
tapecycle  tapes                        # Dump to this number of different tapes during the cycle
runtapes 10                                   # Number of virtual containers to use at most per backup run
tpchanger "chg-disk:/mnt/ssd/amanda/slots"    # The tape-changer glue script
taper-parallel-write 2
autolabel "openhab-dir-%%" empty
tapelist "/etc/amanda/openhab-dir/tapelist"                # The tapelist file
tapetype DIRECTORY
infofile "/var/lib/amanda/openhab-dir/curinfo"    # Database directory
logdir "/var/log/amanda/openhab-dir"              # Log directory
indexdir "/var/lib/amanda/openhab-dir/index"      # Index directory
amrecover_changer "changer"				      # Changer for amrecover
mailer "/usr/bin/mail"

define tapetype DIRECTORY {
    comment "Backup Directory"
    length 6666 mbytes    # TAPESIZE of every virtual container (= max. usage per directory)
}
define tapetype AWS {
    comment "S3 Bucket"
    length 6666 mbytes    # actual bucket TAPESIZE 5GB (Amazon default for free S3)
}

define application-tool app_amraw {
    plugin "amraw"    # Uses 'dd' to dump raw device
}
define application-tool app_amgtar {
    plugin "amgtar"

    property        "COMMAND-OPTIONS" "--exclude-from=/opt/openhabian/includes/amanda/amanda-exclude-list"
    property        "ONE-FILE-SYSTEM" "NO"
    property        "NORMAL"          ": socket ignored$"
    property append "NORMAL"          "file changed as we read it$"
    property append "NORMAL"          ": directory is on a different filesystem; not dumped$"
    property append "NORMAL"          ": File removed before we read it$"
}

define dumptype global {
    maxdumps 2                                      # Maximum number of backups run in parallel
    holdingdisk no                                  # Don't dump to temp disk (holdingdisk) before backup to tape
    index yes                                       # Generate index. For restoration usage
}
define dumptype amraw {
    global
    program "APPLICATION"
    application "app_amraw"
    estimate server                                 # Estimate the backup TAPESIZE before dump
    comment "raw device dumped with amraw"
    priority medium                                 # Priority level
}
define dumptype comp-amraw {
    amraw
    compress client fast                            # Compress in client side with less CPU (fast)
}
define dumptype user-tar {
    global
    program "APPLICATION"
    application "app_amgtar"
    estimate server                                 # Estimate the backup TAPESIZE before dump
    comment "directories dumped with amgtar"
    priority medium                                 # Priority level
}
define dumptype comp-user-tar {
    user-tar
    compress client fast                            # Compress in client side with less CPU (fast)
}

Changing the values so that all comments to number of tapes dissapear leads to the following settings and amcheck output:

dumpcycle 7                                   # do a full dump once a week
runspercycle 7                                # Run 7 times within dumpcycle i.e. each day
tapecycle 9 tapes                        # Dump to this number of different tapes during the cycle
runtapes 5                                   # Number of virtual containers to use at most per backup run
[11:02:34] backup@openhabian:~$ amcheck openhab-dir
Amanda Tape Server Host Check
-----------------------------
Searching for label 'openhab-dir-08':Label 'openhab-dir-08' not found
slot 0:Slot 0 not found
slot ?:Slot  not found
ERROR: Slot  not found
Server check took 0.613 seconds
Amanda Backup Client Hosts Check
--------------------------------
Client check: 1 host checked in 2.873 seconds.  0 problems found.
(brought to you by Amanda 3.5.1)

Now it looks like the slots can not be found. And I think they really are missing on the storage:

[11:05:01] backup@openhabian:/mnt/ssd/amanda$ ls -l
total 8
drwxr-xr-x 2 backup backup 4096 Sep 25 10:43 amanda-backups
drwxr-xr-x 2 backup backup 4096 Sep 25 11:03 slots
[11:05:03] backup@openhabian:/mnt/ssd/amanda$ cd amanda-backups/
[11:05:56] backup@openhabian:/mnt/ssd/amanda/amanda-backups$ ls -l
total 0
[11:05:58] backup@openhabian:/mnt/ssd/amanda/amanda-backups$ cd ../slots/
[11:06:08] backup@openhabian:/mnt/ssd/amanda/slots$ ls -l
total 4
lrwxrwxrwx 1 backup backup    4 Sep 25 11:03 data -> slot
lrwxrwxrwx 1 root   root     21 Sep 25 10:43 drive0 -> /mnt/ssd/amanda/slots
lrwxrwxrwx 1 root   root     21 Sep 25 10:43 drive1 -> /mnt/ssd/amanda/slots
-rw------- 1 backup backup 1071 Sep 25 11:03 state
[11:06:10] backup@openhabian:/mnt/ssd/amanda/slots$

I’m using a ssd as storage

[11:06:10] backup@openhabian:/mnt/ssd/amanda/slots$ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda           8:0    0 447.1G  0 disk
├─sda1        8:1    0   256M  0 part
├─sda2        8:2    0  59.2G  0 part
└─sda3        8:3    0 387.7G  0 part /mnt/ssd
mmcblk0     179:0    0  59.5G  0 disk
├─mmcblk0p1 179:1    0   256M  0 part /boot
└─mmcblk0p2 179:2    0  59.2G  0 part /
[11:08:43] backup@openhabian:/mnt/ssd/amanda/slots$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        59G  9.9G   47G  18% /
devtmpfs        3.8G     0  3.8G   0% /dev
tmpfs           3.9G     0  3.9G   0% /dev/shm
tmpfs           3.9G  1.4M  3.9G   1% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           3.9G     0  3.9G   0% /sys/fs/cgroup
/dev/sda3       381G   69M  362G   1% /mnt/ssd
/dev/mmcblk0p1  253M   49M  204M  20% /boot
tmpfs           795M     0  795M   0% /run/user/1000
tmpfs           795M     0  795M   0% /run/user/34
[11:08:54] backup@openhabian:/mnt/ssd/amanda/slots$

So I’m not sure where I should look for the error.
Do I have a problem with access rights, preventing the slots to be created, or are the config files not created properly?

  • Platform information:
    • Hardware: Raspberry Pi4
    • OS: Raspbian GNU/Linux 10
    • openHAB version: 3.3.0

so you probably did not enter the number of tapes (slots) correctly during install.
Try again.

I am not asked for a number of tapes when using openhabian-config. Only question asked in that direction is, how much space I would like to use for the backups, where I set “100000”

I do have exactly the same issue. Did you find a solution for this?
I was also only asked to set the space for the backups (I did put in 100000).

Same here. No Question about the tapes. Only about the target size. Same Issue like above.

Current code only asks for the total size only that’s right. The install routine then divides that by 15 (# of tapes).
If you incorrectly enter a non-number (whitespace, unit, punctuation ?) that calculation fails.

Enable debugmode=maximum in openhabian.conf before installing Amanda to see what’s going on .

Hi @mstormi ,
thanks for your reply.

Here is the max Log.
I can’t find the mistake. Maybe you can help us.
Thanks!

openhabian@openhabian:~ $ sudo openhabian-config
2022-11-22_08:06:19_CET [openHABian] Checking for root privileges... OK
+ export UNATTENDED SILENT DEBUGMAX INTERACTIVE
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/auth.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/backup.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/config.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/ext-storage.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/find.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/habapp.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/helpers.bash
++ ESC='\033['
++ COL_DEF='\033[39;49;00m'
++ COL_RED='\033[31;01m'
++ COL_GREEN='\033[32;01m'
++ COL_YELLOW='\033[33;01m'
++ COL_BLUE='\033[34;01m'
++ COL_MAGENTA='\033[35;01m'
++ COL_CYAN='\033[36;01m'
++ COL_LGRAY='\033[37;01m'
++ COL_DGRAY='\033[90;01m'
++ export COL_DEF COL_RED COL_GREEN COL_YELLOW COL_BLUE COL_MAGENTA COL_CYAN COL_LGRAY COL_DGRAY
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/influxdb+grafana.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/java-jre.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/menu.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/nodejs-apps.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/openhab.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/openhabian.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/packages.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/system.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/vpn.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/wifi.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/zram.bash
++ pwd
+ OLDWD=/home/openhabian
+ cd /opt
+ update_openhabian_conf
+ local configFile=/etc/openhabian.conf
+ local referenceConfig=/opt/openhabian/build-image/openhabian.conf
+ cp /etc/openhabian.conf /etc/openhabian.conf.BAK
+ read -r line
+ [[ # Origin: openhabian.conf =~ ^(#)?[a-zA-Z] ]]
+ echo '# Origin: openhabian.conf'
+ read -r line
+ [[ # =~ ^(#)?[a-zA-Z] ]]
+ echo '#'
+ read -r line
+ [[ # Modify your openHABian settings =~ ^(#)?[a-zA-Z] ]]
+ echo '# Modify your openHABian settings'
+ read -r line
+ [[ # Handle with care, only touch if you need to! =~ ^(#)?[a-zA-Z] ]]
+ echo '# Handle with care, only touch if you need to!'
+ read -r line
+ [[ # This file will only be used on unattended initial install. =~ ^(#)?[a-zA-Z] ]]
+ echo '# This file will only be used on unattended initial install.'
+ read -r line
+ [[ # If you want to change anything after unattended install completed, use menu in openhabian-config. =~ ^(#)?[a-zA-Z] ]]
+ echo '# If you want to change anything after unattended install completed, use menu in openhabian-config.'
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # ATTENTION: to disable an option a line MUST be of the format '# option=value' =~ ^(#)?[a-zA-Z] ]]
+ echo '# ATTENTION: to disable an option a line MUST be of the format '\''# option=value'\'''
+ read -r line
+ [[ # KEEP THE SPACE IT IS IMPORTANT !! =~ ^(#)?[a-zA-Z] ]]
+ echo '# KEEP THE SPACE IT IS IMPORTANT !!'
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # Hostname to set this one to =~ ^(#)?[a-zA-Z] ]]
+ echo '# Hostname to set this one to'
+ read -r line
+ [[ hostname=openhabian =~ ^(#)?[a-zA-Z] ]]
+ parsed=hostname=openhabian
+ [[ hostname=openhabian =~ ^#[a-zA-Z] ]]
++ echo hostname=openhabian
++ cut -d= -f1
+ param=hostname
+ [[ -v hostname ]]
+ [[ openhabian == *\ * ]]
+ echo hostname=openhabian
+ read -r line
+ [[ # if it exists, the default user (with its working environment) will be renamed to this username given here ... =~ ^(#)?[a-zA-Z] ]]
+ echo '# if it exists, the default user (with its working environment) will be renamed to this username given here ...'
+ read -r line
+ [[ username=openhabian =~ ^(#)?[a-zA-Z] ]]
+ parsed=username=openhabian
+ [[ username=openhabian =~ ^#[a-zA-Z] ]]
++ echo username=openhabian
++ cut -d= -f1
+ param=username
+ [[ -v username ]]
+ [[ openhabian == *\ * ]]
+ echo username=openhabian
+ read -r line
+ [[ # ... and given this password. The password will be removed from this file after completion for security reasons. =~ ^(#)?[a-zA-Z] ]]
+ echo '# ... and given this password. The password will be removed from this file after completion for security reasons.'
+ read -r line
+ [[ userpw=openhabian =~ ^(#)?[a-zA-Z] ]]
+ parsed=userpw=openhabian
+ [[ userpw=openhabian =~ ^#[a-zA-Z] ]]
++ echo userpw=openhabian
++ cut -d= -f1
+ param=userpw
+ [[ -v userpw ]]
+ [[ openhabian == *\ * ]]
+ echo userpw=openhabian
+ read -r line
+ [[ # set this to download a SSH key and authorize the owner to login as the admin user =~ ^(#)?[a-zA-Z] ]]
+ echo '# set this to download a SSH key and authorize the owner to login as the admin user'
+ read -r line
+ [[ adminkeyurl="" =~ ^(#)?[a-zA-Z] ]]
+ parsed='adminkeyurl=""'
+ [[ adminkeyurl="" =~ ^#[a-zA-Z] ]]
++ echo 'adminkeyurl=""'
++ cut -d= -f1
+ param=adminkeyurl
+ [[ -v adminkeyurl ]]
+ [[ '' == *\ * ]]
+ echo adminkeyurl=
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # Language and timezone. See Debian documentation for valid values. =~ ^(#)?[a-zA-Z] ]]
+ echo '# Language and timezone. See Debian documentation for valid values.'
+ read -r line
+ [[ timezone=Europe/Berlin =~ ^(#)?[a-zA-Z] ]]
+ parsed=timezone=Europe/Berlin
+ [[ timezone=Europe/Berlin =~ ^#[a-zA-Z] ]]
++ echo timezone=Europe/Berlin
++ cut -d= -f1
+ param=timezone
+ [[ -v timezone ]]
+ [[ Europe/Berlin == *\ * ]]
+ echo timezone=Europe/Berlin
+ read -r line
+ [[ locales="en_US.UTF-8 de_DE.UTF-8" =~ ^(#)?[a-zA-Z] ]]
+ parsed='locales="en_US.UTF-8 de_DE.UTF-8"'
+ [[ locales="en_US.UTF-8 de_DE.UTF-8" =~ ^#[a-zA-Z] ]]
++ echo 'locales="en_US.UTF-8 de_DE.UTF-8"'
++ cut -d= -f1
+ param=locales
+ [[ -v locales ]]
+ [[ en_US.UTF-8 de_DE.UTF-8 == *\ * ]]
+ echo 'locales="en_US.UTF-8 de_DE.UTF-8"'
+ read -r line
+ [[ system_default_locale="en_US.UTF-8" =~ ^(#)?[a-zA-Z] ]]
+ parsed='system_default_locale="en_US.UTF-8"'
+ [[ system_default_locale="en_US.UTF-8" =~ ^#[a-zA-Z] ]]
++ echo 'system_default_locale="en_US.UTF-8"'
++ cut -d= -f1
+ param=system_default_locale
+ [[ -v system_default_locale ]]
+ [[ en_US.UTF-8 == *\ * ]]
+ echo system_default_locale=en_US.UTF-8
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # WiFi settings. An ethernet connection is recommended. =~ ^(#)?[a-zA-Z] ]]
+ echo '# WiFi settings. An ethernet connection is recommended.'
+ read -r line
+ [[ # If you have a RPi4, RPi3, RPi0W or a supported external WiFi dongle, the WiFi =~ ^(#)?[a-zA-Z] ]]
+ echo '# If you have a RPi4, RPi3, RPi0W or a supported external WiFi dongle, the WiFi'
+ read -r line
+ [[ # interface can be setup and used for the initial installation. =~ ^(#)?[a-zA-Z] ]]
+ echo '# interface can be setup and used for the initial installation.'
+ read -r line
+ [[ # Fill in your SSID and password below, leave empty or put comment in front to =~ ^(#)?[a-zA-Z] ]]
+ echo '# Fill in your SSID and password below, leave empty or put comment in front to'
+ read -r line
+ [[ # have your WiFi remain unchanged/uninitialized. Make sure your Ethernet works. =~ ^(#)?[a-zA-Z] ]]
+ echo '# have your WiFi remain unchanged/uninitialized. Make sure your Ethernet works.'
+ read -r line
+ [[ # ATTENTION: you need to escape these special characters: $, `, ", \, (newline) =~ ^(#)?[a-zA-Z] ]]
+ echo '# ATTENTION: you need to escape these special characters: $, `, ", \, (newline)'
+ read -r line
+ [[ # 'Escaping' means to put an additional \ in front of that character =~ ^(#)?[a-zA-Z] ]]
+ echo '# '\''Escaping'\'' means to put an additional \ in front of that character'
+ read -r line
+ [[ wifi_ssid="" =~ ^(#)?[a-zA-Z] ]]
+ parsed='wifi_ssid=""'
+ [[ wifi_ssid="" =~ ^#[a-zA-Z] ]]
++ echo 'wifi_ssid=""'
++ cut -d= -f1
+ param=wifi_ssid
+ [[ -v wifi_ssid ]]
+ [[ '' == *\ * ]]
+ echo wifi_ssid=
+ read -r line
+ [[ wifi_password="" =~ ^(#)?[a-zA-Z] ]]
+ parsed='wifi_password=""'
+ [[ wifi_password="" =~ ^#[a-zA-Z] ]]
++ echo 'wifi_password=""'
++ cut -d= -f1
+ param=wifi_password
+ [[ -v wifi_password ]]
+ [[ '' == *\ * ]]
+ echo wifi_password=
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # Wi-Fi setting. Select a two-letter country code suitable for your location =~ ^(#)?[a-zA-Z] ]]
+ echo '# Wi-Fi setting. Select a two-letter country code suitable for your location'
+ read -r line
+ [[ # E.g. US (default), DE, AU, NZ... =~ ^(#)?[a-zA-Z] ]]
+ echo '# E.g. US (default), DE, AU, NZ...'
+ read -r line
+ [[ # You may infringe on local legislature otherwise =~ ^(#)?[a-zA-Z] ]]
+ echo '# You may infringe on local legislature otherwise'
+ read -r line
+ [[ # See https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 or /usr/share/zoneinfo/zone.tab =~ ^(#)?[a-zA-Z] ]]
+ echo '# See https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 or /usr/share/zoneinfo/zone.tab'
+ read -r line
+ [[ wifi_country="" =~ ^(#)?[a-zA-Z] ]]
+ parsed='wifi_country=""'
+ [[ wifi_country="" =~ ^#[a-zA-Z] ]]
++ echo 'wifi_country=""'
++ cut -d= -f1
+ param=wifi_country
+ [[ -v wifi_country ]]
+ [[ '' == *\ * ]]
+ echo wifi_country=
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # Eventually disable all IPv6 e.g. on installation problems =~ ^(#)?[a-zA-Z] ]]
+ echo '# Eventually disable all IPv6 e.g. on installation problems'
+ read -r line
+ [[ # values: "enable", "disable" =~ ^(#)?[a-zA-Z] ]]
+ echo '# values: "enable", "disable"'
+ read -r line
+ [[ ipv6=enable =~ ^(#)?[a-zA-Z] ]]
+ parsed=ipv6=enable
+ [[ ipv6=enable =~ ^#[a-zA-Z] ]]
++ echo ipv6=enable
++ cut -d= -f1
+ param=ipv6
+ [[ -v ipv6 ]]
+ [[ enable == *\ * ]]
+ echo ipv6=enable
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # repo and branch to clone from =~ ^(#)?[a-zA-Z] ]]
+ echo '# repo and branch to clone from'
+ read -r line
+ [[ repositoryurl=https://github.com/openhab/openhabian.git =~ ^(#)?[a-zA-Z] ]]
+ parsed=repositoryurl=https://github.com/openhab/openhabian.git
+ [[ repositoryurl=https://github.com/openhab/openhabian.git =~ ^#[a-zA-Z] ]]
++ echo repositoryurl=https://github.com/openhab/openhabian.git
++ cut -d= -f1
+ param=repositoryurl
+ [[ -v repositoryurl ]]
+ [[ https://github.com/openhab/openhabian == *\ * ]]
+ echo repositoryurl=https://github.com/openhab/openhabian
+ read -r line
+ [[ clonebranch=openHAB3 =~ ^(#)?[a-zA-Z] ]]
+ parsed=clonebranch=openHAB3
+ [[ clonebranch=openHAB3 =~ ^#[a-zA-Z] ]]
++ echo clonebranch=openHAB3
++ cut -d= -f1
+ param=clonebranch
+ [[ -v clonebranch ]]
+ [[ openHAB3 == *\ * ]]
+ echo clonebranch=openHAB3
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # initial openHAB configuration to import (URL or filename) =~ ^(#)?[a-zA-Z] ]]
+ echo '# initial openHAB configuration to import (URL or filename)'
+ read -r line
+ [[ # the file needs to be a zip archive created from openhab-cli backup =~ ^(#)?[a-zA-Z] ]]
+ echo '# the file needs to be a zip archive created from openhab-cli backup'
+ read -r line
+ [[ # initialconfig=/boot/initial.zip =~ ^(#)?[a-zA-Z] ]]
+ echo '# initialconfig=/boot/initial.zip'
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # debug verbosity mode =~ ^(#)?[a-zA-Z] ]]
+ echo '# debug verbosity mode'
+ read -r line
+ [[ # off, on (verbose output in log) or maximum (show every command) =~ ^(#)?[a-zA-Z] ]]
+ echo '# off, on (verbose output in log) or maximum (show every command)'
+ read -r line
+ [[ debugmode=off =~ ^(#)?[a-zA-Z] ]]
+ parsed=debugmode=off
+ [[ debugmode=off =~ ^#[a-zA-Z] ]]
++ echo debugmode=off
++ cut -d= -f1
+ param=debugmode
+ [[ -v debugmode ]]
+ [[ maximum == *\ * ]]
+ echo debugmode=maximum
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # the framebuffer on RPi is enabled by default =~ ^(#)?[a-zA-Z] ]]
+ echo '# the framebuffer on RPi is enabled by default'
+ read -r line
+ [[ framebuffer=enable =~ ^(#)?[a-zA-Z] ]]
+ parsed=framebuffer=enable
+ [[ framebuffer=enable =~ ^#[a-zA-Z] ]]
++ echo framebuffer=enable
++ cut -d= -f1
+ param=framebuffer
+ [[ -v framebuffer ]]
+ [[ enable == *\ * ]]
+ echo framebuffer=enable
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # fake hardware =~ ^(#)?[a-zA-Z] ]]
+ echo '# fake hardware'
+ read -r line
+ [[ # force treating your box as if it was a ... =~ ^(#)?[a-zA-Z] ]]
+ echo '# force treating your box as if it was a ...'
+ read -r line
+ [[ # pi4, pi4_8gb, cm4, pi400, pi3, cm3, pi3+, cm3+, pi2, pi1, cm1, pi0, pi0w, pi0w2, x86 =~ ^(#)?[a-zA-Z] ]]
+ echo '# pi4, pi4_8gb, cm4, pi400, pi3, cm3, pi3+, cm3+, pi2, pi1, cm1, pi0, pi0w, pi0w2, x86'
+ read -r line
+ [[ # hw= =~ ^(#)?[a-zA-Z] ]]
+ echo '# hw='
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # Hardware architecture =~ ^(#)?[a-zA-Z] ]]
+ echo '# Hardware architecture'
+ read -r line
+ [[ # x86_64, amd64, armv6l, armv7l, aarch64, arm64 =~ ^(#)?[a-zA-Z] ]]
+ echo '# x86_64, amd64, armv6l, armv7l, aarch64, arm64'
+ read -r line
+ [[ # hwarch= =~ ^(#)?[a-zA-Z] ]]
+ echo '# hwarch='
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # OS distribution/release =~ ^(#)?[a-zA-Z] ]]
+ echo '# OS distribution/release'
+ read -r line
+ [[ # Valid arguments: raspios, raspbian, debian, ubuntu, stretch, buster, bullseye, bionic, focal =~ ^(#)?[a-zA-Z] ]]
+ echo '# Valid arguments: raspios, raspbian, debian, ubuntu, stretch, buster, bullseye, bionic, focal'
+ read -r line
+ [[ # osrelease= =~ ^(#)?[a-zA-Z] ]]
+ echo '# osrelease='
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # Java version to install =~ ^(#)?[a-zA-Z] ]]
+ echo '# Java version to install'
+ read -r line
+ [[ java_opt=11 =~ ^(#)?[a-zA-Z] ]]
+ parsed=java_opt=11
+ [[ java_opt=11 =~ ^#[a-zA-Z] ]]
++ echo java_opt=11
++ cut -d= -f1
+ param=java_opt
+ [[ -v java_opt ]]
+ [[ Zulu11-32 == *\ * ]]
+ echo java_opt=Zulu11-32
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # install zram per default, set to "disable" to skip installation =~ ^(#)?[a-zA-Z] ]]
+ echo '# install zram per default, set to "disable" to skip installation'
+ read -r line
+ [[ zraminstall=enable =~ ^(#)?[a-zA-Z] ]]
+ parsed=zraminstall=enable
+ [[ zraminstall=enable =~ ^#[a-zA-Z] ]]
++ echo zraminstall=enable
++ cut -d= -f1
+ param=zraminstall
+ [[ -v zraminstall ]]
+ [[ enable == *\ * ]]
+ echo zraminstall=enable
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # start comitup hotspot if internet is not reachable =~ ^(#)?[a-zA-Z] ]]
+ echo '# start comitup hotspot if internet is not reachable'
+ read -r line
+ [[ hotspot=enable =~ ^(#)?[a-zA-Z] ]]
+ parsed=hotspot=enable
+ [[ hotspot=enable =~ ^#[a-zA-Z] ]]
++ echo hotspot=enable
++ cut -d= -f1
+ param=hotspot
+ [[ -v hotspot ]]
+ [[ enable == *\ * ]]
+ echo hotspot=enable
+ read -r line
+ [[ hotspotpw=openhabian =~ ^(#)?[a-zA-Z] ]]
+ parsed=hotspotpw=openhabian
+ [[ hotspotpw=openhabian =~ ^#[a-zA-Z] ]]
++ echo hotspotpw=openhabian
++ cut -d= -f1
+ param=hotspotpw
+ [[ -v hotspotpw ]]
+ [[ openhabian == *\ * ]]
+ echo hotspotpw=openhabian
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # external SD card device to backup and mirror the internal SD card to =~ ^(#)?[a-zA-Z] ]]
+ echo '# external SD card device to backup and mirror the internal SD card to'
+ read -r line
+ [[ # backupdrive=/dev/sda =~ ^(#)?[a-zA-Z] ]]
+ echo '# backupdrive=/dev/sda'
+ read -r line
+ [[ storageconfig=openhab-dir =~ ^(#)?[a-zA-Z] ]]
+ parsed=storageconfig=openhab-dir
+ [[ storageconfig=openhab-dir =~ ^#[a-zA-Z] ]]
++ echo storageconfig=openhab-dir
++ cut -d= -f1
+ param=storageconfig
+ [[ -v storageconfig ]]
+ [[ openhab-dir == *\ * ]]
+ echo storageconfig=openhab-dir
+ read -r line
+ [[ storagedir=/storage =~ ^(#)?[a-zA-Z] ]]
+ parsed=storagedir=/storage
+ [[ storagedir=/storage =~ ^#[a-zA-Z] ]]
++ echo storagedir=/storage
++ cut -d= -f1
+ param=storagedir
+ [[ -v storagedir ]]
+ [[ /storage == *\ * ]]
+ echo storagedir=/storage
+ read -r line
+ [[ storagetapes=15 =~ ^(#)?[a-zA-Z] ]]
+ parsed=storagetapes=15
+ [[ storagetapes=15 =~ ^#[a-zA-Z] ]]
++ echo storagetapes=15
++ cut -d= -f1
+ param=storagetapes
+ [[ -v storagetapes ]]
+ [[ 15 == *\ * ]]
+ echo storagetapes=15
+ read -r line
+ [[ storagecapacity=1024 =~ ^(#)?[a-zA-Z] ]]
+ parsed=storagecapacity=1024
+ [[ storagecapacity=1024 =~ ^#[a-zA-Z] ]]
++ echo storagecapacity=1024
++ cut -d= -f1
+ param=storagecapacity
+ [[ -v storagecapacity ]]
+ [[ 1024 == *\ * ]]
+ echo storagecapacity=1024
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # mail relay settings =~ ^(#)?[a-zA-Z] ]]
+ echo '# mail relay settings'
+ read -r line
+ [[ # adminmail=john.doe@foo.bar =~ ^(#)?[a-zA-Z] ]]
+ echo '# adminmail=john.doe@foo.bar'
+ read -r line
+ [[ # relayuser=john.doe@foo.bar =~ ^(#)?[a-zA-Z] ]]
+ echo '# relayuser=john.doe@foo.bar'
+ read -r line
+ [[ # relaypass=secret =~ ^(#)?[a-zA-Z] ]]
+ echo '# relaypass=secret'
+ read -r line
+ [[ # smarthost=smtp.gmail.com =~ ^(#)?[a-zA-Z] ]]
+ echo '# smarthost=smtp.gmail.com'
+ read -r line
+ [[ # smartport=587 =~ ^(#)?[a-zA-Z] ]]
+ echo '# smartport=587'
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # Tailscale VPN =~ ^(#)?[a-zA-Z] ]]
+ echo '# Tailscale VPN'
+ read -r line
+ [[ # preauthkey=tskey-xxxxxxxxxxxxxxxxx =~ ^(#)?[a-zA-Z] ]]
+ echo '# preauthkey=tskey-xxxxxxxxxxxxxxxxx'
+ read -r line
+ [[ # tstags=tag:client =~ ^(#)?[a-zA-Z] ]]
+ echo '# tstags=tag:client'
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # Custom log files =~ ^(#)?[a-zA-Z] ]]
+ echo '# Custom log files'
+ read -r line
+ [[ # custom_log_files=("/var/log/foo.log" "/var/log/bar.log") =~ ^(#)?[a-zA-Z] ]]
+ echo '# custom_log_files=("/var/log/foo.log" "/var/log/bar.log")'
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # vim: filetype=sh =~ ^(#)?[a-zA-Z] ]]
+ echo '# vim: filetype=sh'
+ read -r line
+ [[ -f /etc/init.d/openhabian-config ]]
+ config_ipv6
+ local aptConf=/etc/apt/apt.conf.d/S90force-ipv4
+ local sysctlConf=/etc/sysctl.d/99-sysctl.conf
+ [[ enable == \d\i\s\a\b\l\e ]]
+ [[ enable == \e\n\a\b\l\e ]]
+ grep -qs '^[[:space:]]*# Disable all IPv6 functionality' /etc/sysctl.d/99-sysctl.conf
+ [[ -n '' ]]
+ apt_update
+ export PID_APT=3093
+ PID_APT=3093
+ whiptail_check
+ nohup apt-get update
++ command -v whiptail
+ [[ -x /usr/bin/whiptail ]]
+ load_create_config
+ local 'questionText=\nWelcome to openHABian!\n\nPlease provide the name of your Linux user i.e. the account you normally log in with.\n\nTypical user names are '\''pi'\'' or '\''ubuntu'\''.'
+ local input
+ [[ -f /etc/openhabian.conf ]]
++ timestamp
++ printf '%(%F_%T_%Z)T\n' -1
+ echo -n '2022-11-22_08:06:19_CET [openHABian] Loading configuration file '\''/etc/openhabian.conf'\''... '
2022-11-22_08:06:19_CET [openHABian] Loading configuration file '/etc/openhabian.conf'... ++ getent group openhabian
+ [[ ! -n openhabian:x:1000:openhabian,frontail ]]
+ id -u openhabian
+ source /etc/openhabian.conf
++ hostname=openhabian
++ username=openhabian
++ userpw=openhabian
++ adminkeyurl=
++ timezone=Europe/Berlin
++ locales='en_US.UTF-8 de_DE.UTF-8'
++ system_default_locale=en_US.UTF-8
++ wifi_ssid=
++ wifi_password=
++ wifi_country=
++ ipv6=enable
++ repositoryurl=https://github.com/openhab/openhabian
++ clonebranch=openHAB3
++ debugmode=maximum
++ framebuffer=enable
++ java_opt=Zulu11-32
++ zraminstall=enable
++ hotspot=enable
++ hotspotpw=openhabian
++ storageconfig=openhab-dir
++ storagedir=/storage
++ storagetapes=15
++ storagecapacity=1024
+ echo OK
OK
+ openhabian_console_check
+ [[ -z 1 ]]
++ tput cols
+ [[ 186 -ge 120 ]]
+ return 0
+ openhabian_update_check
+ [[ -z 1 ]]
+ local branch
+ local introText
+ local unsupportedOSText
+ branch=openHAB3
+ introText='Additions, improvements or fixes were added to the openHABian configuration tool. Would you like to update now and benefit from them? The update will not automatically apply changes to your system.\n\nUpdating is recommended.'
+ unsupportedOSText='You are running an old Linux release that is no longer officially supported.\nWe recommend upgrading to the most current stable release of your distribution (or current Long Term Support version for distributions that offer LTS).\nDo you really want to continue using openHABian on this system?'
++ timestamp
++ printf '%(%F_%T_%Z)T\n' -1
++ get_git_revision
++ local branch
++ local commitDate
++ local shorthash
+++ git -C /opt/openhabian rev-parse --abbrev-ref HEAD
++ branch=openHAB3
+++ git -C /opt/openhabian log --pretty=format:%aI -n 1
++ commitDate=2022-11-09T11:29:28+01:00
+++ git -C /opt/openhabian log --pretty=format:%h -n 1
++ shorthash=1b47639
++ echo '[openHAB3]{2022-11-09T11:29:28+01:00}(1b47639)'
+ echo '2022-11-22_08:06:19_CET [openHABian] openHABian configuration tool version: [openHAB3]{2022-11-09T11:29:28+01:00}(1b47639)'
2022-11-22_08:06:19_CET [openHABian] openHABian configuration tool version: [openHAB3]{2022-11-09T11:29:28+01:00}(1b47639)
++ timestamp
++ printf '%(%F_%T_%Z)T\n' -1
+ echo -n '2022-11-22_08:06:19_CET [openHABian] Checking for changes in origin branch openHAB3... '
2022-11-22_08:06:19_CET [openHABian] Checking for changes in origin branch openHAB3... + is_stretch
+ [[ '' == \s\t\r\e\t\c\h ]]
++ cat /etc/os-release
+ [[ PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs" =~ stretch ]]
+ return 1
+ is_xenial
+ [[ '' == \x\e\n\i\a\l ]]
++ cat /etc/os-release
+ [[ PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs" =~ xenial ]]
+ return 1
+ git -C /opt/openhabian config user.email openhabian@openHABian
+ git -C /opt/openhabian config user.name openhabian
+ git -C /opt/openhabian fetch --quiet origin
++ git -C /opt/openhabian rev-parse openHAB3
++ git -C /opt/openhabian rev-parse '@{u}'
+ [[ 1b47639f1ffa4da70e2c86f4c601ee1775ed86b3 == 1b47639f1ffa4da70e2c86f4c601ee1775ed86b3 ]]
+ echo OK
OK
+ openhabian_announcements
+ [[ -z 1 ]]
+ local altReadNews
+ local newsFile
+ local readNews
+ altReadNews=/tmp/NEWS.md
+ newsFile=/opt/openhabian/NEWS.md
+ readNews=/opt/openhabian/docs/NEWS.md
+ cmp --silent /opt/openhabian/NEWS.md /opt/openhabian/docs/NEWS.md
++ timestamp
++ printf '%(%F_%T_%Z)T\n' -1
+ echo -n '2022-11-22_08:06:20_CET [openHABian] Switching to branch openHAB3... '
2022-11-22_08:06:20_CET [openHABian] Switching to branch openHAB3... + git -C /opt/openhabian checkout --quiet openHAB3
+ echo OK
OK
+ jsscripting_npm_check openhab
+ '[' openhab == '' ']'
+ '[' '!' -d /etc/openhab/automation/js/node_modules/openhab ']'
+ return 0
+ jsscripting_npm_check openhab_rules_tools
+ '[' openhab_rules_tools == '' ']'
+ '[' '!' -d /etc/openhab/automation/js/node_modules/openhab_rules_tools ']'
+ return 0
+ bashrc_copy
++ timestamp
++ printf '%(%F_%T_%Z)T\n' -1
+ echo -n '2022-11-22_08:06:20_CET [openHABian] Adding slightly tuned bash configuration files to system... '
2022-11-22_08:06:20_CET [openHABian] Adding slightly tuned bash configuration files to system... + cp /opt/openhabian/includes/generic/bash.bashrc /etc/bash.bashrc
+ cp /opt/openhabian/includes/generic/bashrc-root /root/.bashrc
+ cp /opt/openhabian/includes/generic/bash_profile /home/openhabian/.bash_profile
+ cp /opt/openhabian/includes/generic/bash_aliases /home/openhabian/.bash_aliases
+ chown openhabian:openhabian /home/openhabian/.bash_aliases /home/openhabian/.bash_history /home/openhabian/.bash_logout /home/openhabian/.bash_profile
+ echo OK
OK
+ show_main_menu
+ local choice
+ local version
+++ get_git_revision
+++ local branch
+++ local commitDate
+++ local shorthash
++++ git -C /opt/openhabian rev-parse --abbrev-ref HEAD
+++ branch=openHAB3
++++ git -C /opt/openhabian log --pretty=format:%aI -n 1
+++ commitDate=2022-11-09T11:29:28+01:00
++++ git -C /opt/openhabian log --pretty=format:%h -n 1
+++ shorthash=1b47639
+++ echo '[openHAB3]{2022-11-09T11:29:28+01:00}(1b47639)'
++ whiptail --title 'openHABian Configuration Tool — [openHAB3]{2022-11-09T11:29:28+01:00}(1b47639)' --menu 'Setup Options' 19 116 12 --cancel-button Exit --ok-button Execute '00 | About openHABian' 'Information about the openHABian project and this tool' '' '' '01 | Select Branch' 'Select the openHABian config tool version ("branch") to run' '02 | Upgrade System' 'Update all installed software packages (incl. openHAB) to their latest version' '03 | Install openHAB' 'Install or upgrade to openHAB 3' '04 | Import config' 'Import an openHAB 3 configuration from file or URL' '' '' '10 | Apply Improvements' 'Apply the latest improvements to the basic openHABian setup ►' '20 | Optional Components' 'Choose from a set of optional software components ►' '30 | System Settings' 'A range of system and hardware related configuration steps ►' '40 | openHAB Related' 'Switch the installed openHAB version or apply tweaks ►' '50 | Backup/Restore' 'Manage backups and restore your system ►'
+ choice='50 | Backup/Restore'
+ RET=0
+ '[' 0 -eq 1 ']'
+ '[' 0 -eq 255 ']'
+ [[ 50 | Backup/Restore == '' ]]
+ [[ 50 | Backup/Restore == \0\0* ]]
+ [[ 50 | Backup/Restore == \0\1* ]]
+ [[ 50 | Backup/Restore == \0\2* ]]
+ [[ 50 | Backup/Restore == \0\3* ]]
+ [[ 50 | Backup/Restore == \0\4* ]]
+ [[ 50 | Backup/Restore == \1\0* ]]
+ [[ 50 | Backup/Restore == \2\0* ]]
+ [[ 50 | Backup/Restore == \3\0* ]]
+ [[ 50 | Backup/Restore == \4\0* ]]
+ [[ 50 | Backup/Restore == \5\0* ]]
+++ get_git_revision
+++ local branch
+++ local commitDate
+++ local shorthash
++++ git -C /opt/openhabian rev-parse --abbrev-ref HEAD
+++ branch=openHAB3
++++ git -C /opt/openhabian log --pretty=format:%aI -n 1
+++ commitDate=2022-11-09T11:29:28+01:00
++++ git -C /opt/openhabian log --pretty=format:%h -n 1
+++ shorthash=1b47639
+++ echo '[openHAB3]{2022-11-09T11:29:28+01:00}(1b47639)'
++ whiptail --title 'openHABian Configuration Tool — [openHAB3]{2022-11-09T11:29:28+01:00}(1b47639)' --menu Backup/Restore 15 116 8 --cancel-button Back --ok-button Execute '50 | Backup openHAB config' 'Backup (export) the current active openHAB configuration' '51 | Restore an openHAB config' 'Restore an openHAB configuration from backup zipfile' '   | Restore text only config' 'Restore text only configuration without restarting' '52 | Amanda System Backup' 'Set up Amanda to comprehensively backup your complete openHABian box' '53 | Setup SD mirroring' 'Setup mirroring of internal to external SD card' '   | Remove SD mirroring' 'Disable mirroring of SD cards' '54 | Raw copy SD' 'Raw copy internal SD to external disk / SD card' '55 | Sync SD' 'Rsync internal SD to external disk / SD card'
+ choice2='52 | Amanda System Backup'
+ '[' 0 -eq 1 ']'
+ '[' 1 -eq 255 ']'
+ case "$choice2" in
+ wait_for_apt_to_finish_update
+ local 'spin=-\|/'
+ local i
+ [[ -z 3093 ]]
++ timestamp
++ printf '%(%F_%T_%Z)T\n' -1
+ echo -n '2022-11-22_08:06:26_CET [openHABian] Updating Linux package information... '
2022-11-22_08:06:26_CET [openHABian] Updating Linux package information... + kill -0 3093
+ echo OK
OK
+ amanda_setup
+ [[ -z 1 ]]
+ local config
+ local backupUser=backup
+ local tapes
+ local tapeSize
+ local storageLoc
+ local adminMail=root@openhabian
+ local awsSite
+ local awsBucket
+ local awsAccessKey
+ local awsSecretKey
+ local backupPass
+ local backupPass1
+ local backupPass2
+ local 'queryText=You are about to install the Amanda backup solution.\nDocumentation is available at '\''/opt/openhabian/docs/openhabian-amanda.md'\'' or https://github.com/openhab/openhabian/blob/main/docs/openhabian-amanda.md\nHave you read this document? If not, please do so now, as you will need to follow the instructions provided there in order to successfully complete installation of Amanda.\n\nProceeding will setup a backup mechanism to allow for saving your openHAB setup and modifications to either USB attached or Amazon cloud storage.\nYou can add your own files/directories to be backed up, and you can store and create clones of your openHABian SD card to have an pre-prepared replacement in case of card failures.\n\nWARNING: running this setup will overwrite any previous Amanda backup configurations.\n\nWould you like to begin setup?'
+ local 'successText=Setup was successful.\n\nAmanda backup tool is now taking backups around 01:00. For further readings, start at http://wiki.zmanda.com/index.php/User_documentation.'
++ timestamp
++ printf '%(%F_%T_%Z)T\n' -1
+ echo -n '2022-11-22_08:06:26_CET [openHABian] Beginning setup of the Amanda backup system... '
2022-11-22_08:06:26_CET [openHABian] Beginning setup of the Amanda backup system... + whiptail --title 'Amanda backup installation' --yes-button Continue --no-button Cancel --defaultno --yesno 'You are about to install the Amanda backup solution.\nDocumentation is available at '\''/opt/openhabian/docs/openhabian-amanda.md'\'' or https://github.com/openhab/openhabian/blob/main/docs/openhabian-amanda.md\nHave you read this document? If not, please do so now, as you will need to follow the instructions provided there in order to successfully complete installation of Amanda.\n\nProceeding will setup a backup mechanism to allow for saving your openHAB setup and modifications to either USB attached or Amazon cloud storage.\nYou can add your own files/directories to be backed up, and you can store and create clones of your openHABian SD card to have an pre-prepared replacement in case of card failures.\n\nWARNING: running this setup will overwrite any previous Amanda backup configurations.\n\nWould you like to begin setup?' 24 80
+ echo OK
OK
+ [[ -z '' ]]
++ whiptail --title 'Authentication setup' --passwordbox '\nEnter a password for backup:' 9 80
+ backupPass1=openhabian
++ whiptail --title 'Authentication setup' --passwordbox '\nPlease confirm the password:' 9 80
+ backupPass2=openhabian
+ [[ openhabian == \o\p\e\n\h\a\b\i\a\n ]]
+ [[ 10 -ge 8 ]]
+ [[ 10 -ge 8 ]]
+ backupPass=openhabian
+ [[ -z openhabian ]]
+ amanda_install openhabian
+ local backupUser=backup
+ local backupPass=openhabian
++ timestamp
++ printf '%(%F_%T_%Z)T\n' -1
+ echo -n '2022-11-22_08:06:35_CET [openHABian] Configuring Amanda backup system prerequisites... '
2022-11-22_08:06:35_CET [openHABian] Configuring Amanda backup system prerequisites... + echo backup:openhabian
+ cond_redirect chpasswd
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ chpasswd \033[39;49;00m'

$ chpasswd
+ chpasswd
+ return 0
+ grep -qs '^[[:space:]]*backup:' /etc/group
+ cond_redirect usermod --append --groups backup openhabian
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ usermod --append --groups backup openhabian \033[39;49;00m'

$ usermod --append --groups backup openhabian
+ usermod --append --groups backup openhabian
+ return 0
+ cond_redirect usermod --append --groups backup backup
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ usermod --append --groups backup backup \033[39;49;00m'

$ usermod --append --groups backup backup
+ usermod --append --groups backup backup
+ return 0
+ cond_redirect chsh --shell /bin/bash backup
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ chsh --shell /bin/bash backup \033[39;49;00m'

$ chsh --shell /bin/bash backup
+ chsh --shell /bin/bash backup
+ return 0
+ echo OK
OK
+ amanda_is_installed
+ dpkg -s amanda-common amanda-server amanda-client
+ return 1
++ timestamp
++ printf '%(%F_%T_%Z)T\n' -1
+ echo -n '2022-11-22_08:06:36_CET [openHABian] Installing Amanda backup system... '
2022-11-22_08:06:36_CET [openHABian] Installing Amanda backup system... + cond_redirect apt-get install --yes amanda-common amanda-server amanda-client
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ apt-get install --yes amanda-common amanda-server amanda-client \033[39;49;00m'

$ apt-get install --yes amanda-common amanda-server amanda-client
+ apt-get install --yes amanda-common amanda-server amanda-client
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Suggested packages:
  dump gnuplot smbclient
The following NEW packages will be installed:
  amanda-client amanda-common amanda-server
0 upgraded, 3 newly installed, 0 to remove and 100 not upgraded.
Need to get 0 B/2,776 kB of archives.
After this operation, 10.1 MB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously unselected package amanda-common.
(Reading database ... 64214 files and directories currently installed.)
Preparing to unpack .../amanda-common_1%3a3.5.1-7_armhf.deb ...
Unpacking amanda-common (1:3.5.1-7) ...
Selecting previously unselected package amanda-client.
Preparing to unpack .../amanda-client_1%3a3.5.1-7_armhf.deb ...
Unpacking amanda-client (1:3.5.1-7) ...
Selecting previously unselected package amanda-server.
Preparing to unpack .../amanda-server_1%3a3.5.1-7_armhf.deb ...
Unpacking amanda-server (1:3.5.1-7) ...
Setting up amanda-common (1:3.5.1-7) ...
backup:x:34:34:backup:/var/backups:/bin/bash
The user `backup' is already a member of `disk'.
The user `backup' is already a member of `tape'.
Setting up amanda-server (1:3.5.1-7) ...
Setting up amanda-client (1:3.5.1-7) ...
Processing triggers for man-db (2.9.4-2) ...
Updating FireMotD available updates count ...
+ return 0
+ echo OK
OK
+ dpkg -s exim4
++ whiptail --title 'Reporting address' --inputbox '\nEnter a mail address to have Amanda send reports to:' 9 80 root@openhabian
+ adminMail=
+ whiptail --title 'Backup using locally attached storage' --yes-button Yes --no-button No --yesno 'Would you like to setup a backup mechanism based on locally attached or NAS mounted storage?' 8 80
+ config=openhab-dir
++ whiptail --title 'Storage directory' --inputbox '\nWhat is the directory backups should be stored in?\n\nYou can specify any locally accessible directory, no matter if it'\''s located on the internal SD card, an external USB-attached device such as a USB stick, HDD, or a NFS/CIFS share.' 13 80
+ storageLoc=/mnt/ext-storage/amanda
+ cond_redirect sudo -u backup touch /mnt/ext-storage/amanda/TEST
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ sudo -u backup touch /mnt/ext-storage/amanda/TEST \033[39;49;00m'

$ sudo -u backup touch /mnt/ext-storage/amanda/TEST
+ sudo -u backup touch /mnt/ext-storage/amanda/TEST
+ return 0
+ rm -f /mnt/ext-storage/amanda/TEST
+ tapes=15
++ whiptail --title 'Storage capacity' --inputbox '\nHow much storage do you want to dedicate to your backup in megabytes?\n\nRecommendation: 2-3 times the amount of data to be backed up.' 11 80
+ tapeSize=90000
+ (( tapeSize/=tapes ))
+ create_amanda_config openhab-dir backup '' 15 6000 /mnt/ext-storage/amanda
+ local adminMail
+ local amandaHosts=/var/backups/.amandahosts
+ local amandaSecurityConf=/etc/amanda-security.conf
+ local amandaIncludesDir=/opt/openhabian/includes/amanda
+ local awsAccessKey
+ local awsBucket
+ local awsSecretKey
+ local awsSite
+ local backupUser
+ local config
+ local configDir
+ local databaseDir
+ local dumpType=comp-user-tar
+ local indexDir
+ local logDir
+ local serviceTargetDir=/etc/systemd/system
+ local storageLoc
+ local storageText
+ local tapeChanger
+ local tapes
+ local tapeSize
+ local tapeType
+ config=openhab-dir
+ backupUser=backup
+ adminMail=
+ tapeSize=6000
+ storageLoc=/mnt/ext-storage/amanda
+ awsSite=
+ awsBucket=
+ awsAccessKey=
+ awsSecretKey=
+ configDir=/etc/amanda/openhab-dir
+ databaseDir=/var/lib/amanda/openhab-dir/curinfo
+ indexDir=/var/lib/amanda/openhab-dir/index
+ logDir=/var/log/amanda/openhab-dir
+ storageText='We need to prepare ("label") your storage media.\n\nFor permanent storage such as USB or NAS mounted storage, as well as for cloud based storage, we will create  virtual containers.'
++ timestamp
++ printf '%(%F_%T_%Z)T\n' -1
+ echo -n '2022-11-22_08:07:34_CET [openHABian] Creating Amanda filesystem... '
2022-11-22_08:07:34_CET [openHABian] Creating Amanda filesystem... + cond_redirect mkdir -p /etc/amanda/openhab-dir /var/lib/amanda/openhab-dir/curinfo /var/log/amanda/openhab-dir /var/lib/amanda/openhab-dir/index
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ mkdir -p /etc/amanda/openhab-dir /var/lib/amanda/openhab-dir/curinfo /var/log/amanda/openhab-dir /var/lib/amanda/openhab-dir/index \033[39;49;00m'

$ mkdir -p /etc/amanda/openhab-dir /var/lib/amanda/openhab-dir/curinfo /var/log/amanda/openhab-dir /var/lib/amanda/openhab-dir/index
+ mkdir -p /etc/amanda/openhab-dir /var/lib/amanda/openhab-dir/curinfo /var/log/amanda/openhab-dir /var/lib/amanda/openhab-dir/index
+ return 0
+ cond_redirect touch /etc/amanda/openhab-dir/tapelist
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ touch /etc/amanda/openhab-dir/tapelist \033[39;49;00m'

$ touch /etc/amanda/openhab-dir/tapelist
+ touch /etc/amanda/openhab-dir/tapelist
+ return 0
++ dig +short openhabian
+ ip=192.168.178.13
++ host 192.168.178.13
++ cut '-d ' -f1
host: error while loading shared libraries: libdns-9.16.27-Raspbian.so: cannot open shared object file: No such file or directory
+ revip=
+ [[ -n '' ]]
+ echo -e 'openhabian backup amdump\nopenhabian root amindexd amidxtaped\nlocalhost backup\nlocalhost root amindexd amidxtaped'
+ is_aarch64
+ [[ '' == \a\a\r\c\h\6\4 ]]
+ [[ '' == \a\r\m\6\4 ]]
+ case "$(uname -m)" in
++ uname -m
+ return 1
+ GNUTAR=/usr/bin/tar
+ echo -e 'amgtar:gnutar_path=/usr/bin/tar\n'
+ cond_redirect chown --recursive backup:backup /var/backups/.amandahosts /etc/amanda/openhab-dir /var/lib/amanda/openhab-dir/curinfo /var/lib/amanda/openhab-dir/index /var/log/amanda
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ chown --recursive backup:backup /var/backups/.amandahosts /etc/amanda/openhab-dir /var/lib/amanda/openhab-dir/curinfo /var/lib/amanda/openhab-dir/index /var/log/amanda \033[39;49;00m'

$ chown --recursive backup:backup /var/backups/.amandahosts /etc/amanda/openhab-dir /var/lib/amanda/openhab-dir/curinfo /var/lib/amanda/openhab-dir/index /var/log/amanda
+ chown --recursive backup:backup /var/backups/.amandahosts /etc/amanda/openhab-dir /var/lib/amanda/openhab-dir/curinfo /var/lib/amanda/openhab-dir/index /var/log/amanda
+ return 0
+ [[ openhab-dir == \o\p\e\n\h\a\b\-\d\i\r ]]
+ cond_redirect chown --recursive backup:backup /mnt/ext-storage/amanda
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ chown --recursive backup:backup /mnt/ext-storage/amanda \033[39;49;00m'

$ chown --recursive backup:backup /mnt/ext-storage/amanda
+ chown --recursive backup:backup /mnt/ext-storage/amanda
+ return 0
+ cond_redirect chmod --recursive g+rxw /mnt/ext-storage/amanda
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ chmod --recursive g+rxw /mnt/ext-storage/amanda \033[39;49;00m'

$ chmod --recursive g+rxw /mnt/ext-storage/amanda
+ chmod --recursive g+rxw /mnt/ext-storage/amanda
+ return 0
+ cond_redirect sudo -u backup mkdir /mnt/ext-storage/amanda/slots
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ sudo -u backup mkdir /mnt/ext-storage/amanda/slots \033[39;49;00m'

$ sudo -u backup mkdir /mnt/ext-storage/amanda/slots
+ sudo -u backup mkdir /mnt/ext-storage/amanda/slots
+ return 0
+ cond_redirect chown --recursive backup:backup /mnt/ext-storage/amanda/slots
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ chown --recursive backup:backup /mnt/ext-storage/amanda/slots \033[39;49;00m'

$ chown --recursive backup:backup /mnt/ext-storage/amanda/slots
+ chown --recursive backup:backup /mnt/ext-storage/amanda/slots
+ return 0
+ cond_redirect ln -sf /mnt/ext-storage/amanda/slots /mnt/ext-storage/amanda/slots/drive0
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ ln -sf /mnt/ext-storage/amanda/slots /mnt/ext-storage/amanda/slots/drive0 \033[39;49;00m'

$ ln -sf /mnt/ext-storage/amanda/slots /mnt/ext-storage/amanda/slots/drive0
+ ln -sf /mnt/ext-storage/amanda/slots /mnt/ext-storage/amanda/slots/drive0
+ return 0
+ cond_redirect ln -sf /mnt/ext-storage/amanda/slots /mnt/ext-storage/amanda/slots/drive1
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ ln -sf /mnt/ext-storage/amanda/slots /mnt/ext-storage/amanda/slots/drive1 \033[39;49;00m'

$ ln -sf /mnt/ext-storage/amanda/slots /mnt/ext-storage/amanda/slots/drive1
+ ln -sf /mnt/ext-storage/amanda/slots /mnt/ext-storage/amanda/slots/drive1
+ return 0
+ tapeChanger='"chg-disk:/mnt/ext-storage/amanda/slots"    # The tape-changer glue script'
+ tapeType=DIRECTORY
+ sed -e 's|%CONFIGDIR|/etc/amanda/openhab-dir|g; s|%CONFIG|openhab-dir|g; s|%ADMINMAIL||g; s|%TAPESIZE|6000|g; s|%TAPETYPE|DIRECTORY|g; s|%TAPECHANGER|"chg-disk:/mnt/ext-storage/amanda/slots"    # The tape-changer glue script|g; s|%TAPES||g; s|%BACKUPUSER|backup|g' /opt/openhabian/includes/amanda/amanda.conf-template
+ [[ -z '' ]]
+ cond_redirect sed -i -e /mailto/d /etc/amanda/openhab-dir/amanda.conf
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ sed -i -e /mailto/d /etc/amanda/openhab-dir/amanda.conf \033[39;49;00m'

$ sed -i -e /mailto/d /etc/amanda/openhab-dir/amanda.conf
+ sed -i -e /mailto/d /etc/amanda/openhab-dir/amanda.conf
+ return 0
+ [[ openhab-dir = \o\p\e\n\h\a\b\-\A\W\S ]]
+ cond_redirect chmod 644 /etc/amanda/openhab-dir/amanda.conf
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ chmod 644 /etc/amanda/openhab-dir/amanda.conf \033[39;49;00m'

$ chmod 644 /etc/amanda/openhab-dir/amanda.conf
+ chmod 644 /etc/amanda/openhab-dir/amanda.conf
+ return 0
+ echo OK
OK
++ timestamp
++ printf '%(%F_%T_%Z)T\n' -1
+ echo -n '2022-11-22_08:07:34_CET [openHABian] Creating Amanda configuration... '
2022-11-22_08:07:34_CET [openHABian] Creating Amanda configuration... + [[ openhab-dir == \o\p\e\n\h\a\b\-\d\i\r ]]
+ cond_redirect rm -f /etc/amanda/openhab-dir/disklist
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ rm -f /etc/amanda/openhab-dir/disklist \033[39;49;00m'

$ rm -f /etc/amanda/openhab-dir/disklist
+ rm -f /etc/amanda/openhab-dir/disklist
+ return 0
+ [[ -n 1 ]]
+ whiptail --title 'Backup raw SD card' --defaultno --yes-button Yes --no-button No --yesno 'Do you want to create raw disk backups of your SD card?\n\nThis is only recommended if your SD card is 16GB or less, otherwise this can take too long.\n\nYou can change this at any time by editing:\n'\''/etc/amanda/openhab-dir/disklist'\''' 13 80
+ echo 'openhabian  /dev/mmcblk0                  comp-amraw'
+ echo 'openhabian  /boot                         comp-user-tar'
+ echo 'openhabian  /etc                          comp-user-tar'
+ [[ -d /var/lib/openhab ]]
+ echo 'openhabian  /var/lib/openhab              comp-user-tar'
+ [[ -d /var/lib/homegear ]]
+ [[ -d /opt/find3/server/main ]]
+ echo 'index_server "localhost"'
+ echo 'tapedev "changer"'
+ echo 'auth "local"'
+ cond_redirect chmod 644 /etc/amanda/openhab-dir/disklist /etc/amanda/openhab-dir/amanda-client.conf
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ chmod 644 /etc/amanda/openhab-dir/disklist /etc/amanda/openhab-dir/amanda-client.conf \033[39;49;00m'

$ chmod 644 /etc/amanda/openhab-dir/disklist /etc/amanda/openhab-dir/amanda-client.conf
+ chmod 644 /etc/amanda/openhab-dir/disklist /etc/amanda/openhab-dir/amanda-client.conf
+ return 0
+ echo OK
OK
++ timestamp
++ printf '%(%F_%T_%Z)T\n' -1
+ echo -n '2022-11-22_08:07:37_CET [openHABian] Preparing storage location... '
2022-11-22_08:07:37_CET [openHABian] Preparing storage location... + [[ -n 1 ]]
+ whiptail --title 'Storage container creation' --yes-button Continue --no-button Cancel --yesno 'We need to prepare ("label") your storage media.\n\nFor permanent storage such as USB or NAS mounted storage, as well as for cloud based storage, we will create  virtual containers.' 10 80
+ [[ '' -le 0 ]]
+ echo OK
OK
+ sed -e 's|%CONFIG|openhab-dir|g' /opt/openhabian/includes/amanda/amdump.service-template
+ sed -e 's|%CONFIG|openhab-dir|g' /opt/openhabian/includes/amanda/amdump.timer-template
+ cond_redirect chmod 644 /etc/systemd/system/amdump-openhab-dir.service /etc/systemd/system/amdump-openhab-dir.timer
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ chmod 644 /etc/systemd/system/amdump-openhab-dir.service /etc/systemd/system/amdump-openhab-dir.timer \033[39;49;00m'

$ chmod 644 /etc/systemd/system/amdump-openhab-dir.service /etc/systemd/system/amdump-openhab-dir.timer
+ chmod 644 /etc/systemd/system/amdump-openhab-dir.service /etc/systemd/system/amdump-openhab-dir.timer
+ return 0
+ cond_redirect systemctl -q daemon-reload
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ systemctl -q daemon-reload \033[39;49;00m'

$ systemctl -q daemon-reload
+ systemctl -q daemon-reload
+ return 0
+ cond_redirect systemctl enable --now amdump-openhab-dir.timer
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ systemctl enable --now amdump-openhab-dir.timer \033[39;49;00m'

$ systemctl enable --now amdump-openhab-dir.timer
+ systemctl enable --now amdump-openhab-dir.timer
+ return 0
+ [[ DIRECTORY == \D\I\R\E\C\T\O\R\Y ]]
+ cond_redirect mkdir -p /mnt/ext-storage/amanda/amanda-backups
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ mkdir -p /mnt/ext-storage/amanda/amanda-backups \033[39;49;00m'

$ mkdir -p /mnt/ext-storage/amanda/amanda-backups
+ mkdir -p /mnt/ext-storage/amanda/amanda-backups
+ return 0
+ cond_redirect chown --recursive backup:backup /mnt/ext-storage/amanda/amanda-backups
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ chown --recursive backup:backup /mnt/ext-storage/amanda/amanda-backups \033[39;49;00m'

$ chown --recursive backup:backup /mnt/ext-storage/amanda/amanda-backups
+ chown --recursive backup:backup /mnt/ext-storage/amanda/amanda-backups
+ return 0
+ sed -e 's|%STORAGE|/mnt/ext-storage/amanda|g' /opt/openhabian/includes/amanda/amandaBackupDB.service-template
+ cond_redirect chmod 644 /etc/systemd/system/amandaBackupDB.service
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ chmod 644 /etc/systemd/system/amandaBackupDB.service \033[39;49;00m'

$ chmod 644 /etc/systemd/system/amandaBackupDB.service
+ chmod 644 /etc/systemd/system/amandaBackupDB.service
+ return 0
+ install -m 644 /opt/openhabian/includes/amanda/amandaBackupDB.timer /etc/systemd/system
+ cond_redirect systemctl -q daemon-reload
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ systemctl -q daemon-reload \033[39;49;00m'

$ systemctl -q daemon-reload
+ systemctl -q daemon-reload
+ return 0
+ cond_redirect systemctl enable --now amandaBackupDB.timer
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ systemctl enable --now amandaBackupDB.timer \033[39;49;00m'

$ systemctl enable --now amandaBackupDB.timer
+ systemctl enable --now amandaBackupDB.timer
+ return 0
+ whiptail --title 'Amanda config setup successful' --msgbox 'Setup was successful.\n\nAmanda backup tool is now taking backups around 01:00. For further readings, start at http://wiki.zmanda.com/index.php/User_documentation.' 10 80
+ whiptail --title 'Backup using Amazon AWS' --yes-button Yes --no-button No --defaultno --yesno 'Would you like to setup a backup mechanism based on Amazon Web Services?\n\nYou can get 5 GB of S3 cloud storage for free on https://aws.amazon.com/. For hints see http://markelov.org/wiki/index.php?title=Backup_with_Amanda:_tape,_NAS,_Amazon_S3#Amazon_S3\nPlease setup your S3 bucket on Amazon Web Services NOW if you have not done so. Remember the name has to be unique in AWS namespace.' 14 90
+ '[' 0 -ne 0 ']'
+ true
+ show_main_menu
+ local choice
+ local version
+++ get_git_revision
+++ local branch
+++ local commitDate
+++ local shorthash
++++ git -C /opt/openhabian rev-parse --abbrev-ref HEAD
+++ branch=openHAB3
++++ git -C /opt/openhabian log --pretty=format:%aI -n 1
+++ commitDate=2022-11-09T11:29:28+01:00
++++ git -C /opt/openhabian log --pretty=format:%h -n 1
+++ shorthash=1b47639
+++ echo '[openHAB3]{2022-11-09T11:29:28+01:00}(1b47639)'
++ whiptail --title 'openHABian Configuration Tool — [openHAB3]{2022-11-09T11:29:28+01:00}(1b47639)' --menu 'Setup Options' 19 116 12 --cancel-button Exit --ok-button Execute '00 | About openHABian' 'Information about the openHABian project and this tool' '' '' '01 | Select Branch' 'Select the openHABian config tool version ("branch") to run' '02 | Upgrade System' 'Update all installed software packages (incl. openHAB) to their latest version' '03 | Install openHAB' 'Install or upgrade to openHAB 3' '04 | Import config' 'Import an openHAB 3 configuration from file or URL' '' '' '10 | Apply Improvements' 'Apply the latest improvements to the basic openHABian setup ►' '20 | Optional Components' 'Choose from a set of optional software components ►' '30 | System Settings' 'A range of system and hardware related configuration steps ►' '40 | openHAB Related' 'Switch the installed openHAB version or apply tweaks ►' '50 | Backup/Restore' 'Manage backups and restore your system ►'
+ choice=
+ RET=1
+ '[' 1 -eq 1 ']'
+ return 255
+ system_check_default_password
+ is_pi
+ is_pifour
+ [[ '' == \p\i\4 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]11[0-9a-fA-F]$' /proc/cpuinfo
+ return 0
+ return 0
+ local algo
+ local defaultPassword
+ local defaultUser
+ local generatedPassword
+ local introText
+ local originalPassword
+ local salt
+ is_pi
+ is_pifour
+ [[ '' == \p\i\4 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]11[0-9a-fA-F]$' /proc/cpuinfo
+ return 0
+ return 0
+ id -u pi
+ is_pi
+ is_pifour
+ [[ '' == \p\i\4 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]11[0-9a-fA-F]$' /proc/cpuinfo
+ return 0
+ return 0
+ defaultUser=openhabian
+ defaultPassword=openhabian
++ grep -w openhabian /etc/shadow
++ cut -d: -f2
+ originalPassword='$y$j9T$btUe4sx5mkNJT/T8HcCI2/$ZL4xKovVghFLNoWJf4ASXPlYUbkO/cifeFTGYS65g.B'
++ echo '$y$j9T$btUe4sx5mkNJT/T8HcCI2/$ZL4xKovVghFLNoWJf4ASXPlYUbkO/cifeFTGYS65g.B'
++ cut '-d$' -f2
+ algo=y
+ introText='The default password was detected on your system! That is a serious security concern. Bad guys or malicious programs in your subnet are able to gain root access!\n\nPlease set a strong password by typing the command '\''passwd openhabian'\''!'
++ echo '$y$j9T$btUe4sx5mkNJT/T8HcCI2/$ZL4xKovVghFLNoWJf4ASXPlYUbkO/cifeFTGYS65g.B'
++ cut '-d$' -f3
+ salt=j9T
+ export algo defaultPassword salt
++ perl -le 'print crypt("$ENV{defaultPassword}","\$$ENV{algo}\$$ENV{salt}\$")'
+ generatedPassword='$y$j9T$$1DJdHt2WNxWqFR3sUxwYKh.KdyI9MF4X/A9710MJGjA'
++ timestamp
++ printf '%(%F_%T_%Z)T\n' -1
+ echo -n '2022-11-22_08:07:56_CET [openHABian] Checking for default openHABian username:password combination... '
2022-11-22_08:07:56_CET [openHABian] Checking for default openHABian username:password combination... ++ id -u openhabian
+ [[ -n 1000 ]]
+ [[ $y$j9T$$1DJdHt2WNxWqFR3sUxwYKh.KdyI9MF4X/A9710MJGjA == \$\y\$\j\9\T\$\b\t\U\e\4\s\x\5\m\k\N\J\T\/\T\8\H\c\C\I\2\/\$\Z\L\4\x\K\o\v\V\g\h\F\L\N\o\W\J\f\4\A\S\X\P\l\Y\U\b\k\O\/\c\i\f\e\F\T\G\Y\S\6\5\g\.\B ]]
+ echo OK
OK
++ timestamp
++ printf '%(%F_%T_%Z)T\n' -1
+ echo -e '2022-11-22_08:07:56_CET [openHABian] We hope you got what you came for! See you again soon ;)'
2022-11-22_08:07:56_CET [openHABian] We hope you got what you came for! See you again soon ;)
+ cd /home/openhabian

Looks like a bug, I’ve put up a fix. Update openHABian on tool start (use main branch) and try again.

Thank a lot, with the bugfix amanda is running.

Hi Markus,

I have the same problem as described above. Amanda setup goes through completely without errors.
On “amcheck openhab-dir” I get the following.

[16:05:25] backup@HDsPi4:/$ amcheck openhab-dir
Amanda Tape Server Host Check

ERROR: directory ‘/opt/backup/slots’ does not exist
NOTE: storage ‘openhab-dir’: retentions-tapes (14) <= runspercycle (14)
Server check took 0.618 seconds
Amanda Backup Client Hosts Check

Client check: 1 host checked in 2.825 seconds. 0 problems found.
(brought to you by Amanda 3.5.1)

I did try also with the main branch, which didn’t change anything.

Any idea what else I could do wrong?

Pretty obvious, isn’t it ? Was it mounted when you ran Amanda setup ?
You can enable max logging and re-run Amanda setup to check if it creates that link or directory.

I want to use a mounted directory on my NAS. There the slots directory is created but somehow Amanda looks for it under /opt/backup and not on the mounted drive, which is accepted during setup

It looks for where you told it. As said, rerun setup with debug logging to see the setup process then you should be finding the mistake, too.

I did that, but I cannot see what goes wrong.
I don’t find my failure in the log. Please can you point me in the right direction?

Here is the log, I left out the part with the pwd…:


$ chpasswd
+ chpasswd
+ return 0
+ grep -qs '^[[:space:]]*backup:' /etc/group
+ cond_redirect usermod --append --groups backup openhabian
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ usermod --append --groups backup openhabian \033[39;49;00m'

$ usermod --append --groups backup openhabian
+ usermod --append --groups backup openhabian
+ return 0
+ cond_redirect usermod --append --groups backup backup
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ usermod --append --groups backup backup \033[39;49;00m'

$ usermod --append --groups backup backup
+ usermod --append --groups backup backup
+ return 0
+ cond_redirect chsh --shell /bin/bash backup
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ chsh --shell /bin/bash backup \033[39;49;00m'

$ chsh --shell /bin/bash backup
+ chsh --shell /bin/bash backup
+ return 0
+ echo OK
OK
+ amanda_is_installed
+ dpkg -s amanda-common amanda-server amanda-client
+ return 0
+ dpkg -s exim4
++ whiptail --title 'Reporting address' --inputbox '\nEnter a mail address to have Amanda send reports to:' 9 80 root@openhabian
+ adminMail=root@openhabian
+ whiptail --title 'Backup using locally attached storage' --yes-button Yes --no-button No --yesno 'Would you like to setup a backup mechanism based on locally attached or NAS mounted storage?' 8 80
+ config=openhab-dir
++ whiptail --title 'Storage directory' --inputbox '\nWhat is the directory backups should be stored in?\n\nYou can specify any locally accessible directory, no matter if it'\''s located on the internal SD card, an external USB-attached device such as a USB stick, HDD, or a NFS/CIFS share.' 13 80
+ storageLoc=/mnt/OH-BackUps
+ cond_redirect sudo -u backup touch /mnt/OH-BackUps/TEST
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ sudo -u backup touch /mnt/OH-BackUps/TEST \033[39;49;00m'

$ sudo -u backup touch /mnt/OH-BackUps/TEST
+ sudo -u backup touch /mnt/OH-BackUps/TEST
+ return 0
+ rm -f /mnt/OH-BackUps/TEST
+ tapes=15
++ whiptail --title 'Storage capacity' --inputbox '\nHow much storage do you want to dedicate to your backup in megabytes?\n\nRecommendation: 2-3 times the amount of data to be backed up.' 11 80
+ tapeSize=100000
+ (( tapeSize/=tapes ))
+ create_amanda_config openhab-dir backup root@openhabian 15 6666 /mnt/OH-BackUps
+ local adminMail
+ local amandaHosts=/var/backups/.amandahosts
+ local amandaSecurityConf=/etc/amanda-security.conf
+ local amandaIncludesDir=/opt/openhabian/includes/amanda
+ local awsAccessKey
+ local awsBucket
+ local awsSecretKey
+ local awsSite
+ local backupUser
+ local config
+ local configDir
+ local databaseDir
+ local dumpType=comp-user-tar
+ local indexDir
+ local logDir
+ local serviceTargetDir=/etc/systemd/system
+ local storageLoc
+ local storageText
+ local tapeChanger
+ local tapes
+ local tapeSize
+ local tapeType
+ config=openhab-dir
+ backupUser=backup
+ adminMail=root@openhabian
+ tapes=15
+ tapeSize=6666
+ storageLoc=/mnt/OH-BackUps
+ awsSite=
+ awsBucket=
+ awsAccessKey=
+ awsSecretKey=
+ configDir=/etc/amanda/openhab-dir
+ databaseDir=/var/lib/amanda/openhab-dir/curinfo
+ indexDir=/var/lib/amanda/openhab-dir/index
+ logDir=/var/log/amanda/openhab-dir
+ storageText='We need to prepare ("label") your storage media.\n\nFor permanent storage such as USB or NAS mounted storage, as well as for cloud based storage, we will create 15 virtual containers.'
++ timestamp
++ printf '%(%F_%T_%Z)T\n' -1
+ echo -n '2022-12-14_17:07:10_CET [openHABian] Creating Amanda filesystem... '
2022-12-14_17:07:10_CET [openHABian] Creating Amanda filesystem... + cond_redirect mkdir -p /etc/amanda/openhab-dir /var/lib/amanda/openhab-dir/curinfo /var/log/amanda/openhab-dir /var/lib/amanda/openhab-dir/index
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ mkdir -p /etc/amanda/openhab-dir /var/lib/amanda/openhab-dir/curinfo /var/log/amanda/openhab-dir /var/lib/amanda/openhab-dir/index \033[39;49;00m'

$ mkdir -p /etc/amanda/openhab-dir /var/lib/amanda/openhab-dir/curinfo /var/log/amanda/openhab-dir /var/lib/amanda/openhab-dir/index
+ mkdir -p /etc/amanda/openhab-dir /var/lib/amanda/openhab-dir/curinfo /var/log/amanda/openhab-dir /var/lib/amanda/openhab-dir/index
+ return 0
+ cond_redirect touch /etc/amanda/openhab-dir/tapelist
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ touch /etc/amanda/openhab-dir/tapelist \033[39;49;00m'

$ touch /etc/amanda/openhab-dir/tapelist
+ touch /etc/amanda/openhab-dir/tapelist
+ return 0
++ dig +short HDsPi4
+ ip=
++ host ''
++ cut '-d ' -f1
host: '' is not in legal name syntax (unexpected end of input)
+ revip=
+ [[ -n '' ]]
+ echo -e 'openhabian backup amdump\nopenhabian root amindexd amidxtaped\nlocalhost backup\nlocalhost root amindexd amidxtaped'
+ is_aarch64
+ [[ '' == \a\a\r\c\h\6\4 ]]
+ [[ '' == \a\r\m\6\4 ]]
+ case "$(uname -m)" in
++ uname -m
+ return 1
+ GNUTAR=/usr/bin/tar
+ echo -e 'amgtar:gnutar_path=/usr/bin/tar\n'
+ cond_redirect chown --recursive backup:backup /var/backups/.amandahosts /etc/amanda/openhab-dir /var/lib/amanda/openhab-dir/curinfo /var/lib/amanda/openhab-dir/index /var/log/amanda
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ chown --recursive backup:backup /var/backups/.amandahosts /etc/amanda/openhab-dir /var/lib/amanda/openhab-dir/curinfo /var/lib/amanda/openhab-dir/index /var/log/amanda \033[39;49;00m'

$ chown --recursive backup:backup /var/backups/.amandahosts /etc/amanda/openhab-dir /var/lib/amanda/openhab-dir/curinfo /var/lib/amanda/openhab-dir/index /var/log/amanda
+ chown --recursive backup:backup /var/backups/.amandahosts /etc/amanda/openhab-dir /var/lib/amanda/openhab-dir/curinfo /var/lib/amanda/openhab-dir/index /var/log/amanda
+ return 0
+ [[ openhab-dir == \o\p\e\n\h\a\b\-\d\i\r ]]
+ cond_redirect chown --recursive backup:backup /mnt/OH-BackUps
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ chown --recursive backup:backup /mnt/OH-BackUps \033[39;49;00m'

$ chown --recursive backup:backup /mnt/OH-BackUps
+ chown --recursive backup:backup /mnt/OH-BackUps
+ return 0
+ cond_redirect chmod --recursive g+rxw /mnt/OH-BackUps
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ chmod --recursive g+rxw /mnt/OH-BackUps \033[39;49;00m'

$ chmod --recursive g+rxw /mnt/OH-BackUps
+ chmod --recursive g+rxw /mnt/OH-BackUps
+ return 0
+ cond_redirect sudo -u backup mkdir /mnt/OH-BackUps/slots
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ sudo -u backup mkdir /mnt/OH-BackUps/slots \033[39;49;00m'

$ sudo -u backup mkdir /mnt/OH-BackUps/slots
+ sudo -u backup mkdir /mnt/OH-BackUps/slots
+ return 0
+ cond_redirect chown --recursive backup:backup /mnt/OH-BackUps/slots
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ chown --recursive backup:backup /mnt/OH-BackUps/slots \033[39;49;00m'

$ chown --recursive backup:backup /mnt/OH-BackUps/slots
+ chown --recursive backup:backup /mnt/OH-BackUps/slots
+ return 0
+ cond_redirect ln -sf /mnt/OH-BackUps/slots /mnt/OH-BackUps/slots/drive0
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ ln -sf /mnt/OH-BackUps/slots /mnt/OH-BackUps/slots/drive0 \033[39;49;00m'

$ ln -sf /mnt/OH-BackUps/slots /mnt/OH-BackUps/slots/drive0
+ ln -sf /mnt/OH-BackUps/slots /mnt/OH-BackUps/slots/drive0
+ return 0
+ cond_redirect ln -sf /mnt/OH-BackUps/slots /mnt/OH-BackUps/slots/drive1
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ ln -sf /mnt/OH-BackUps/slots /mnt/OH-BackUps/slots/drive1 \033[39;49;00m'

$ ln -sf /mnt/OH-BackUps/slots /mnt/OH-BackUps/slots/drive1
+ ln -sf /mnt/OH-BackUps/slots /mnt/OH-BackUps/slots/drive1
+ return 0
+ tapeChanger='"chg-disk:/mnt/OH-BackUps/slots"    # The tape-changer glue script'
+ tapeType=DIRECTORY
+ sed -e 's|%CONFIGDIR|/etc/amanda/openhab-dir|g; s|%CONFIG|openhab-dir|g; s|%ADMINMAIL|root@openhabian|g; s|%TAPESIZE|6666|g; s|%TAPETYPE|DIRECTORY|g; s|%TAPECHANGER|"chg-disk:/mnt/OH-BackUps/slots"    # The tape-changer glue script|g; s|%TAPES|15|g; s|%BACKUPUSER|backup|g' /opt/openhabian/includes/amanda/amanda.conf-template
+ [[ -z root@openhabian ]]
+ [[ openhab-dir = \o\p\e\n\h\a\b\-\A\W\S ]]
+ cond_redirect chmod 644 /etc/amanda/openhab-dir/amanda.conf
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ chmod 644 /etc/amanda/openhab-dir/amanda.conf \033[39;49;00m'

$ chmod 644 /etc/amanda/openhab-dir/amanda.conf
+ chmod 644 /etc/amanda/openhab-dir/amanda.conf
+ return 0
+ echo OK
OK
++ timestamp
++ printf '%(%F_%T_%Z)T\n' -1
+ echo -n '2022-12-14_17:07:10_CET [openHABian] Creating Amanda configuration... '
2022-12-14_17:07:10_CET [openHABian] Creating Amanda configuration... + [[ openhab-dir == \o\p\e\n\h\a\b\-\d\i\r ]]
+ cond_redirect rm -f /etc/amanda/openhab-dir/disklist
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ rm -f /etc/amanda/openhab-dir/disklist \033[39;49;00m'

$ rm -f /etc/amanda/openhab-dir/disklist
+ rm -f /etc/amanda/openhab-dir/disklist
+ return 0
+ [[ -n 1 ]]
+ whiptail --title 'Backup raw SD card' --defaultno --yes-button Yes --no-button No --yesno 'Do you want to create raw disk backups of your SD card?\n\nThis is only recommended if your SD card is 16GB or less, otherwise this can take too long.\n\nYou can change this at any time by editing:\n'\''/etc/amanda/openhab-dir/disklist'\''' 13 80
+ echo 'openhabian  /boot                         comp-user-tar'
+ echo 'openhabian  /etc                          comp-user-tar'
+ [[ -d /var/lib/openhab ]]
+ echo 'openhabian  /var/lib/openhab              comp-user-tar'
+ [[ -d /var/lib/homegear ]]
+ [[ -d /opt/find3/server/main ]]
+ echo 'index_server "localhost"'
+ echo 'tapedev "changer"'
+ echo 'auth "local"'
+ cond_redirect chmod 644 /etc/amanda/openhab-dir/disklist /etc/amanda/openhab-dir/amanda-client.conf
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ chmod 644 /etc/amanda/openhab-dir/disklist /etc/amanda/openhab-dir/amanda-client.conf \033[39;49;00m'

$ chmod 644 /etc/amanda/openhab-dir/disklist /etc/amanda/openhab-dir/amanda-client.conf
+ chmod 644 /etc/amanda/openhab-dir/disklist /etc/amanda/openhab-dir/amanda-client.conf
+ return 0
+ echo OK
OK
++ timestamp
++ printf '%(%F_%T_%Z)T\n' -1
+ echo -n '2022-12-14_17:07:13_CET [openHABian] Preparing storage location... '
2022-12-14_17:07:13_CET [openHABian] Preparing storage location... + [[ -n 1 ]]
+ whiptail --title 'Storage container creation' --yes-button Continue --no-button Cancel --yesno 'We need to prepare ("label") your storage media.\n\nFor permanent storage such as USB or NAS mounted storage, as well as for cloud based storage, we will create 15 virtual containers.' 10 80
+ [[ 15 -le 0 ]]
+ [[ openhab-dir == \o\p\e\n\h\a\b\-\d\i\r ]]
+ cond_redirect mkdir -p /mnt/OH-BackUps/slots/slot15
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ mkdir -p /mnt/OH-BackUps/slots/slot15 \033[39;49;00m'

$ mkdir -p /mnt/OH-BackUps/slots/slot15
+ mkdir -p /mnt/OH-BackUps/slots/slot15
+ return 0
+ cond_redirect chown --recursive backup:backup /mnt/OH-BackUps/slots/slot15
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ chown --recursive backup:backup /mnt/OH-BackUps/slots/slot15 \033[39;49;00m'

$ chown --recursive backup:backup /mnt/OH-BackUps/slots/slot15
+ chown --recursive backup:backup /mnt/OH-BackUps/slots/slot15
+ return 0
+ (( tapes-=1 ))
+ [[ 14 -le 0 ]]
+ [[ openhab-dir == \o\p\e\n\h\a\b\-\d\i\r ]]
+ cond_redirect mkdir -p /mnt/OH-BackUps/slots/slot14
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ mkdir -p /mnt/OH-BackUps/slots/slot14 \033[39;49;00m'

$ mkdir -p /mnt/OH-BackUps/slots/slot14
+ mkdir -p /mnt/OH-BackUps/slots/slot14
+ return 0
+ cond_redirect chown --recursive backup:backup /mnt/OH-BackUps/slots/slot14
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ chown --recursive backup:backup /mnt/OH-BackUps/slots/slot14 \033[39;49;00m'

$ chown --recursive backup:backup /mnt/OH-BackUps/slots/slot14
+ chown --recursive backup:backup /mnt/OH-BackUps/slots/slot14
+ return 0
+ (( tapes-=1 ))
+ [[ 13 -le 0 ]]
+ [[ openhab-dir == \o\p\e\n\h\a\b\-\d\i\r ]]
+ cond_redirect mkdir -p /mnt/OH-BackUps/slots/slot13
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ mkdir -p /mnt/OH-BackUps/slots/slot13 \033[39;49;00m'

$ mkdir -p /mnt/OH-BackUps/slots/slot13
+ mkdir -p /mnt/OH-BackUps/slots/slot13
+ return 0
+ cond_redirect chown --recursive backup:backup /mnt/OH-BackUps/slots/slot13
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ chown --recursive backup:backup /mnt/OH-BackUps/slots/slot13 \033[39;49;00m'

$ chown --recursive backup:backup /mnt/OH-BackUps/slots/slot13
+ chown --recursive backup:backup /mnt/OH-BackUps/slots/slot13
+ return 0
+ (( tapes-=1 ))
+ [[ 12 -le 0 ]]
+ [[ openhab-dir == \o\p\e\n\h\a\b\-\d\i\r ]]
+ cond_redirect mkdir -p /mnt/OH-BackUps/slots/slot12
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ mkdir -p /mnt/OH-BackUps/slots/slot12 \033[39;49;00m'

$ mkdir -p /mnt/OH-BackUps/slots/slot12
+ mkdir -p /mnt/OH-BackUps/slots/slot12
+ return 0
+ cond_redirect chown --recursive backup:backup /mnt/OH-BackUps/slots/slot12
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ chown --recursive backup:backup /mnt/OH-BackUps/slots/slot12 \033[39;49;00m'

$ chown --recursive backup:backup /mnt/OH-BackUps/slots/slot12
+ chown --recursive backup:backup /mnt/OH-BackUps/slots/slot12
+ return 0
+ (( tapes-=1 ))
+ [[ 11 -le 0 ]]
+ [[ openhab-dir == \o\p\e\n\h\a\b\-\d\i\r ]]
+ cond_redirect mkdir -p /mnt/OH-BackUps/slots/slot11
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ mkdir -p /mnt/OH-BackUps/slots/slot11 \033[39;49;00m'

$ mkdir -p /mnt/OH-BackUps/slots/slot11
+ mkdir -p /mnt/OH-BackUps/slots/slot11
+ return 0
+ cond_redirect chown --recursive backup:backup /mnt/OH-BackUps/slots/slot11
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ chown --recursive backup:backup /mnt/OH-BackUps/slots/slot11 \033[39;49;00m'

$ chown --recursive backup:backup /mnt/OH-BackUps/slots/slot11
+ chown --recursive backup:backup /mnt/OH-BackUps/slots/slot11
+ return 0
+ (( tapes-=1 ))
+ [[ 10 -le 0 ]]
+ [[ openhab-dir == \o\p\e\n\h\a\b\-\d\i\r ]]
+ cond_redirect mkdir -p /mnt/OH-BackUps/slots/slot10
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ mkdir -p /mnt/OH-BackUps/slots/slot10 \033[39;49;00m'

$ mkdir -p /mnt/OH-BackUps/slots/slot10
+ mkdir -p /mnt/OH-BackUps/slots/slot10
+ return 0
+ cond_redirect chown --recursive backup:backup /mnt/OH-BackUps/slots/slot10
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ chown --recursive backup:backup /mnt/OH-BackUps/slots/slot10 \033[39;49;00m'

$ chown --recursive backup:backup /mnt/OH-BackUps/slots/slot10
+ chown --recursive backup:backup /mnt/OH-BackUps/slots/slot10
+ return 0
+ (( tapes-=1 ))
+ [[ 9 -le 0 ]]
+ [[ openhab-dir == \o\p\e\n\h\a\b\-\d\i\r ]]
+ cond_redirect mkdir -p /mnt/OH-BackUps/slots/slot9
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ mkdir -p /mnt/OH-BackUps/slots/slot9 \033[39;49;00m'

$ mkdir -p /mnt/OH-BackUps/slots/slot9
+ mkdir -p /mnt/OH-BackUps/slots/slot9
+ return 0
+ cond_redirect chown --recursive backup:backup /mnt/OH-BackUps/slots/slot9
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ chown --recursive backup:backup /mnt/OH-BackUps/slots/slot9 \033[39;49;00m'

$ chown --recursive backup:backup /mnt/OH-BackUps/slots/slot9
+ chown --recursive backup:backup /mnt/OH-BackUps/slots/slot9
+ return 0
+ (( tapes-=1 ))
+ [[ 8 -le 0 ]]
+ [[ openhab-dir == \o\p\e\n\h\a\b\-\d\i\r ]]
+ cond_redirect mkdir -p /mnt/OH-BackUps/slots/slot8
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ mkdir -p /mnt/OH-BackUps/slots/slot8 \033[39;49;00m'

$ mkdir -p /mnt/OH-BackUps/slots/slot8
+ mkdir -p /mnt/OH-BackUps/slots/slot8
+ return 0
+ cond_redirect chown --recursive backup:backup /mnt/OH-BackUps/slots/slot8
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ chown --recursive backup:backup /mnt/OH-BackUps/slots/slot8 \033[39;49;00m'

$ chown --recursive backup:backup /mnt/OH-BackUps/slots/slot8
+ chown --recursive backup:backup /mnt/OH-BackUps/slots/slot8
+ return 0
+ (( tapes-=1 ))
+ [[ 7 -le 0 ]]
+ [[ openhab-dir == \o\p\e\n\h\a\b\-\d\i\r ]]
+ cond_redirect mkdir -p /mnt/OH-BackUps/slots/slot7
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ mkdir -p /mnt/OH-BackUps/slots/slot7 \033[39;49;00m'

$ mkdir -p /mnt/OH-BackUps/slots/slot7
+ mkdir -p /mnt/OH-BackUps/slots/slot7
+ return 0
+ cond_redirect chown --recursive backup:backup /mnt/OH-BackUps/slots/slot7
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ chown --recursive backup:backup /mnt/OH-BackUps/slots/slot7 \033[39;49;00m'

$ chown --recursive backup:backup /mnt/OH-BackUps/slots/slot7
+ chown --recursive backup:backup /mnt/OH-BackUps/slots/slot7
+ return 0
+ (( tapes-=1 ))
+ [[ 6 -le 0 ]]
+ [[ openhab-dir == \o\p\e\n\h\a\b\-\d\i\r ]]
+ cond_redirect mkdir -p /mnt/OH-BackUps/slots/slot6
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ mkdir -p /mnt/OH-BackUps/slots/slot6 \033[39;49;00m'

$ mkdir -p /mnt/OH-BackUps/slots/slot6
+ mkdir -p /mnt/OH-BackUps/slots/slot6
+ return 0
+ cond_redirect chown --recursive backup:backup /mnt/OH-BackUps/slots/slot6
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ chown --recursive backup:backup /mnt/OH-BackUps/slots/slot6 \033[39;49;00m'

$ chown --recursive backup:backup /mnt/OH-BackUps/slots/slot6
+ chown --recursive backup:backup /mnt/OH-BackUps/slots/slot6
+ return 0
+ (( tapes-=1 ))
+ [[ 5 -le 0 ]]
+ [[ openhab-dir == \o\p\e\n\h\a\b\-\d\i\r ]]
+ cond_redirect mkdir -p /mnt/OH-BackUps/slots/slot5
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ mkdir -p /mnt/OH-BackUps/slots/slot5 \033[39;49;00m'

$ mkdir -p /mnt/OH-BackUps/slots/slot5
+ mkdir -p /mnt/OH-BackUps/slots/slot5
+ return 0
+ cond_redirect chown --recursive backup:backup /mnt/OH-BackUps/slots/slot5
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ chown --recursive backup:backup /mnt/OH-BackUps/slots/slot5 \033[39;49;00m'

$ chown --recursive backup:backup /mnt/OH-BackUps/slots/slot5
+ chown --recursive backup:backup /mnt/OH-BackUps/slots/slot5
+ return 0
+ (( tapes-=1 ))
+ [[ 4 -le 0 ]]
+ [[ openhab-dir == \o\p\e\n\h\a\b\-\d\i\r ]]
+ cond_redirect mkdir -p /mnt/OH-BackUps/slots/slot4
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ mkdir -p /mnt/OH-BackUps/slots/slot4 \033[39;49;00m'

$ mkdir -p /mnt/OH-BackUps/slots/slot4
+ mkdir -p /mnt/OH-BackUps/slots/slot4
+ return 0
+ cond_redirect chown --recursive backup:backup /mnt/OH-BackUps/slots/slot4
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ chown --recursive backup:backup /mnt/OH-BackUps/slots/slot4 \033[39;49;00m'

$ chown --recursive backup:backup /mnt/OH-BackUps/slots/slot4
+ chown --recursive backup:backup /mnt/OH-BackUps/slots/slot4
+ return 0
+ (( tapes-=1 ))
+ [[ 3 -le 0 ]]
+ [[ openhab-dir == \o\p\e\n\h\a\b\-\d\i\r ]]
+ cond_redirect mkdir -p /mnt/OH-BackUps/slots/slot3
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ mkdir -p /mnt/OH-BackUps/slots/slot3 \033[39;49;00m'

$ mkdir -p /mnt/OH-BackUps/slots/slot3
+ mkdir -p /mnt/OH-BackUps/slots/slot3
+ return 0
+ cond_redirect chown --recursive backup:backup /mnt/OH-BackUps/slots/slot3
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ chown --recursive backup:backup /mnt/OH-BackUps/slots/slot3 \033[39;49;00m'

$ chown --recursive backup:backup /mnt/OH-BackUps/slots/slot3
+ chown --recursive backup:backup /mnt/OH-BackUps/slots/slot3
+ return 0
+ (( tapes-=1 ))
+ [[ 2 -le 0 ]]
+ [[ openhab-dir == \o\p\e\n\h\a\b\-\d\i\r ]]
+ cond_redirect mkdir -p /mnt/OH-BackUps/slots/slot2
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ mkdir -p /mnt/OH-BackUps/slots/slot2 \033[39;49;00m'

$ mkdir -p /mnt/OH-BackUps/slots/slot2
+ mkdir -p /mnt/OH-BackUps/slots/slot2
+ return 0
+ cond_redirect chown --recursive backup:backup /mnt/OH-BackUps/slots/slot2
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ chown --recursive backup:backup /mnt/OH-BackUps/slots/slot2 \033[39;49;00m'

$ chown --recursive backup:backup /mnt/OH-BackUps/slots/slot2
+ chown --recursive backup:backup /mnt/OH-BackUps/slots/slot2
+ return 0
+ (( tapes-=1 ))
+ [[ 1 -le 0 ]]
+ [[ openhab-dir == \o\p\e\n\h\a\b\-\d\i\r ]]
+ cond_redirect mkdir -p /mnt/OH-BackUps/slots/slot1
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ mkdir -p /mnt/OH-BackUps/slots/slot1 \033[39;49;00m'

$ mkdir -p /mnt/OH-BackUps/slots/slot1
+ mkdir -p /mnt/OH-BackUps/slots/slot1
+ return 0
+ cond_redirect chown --recursive backup:backup /mnt/OH-BackUps/slots/slot1
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ chown --recursive backup:backup /mnt/OH-BackUps/slots/slot1 \033[39;49;00m'

$ chown --recursive backup:backup /mnt/OH-BackUps/slots/slot1
+ chown --recursive backup:backup /mnt/OH-BackUps/slots/slot1
+ return 0
+ (( tapes-=1 ))
+ [[ 0 -le 0 ]]
+ echo OK
OK
+ sed -e 's|%CONFIG|openhab-dir|g' /opt/openhabian/includes/amanda/amdump.service-template
+ sed -e 's|%CONFIG|openhab-dir|g' /opt/openhabian/includes/amanda/amdump.timer-template
+ cond_redirect chmod 644 /etc/systemd/system/amdump-openhab-dir.service /etc/systemd/system/amdump-openhab-dir.timer
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ chmod 644 /etc/systemd/system/amdump-openhab-dir.service /etc/systemd/system/amdump-openhab-dir.timer \033[39;49;00m'

$ chmod 644 /etc/systemd/system/amdump-openhab-dir.service /etc/systemd/system/amdump-openhab-dir.timer
+ chmod 644 /etc/systemd/system/amdump-openhab-dir.service /etc/systemd/system/amdump-openhab-dir.timer
+ return 0
+ cond_redirect systemctl -q daemon-reload
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ systemctl -q daemon-reload \033[39;49;00m'

$ systemctl -q daemon-reload
+ systemctl -q daemon-reload
+ return 0
+ cond_redirect systemctl enable --now amdump-openhab-dir.timer
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ systemctl enable --now amdump-openhab-dir.timer \033[39;49;00m'

$ systemctl enable --now amdump-openhab-dir.timer
+ systemctl enable --now amdump-openhab-dir.timer
+ return 0
+ [[ DIRECTORY == \D\I\R\E\C\T\O\R\Y ]]
+ cond_redirect mkdir -p /mnt/OH-BackUps/amanda-backups
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ mkdir -p /mnt/OH-BackUps/amanda-backups \033[39;49;00m'

$ mkdir -p /mnt/OH-BackUps/amanda-backups
+ mkdir -p /mnt/OH-BackUps/amanda-backups
+ return 0
+ cond_redirect chown --recursive backup:backup /mnt/OH-BackUps/amanda-backups
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ chown --recursive backup:backup /mnt/OH-BackUps/amanda-backups \033[39;49;00m'

$ chown --recursive backup:backup /mnt/OH-BackUps/amanda-backups
+ chown --recursive backup:backup /mnt/OH-BackUps/amanda-backups
+ return 0
+ sed -e 's|%STORAGE|/mnt/OH-BackUps|g' /opt/openhabian/includes/amanda/amandaBackupDB.service-template
+ cond_redirect chmod 644 /etc/systemd/system/amandaBackupDB.service
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ chmod 644 /etc/systemd/system/amandaBackupDB.service \033[39;49;00m'

$ chmod 644 /etc/systemd/system/amandaBackupDB.service
+ chmod 644 /etc/systemd/system/amandaBackupDB.service
+ return 0
+ install -m 644 /opt/openhabian/includes/amanda/amandaBackupDB.timer /etc/systemd/system
+ cond_redirect systemctl -q daemon-reload
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ systemctl -q daemon-reload \033[39;49;00m'

$ systemctl -q daemon-reload
+ systemctl -q daemon-reload
+ return 0
+ cond_redirect systemctl enable --now amandaBackupDB.timer
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ systemctl enable --now amandaBackupDB.timer \033[39;49;00m'

$ systemctl enable --now amandaBackupDB.timer
+ systemctl enable --now amandaBackupDB.timer
+ return 0
+ whiptail --title 'Amanda config setup successful' --msgbox 'Setup was successful.\n\nAmanda backup tool is now taking backups around 01:00. For further readings, start at http://wiki.zmanda.com/index.php/User_documentation.' 10 80
+ whiptail --title 'Backup using Amazon AWS' --yes-button Yes --no-button No --defaultno --yesno 'Would you like to setup a backup mechanism based on Amazon Web Services?\n\nYou can get 5 GB of S3 cloud storage for free on https://aws.amazon.com/. For hints see http://markelov.org/wiki/index.php?title=Backup_with_Amanda:_tape,_NAS,_Amazon_S3#Amazon_S3\nPlease setup your S3 bucket on Amazon Web Services NOW if you have not done so. Remember the name has to be unique in AWS namespace.' 14 90
+ '[' 0 -ne 0 ']'
+ true
+ show_main_menu
+ local choice
+ local version
+++ get_git_revision
+++ local branch
+++ local commitDate
+++ local shorthash
++++ git -C /opt/openhabian rev-parse --abbrev-ref HEAD
+++ branch=main
++++ git -C /opt/openhabian log --pretty=format:%aI -n 1
+++ commitDate=2022-12-02T00:45:56+01:00
++++ git -C /opt/openhabian log --pretty=format:%h -n 1
+++ shorthash=f904246
+++ echo '[main]{2022-12-02T00:45:56+01:00}(f904246)'
++ whiptail --title 'openHABian Configuration Tool — [main]{2022-12-02T00:45:56+01:00}(f904246)' --menu 'Setup Options' 19 116 12 --cancel-button Exit --ok-button Execute '00 | About openHABian' 'Information about the openHABian project and this tool' '' '' '01 | Select Branch' 'Select the openHABian config tool version ("branch") to run' '02 | Upgrade System' 'Update all installed software packages (incl. openHAB) to their latest version' '03 | Install openHAB' 'Install or upgrade to openHAB 3' '04 | Import config' 'Import an openHAB 3 configuration from file or URL' '' '' '10 | Apply Improvements' 'Apply the latest improvements to the basic openHABian setup ►' '20 | Optional Components' 'Choose from a set of optional software components ►' '30 | System Settings' 'A range of system and hardware related configuration steps ►' '40 | openHAB Related' 'Switch the installed openHAB version or apply tweaks ►' '50 | Backup/Restore' 'Manage backups and restore your system ►'
+ choice=
+ RET=1
+ '[' 1 -eq 1 ']'
+ return 255
+ system_check_default_password
+ is_pi
+ is_pifour
+ [[ '' == \p\i\4 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]11[0-9a-fA-F]$' /proc/cpuinfo
+ return 0
+ return 0
+ local algo
+ local defaultPassword
+ local defaultUser
+ local generatedPassword
+ local introText
+ local originalPassword
+ local salt
+ is_pi
+ is_pifour
+ [[ '' == \p\i\4 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]11[0-9a-fA-F]$' /proc/cpuinfo
+ return 0
+ return 0
+ id -u pi
+ is_pi
+ is_pifour
+ [[ '' == \p\i\4 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]11[0-9a-fA-F]$' /proc/cpuinfo
+ return 0
+ return 0
+ defaultUser=openhabian
+ defaultPassword=openhabian
++ grep -w openhabian /etc/shadow
++ cut -d: -f2
+ originalPassword='$y$j9T$2tnx5Dxnx3hEX3xBpygPI/$0KSPUgb3EeciSUslszs2sPi4TQxn.hV8jUuaUcpFw9C'
++ echo '$y$j9T$2tnx5Dxnx3hEX3xBpygPI/$0KSPUgb3EeciSUslszs2sPi4TQxn.hV8jUuaUcpFw9C'
++ cut '-d$' -f2
+ algo=y
+ introText='The default password was detected on your system! That is a serious security concern. Bad guys or malicious programs in your subnet are able to gain root access!\n\nPlease set a strong password by typing the command '\''passwd openhabian'\''!'
++ echo '$y$j9T$2tnx5Dxnx3hEX3xBpygPI/$0KSPUgb3EeciSUslszs2sPi4TQxn.hV8jUuaUcpFw9C'
++ cut '-d$' -f3
+ salt=j9T
+ export algo defaultPassword salt
++ perl -le 'print crypt("$ENV{defaultPassword}","\$$ENV{algo}\$$ENV{salt}\$")'
+ generatedPassword='$y$j9T$$1DJdHt2WNxWqFR3sUxwYKh.KdyI9MF4X/A9710MJGjA'
++ timestamp
++ printf '%(%F_%T_%Z)T\n' -1
+ echo -n '2022-12-14_17:07:32_CET [openHABian] Checking for default openHABian username:password combination... '
2022-12-14_17:07:32_CET [openHABian] Checking for default openHABian username:password combination... ++ id -u openhabian
+ [[ -n 1000 ]]
+ [[ $y$j9T$$1DJdHt2WNxWqFR3sUxwYKh.KdyI9MF4X/A9710MJGjA == \$\y\$\j\9\T\$\2\t\n\x\5\D\x\n\x\3\h\E\X\3\x\B\p\y\g\P\I\/\$\0\K\S\P\U\g\b\3\E\e\c\i\S\U\s\l\s\z\s\2\s\P\i\4\T\Q\x\n\.\h\V\8\j\U\u\a\U\c\p\F\w\9\C ]]
+ echo OK
OK
++ timestamp
++ printf '%(%F_%T_%Z)T\n' -1
+ echo -e '2022-12-14_17:07:32_CET [openHABian] We hope you got what you came for! See you again soon ;)'
2022-12-14_17:07:32_CET [openHABian] We hope you got what you came for! See you again soon ;)
+ cd /mnt/OH-BackUps

I found myself what is the cause of the failure. I wanted to do a desaster recovery. The only files I have are "amanda_data_xxxx…tar.gz files. I followed the steps as described by Senna600 at the theme “Amanda, restore after disaster” here in this community. The failure happens after I extract the file as described there at the very end. Oviously that procedure doesn’t work for me.
I also tried to copy one of the backup-files into the Slot1 directory but that does not work either, amcheck keeps telling me that slot1 is empty.

So hopefully someone can guide me to fix this as my system crashed totally and the only things I have are the amanda.tar.gz files.

amanda_data* are backups of the Amanda database, not the backup themselves.
You can extract them in / on a fresh install then , but if you don’t have the backup files that’ll not be of much use.
For standard restoration procedure read the Amanda docs.

Vielen Dank Markus! Thank you so much for your answers!
As I am not a nerd but also not a Linux total beginner, I learned a lot addionally, with beeing forced now to spend two days of learning and reading about all the backup stuff.
6 months ago I did set up Amanda, but obviously something went wrong and I didn’t recognize it. As I did see, that every night a file was written to my 128 GB SD card for the backup, I thought it is ok. Unfortunately Amanda did not write the Slots, so my “backup” now is useless… Yes I know I should have testet to make a recovery, which I didn’t due to time constraints. I only have a SD copy, but this is too old to be really helpful…
Now I have to make a complete new setup with OH 3.3. It is maybe also good for some part. After upgrading from OH 2.5, wich worked out fine, I had many not needed “left overs” from my early (learning) days with OH… Now I’ll start on a plain green field with all the gained knowledge. Thanks again.