I’m struggling with AMANDA setup from openHABian. I’m trying to use Amazon AWS and it crashes when it tries to make the virtual containers. See log below. I can’t find any information on amlabel, so I don’t know how to debug. Please point me in the right direction.
Thanks,
Marty
+ [[ 15 -le 0 ]]
+ [[ openhab-AWS == \o\p\e\n\h\a\b\-\d\i\r ]]
+ [[ openhab-AWS == \o\p\e\n\h\a\b\-\A\W\S ]]
+ cond_redirect su - backup -c 'amlabel openhab-AWS openhab-AWS-15 slot 15'
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ su - backup -c amlabel openhab-AWS openhab-AWS-15 slot 15 \033[39;49;00m'
$ su - backup -c amlabel openhab-AWS openhab-AWS-15 slot 15
+ su - backup -c 'amlabel openhab-AWS openhab-AWS-15 slot 15'
Wi-Fi is currently blocked by rfkill.
Use raspi-config to set the country before use.
Reading label...
Found an empty tape.
Label 'openhab-AWS-15' doesn't match the labelstr 'openHABian-openhab-AWS-%%%'.
Label 'openhab-AWS-15' doesn't match the labelstr 'openHABian-openhab-AWS-%%%'.
+ return 1
+ echo 'FAILED (amlabel)'
FAILED (amlabel)
+ return 1
+ 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
@mstormi said…
There’s a manpage for amlabel.
Your problem seems to be that the autolabel line in /etc/amanda/openhab-AWS/amanda.conf is wrong so it does not match the two-digit tape number. Delete one ‘%’. You need to do that in the template file so restart openhabian-config
I changed autolabel line in /etc/amanda/openhab-AWS/amanda.conf to several different things and restarted each time. After retrying for each, I get the same error. I tried the following:
autolabel “openHABian-openhab-AWS-%%” empty
autolabel “openhab-AWS-%%%” empty
After I rerun the AMANDA setup in openHABian the tool is putting autolabel back to it’s default value of “openHABian-openhab-AWS-%%%” empty
I upgraded to the Main branch and tried again. I can see the %%% was changed to %%, but it still fails. See log below. From the error message, it seems like the openHABian- part of the labelstr shouldn’t be there. Any thoughts?
+ [[ 15 -le 0 ]]
+ [[ openhab-AWS == \o\p\e\n\h\a\b\-\d\i\r ]]
+ [[ openhab-AWS == \o\p\e\n\h\a\b\-\A\W\S ]]
+ cond_redirect su - backup -c 'amlabel openhab-AWS openhab-AWS-15 slot 15'
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ su - backup -c amlabel openhab-AWS openhab-AWS-15 slot 15 \033[39;49;00m'
$ su - backup -c amlabel openhab-AWS openhab-AWS-15 slot 15
+ su - backup -c 'amlabel openhab-AWS openhab-AWS-15 slot 15'
Wi-Fi is currently blocked by rfkill.
Use raspi-config to set the country before use.
Reading label...
Found an empty tape.
Label 'openhab-AWS-15' doesn't match the labelstr 'openHABian-openhab-AWS-%%'.
Label 'openhab-AWS-15' doesn't match the labelstr 'openHABian-openhab-AWS-%%'.
+ return 1
+ echo 'FAILED (amlabel)'
FAILED (amlabel)
+ return 1
+ 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
If all you need is the openHABian install to proceed you can edit /opt/openhabian/functions/backup.bash and remove the return 1 from the amlabel line.
(beware updating openHABian on start will overwrite your changes)
So I upgraded and reran AMANDA setup. amlabel worked as expected for slots 15 to 10 and failed at 9. It failed because the script fed it openhab-AWS-9 and the labelstr was expecting openhab-AWS-09. I ended up creating openhab-AWS-01 through openhab-AWS-09 manually, removing the return 1 as you suggested, and ran the setup again. All the amlabel commands failed as expected because they already existed, but the remaining portion of the script ran. I verifed with amcheck and it was fine, and I ran amdump successfully. So in my case I’m assuming what I have will work going forward, but for others trying to install, it will continue to fail.
Actions needed:
Change labelstr in souce code to openhab-AWS-% instead of openhab-AWS-%% (I’m assuming this will cause the script to expect 1 … 15 and not 01 … 15)
I’m not sure how to test it now that it’s setup. The script will fail because the labels already exist. Is there a trick to completely removing everything AMANDA related? If so, I’ll do that and retest from the beginning.