OH3 Openhabian Amanda Setup Problem (Step-By-Step)

I’m trying to get the autobackup feature working but the instructions I guess are above my head. I’d like to help write some step-by-step instructions but first I need to make it work! This is where I’m at:

  1. Use an SD card with twice the capacity of the card already in the RPi & format (I use Linux so I formatted to ext4).
  2. Place the card in a USB card reader and insert the reader into a USB port in the RPi.
  3. Boot the RPi, connect with Putty, and login with Login: openhabian Password: openhabian.
  4. This should result in seeing the openHABIAN graphic in the terminal window. Paste or write ‘sudo openhabian-config’ at the prompt and hit Enter.
  5. This should result in the configuration menu. Navigate to item 50 and hit Enter.
    At this point I’m confused as to weather I should choose 53 to set up internal mirroring, or 52 to set up Amanda. I tried 53 & it seemed to make a mirror image so I’ll go with that
  6. Choose 53, hit Enter.
  7. This should result in an option to select the card to write to. In my case the only choice was sdb. Write this down because you’ll want it when setting up Amanda backup I think. Tab to highlight Select & hit Enter.
  8. This should result in the image being written which will take a while. I think when it’s done you arrive back at the configuration menu but I don’t want to wait for the process again so I’m going on memory.
  9. Navigate to 52, hit Enter.
  10. This should result in some language about installing Amanda backup solution. Tab to Continue, hit Enter.
  11. Enter password for backup (I used openhabian)
  12. Answer Yes to setting up a backup on local storage or an NAS device.
  13. It should be asking you what directory to backup to. Enter the drive location you copied above like this: /dev/sdb, tab to OK, hit Enter
  14. How much storage do you want to dedicate? I have a 16gb card in the RPi & a 32gb for backup so I chose 30000 (1024 * 32gb = 32768) because I didn’t know if there could be a problem related to using every last byte on the card. Tab, hit Enter.

This resulted in an error: "There was an error or interruption during the execution. Any help would be appreciated. Also any guidance on anything above which may be incorrect.

/dev/sdb is not a directory but a device name so this is where your fault is.
As you don’t try to do this in unattended mode you have to manually mount your backup space to some directory then use that one when being asked here.
Read the Amanda docs before you install it.
And read the debug guide when you’re stuck.

I’m also 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

Open a new thread please as your issue is a completely different one.
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

Thanks mstormi, this was a test rig so I decided to start over and try installing again & include the auto backup feature. When I go to the Amanda docs page I see where it says openHABian comes with the new auto backup feature - great!. So if I click that link it says to set up right at installation time define backupdrive=/dev/sdx, with x being the proper character. That’s confusing because I thought the setup was creating that stuff but now I realize that that link drops you into the middle of a page about modifying the openhabian.conf file.

OK so just to be clear, the term “unattended installation” refers to the normal openHABian installation regardless of whether I am modifying the config file or not?

Next, back at the Amanda docs page, scrolling down to where it talks about it talks about preparing the storage. This is not done from the RPi, but from a computer right? It doesn’t actually say that…

It goes into a bunch of stuff about using an NAS box. Again, this is confusing. But then if you scroll down it does show an example for USB storage. The problem is that the example they show has 8 partitions of different types. I thought I was only creating one?

Finally, it talks about software installation and verifying that the permissions are correct and says to start the Amanda installation from the openHABian menu but the point was that there was some advantage to doing this at initial setup and that’s what teh point of all of this was?

Also, the initial language says openHABian “comes with” the new auto backup feature. That seems very misleading if the reality is that you have to read through pages of docs and manually configure drives to get it to work. I’m telling you all of this because I see that you are listed as a maintainer.

My goal is not to complain pointlessly. I have been using open source software and have contributed to projects for about the last 15 years so I know how it works. I think sometimes it’s just easy for people to lose sight of what the experience is like for someone new who is looking for clear step-by-step instructions to get through this stuff.

I appreciate any help additional help.

No. Unattended is unattended, the opposite of interactive.
It’s what takes place when you flash the image and boot for the first time.
And if you had read the openHABian docs you would know that you can change the config file BEFORE unattended install.

No because it depends on the type of storage you choose.

Everyone is lazy in the first place and users like to interpret docs the wrong way because they underestimate complexity and want the thing to be simple, but that wanting does not turn it into a simple thing. I have changed that sentence in the docs but that won’t make the underlying problem go away.
From a SW or docs writer perspective, there’s little that can be done about it, if someone wants to misinterpret it, he will find a way to.

That’s not a docs issue but a wrong expectation on your part then. Yes a pretty common one among users but still a wrong one.
Like some other functionalities as well, Backup is a complex problem that depends on many parameters and there are no simple solutions to complex problems let alone step-by-step instructions that match or are specific to every single individual setup.
It is impossible (and incredibly time wasting and tiresome to try) to write docs including examples that cover and match every eventuality, including all potential user side misunderstandings in wording.
Let alone that part of the problem is that people simply assume and do things that are not in the docs just because they read it somewhere else or because they think it is ‘obvious’ or ‘natural’ to assume.

The bottom line is there is no such thing as a free lunch, and if you are familiar with OSS as you say that should be a no-brainer, shouldn’t it.

Wow, I promise I DID read the docs and I know that you can change the config file.

While I agree that everyone wants it to be easy, I don’t agree that it’s a misinterpretation to think that something coming with the software means it’s actually there without having to edit files manually or somehow build things to make it work. For example, the last time I assessed OH for using in our business it was OH2. I got stuck on persistence and graphing. I tried a couple of times to set up graphana and the databases & just couldn’t get it to work. That setup was complex as well but now in OH3 it’s just there. Before it was available to build. Now it’s included (by my interpretation).

And I agree that it is complex, especially because there are different ways to configure it with NAS, cloud, or USB, but right now those instructions seem to be mixed together and not exactly clear. The simplest approach would seem to be to configure it to use the SD card in the USB reader. It seems like there could be some simple instructions on how to do that for people that want to do this who are less technically savvy. One thing that’s confusing to me is that the instructions say the drive will be sdx - x being different depending on your system. But doesn’t Openhabian apply that name? If that’s the case, how do I know what it is if I’m working in the config file before I’ve even run the install? Mine showed up as sdb, with sda as the main sd card so I assume that that’s what we’re going to see when we’re using an sd card in a card reader for the backup drive?

I’m never going to say technical writing is easy and I agree that you’re never going to please everyone or be able to give every example. I run a business that uses software but I’m not a coder or any kind of developer. I’m a level below (or two levels, or many levels - ha!) you guys in my understanding, knowledge, and abilities to configure software. I am an early adopter, smart enough to configure things like this with help from people like you, dumb enough to need that help even when there appear to be instructions on how to do it. As such I am in a position to understand where regular people are going to get stuck trying to configure this stuff. And with OH3 being such a strong change toward UI configuration there will be many, many less tech savvy users coming along and having these problems. I always write my own instructions for this kind of stuff, once I get it working. I’m going to keep working on this and I will be writing my own instructions for myself and our employees and I’ll share those instructions with the community if I think it will help.

Thanks for your replies.

Well it is a misinterpretation because it was not meant like that. I’m not saying it was a dumb mistake to understand it like that and therefore changed the wording to be less likely to be misunderstood but as I said in the end a user just needs to want the thing to be simple badly enough and he will interpret it to fit with his point of view (I believe there’s even a psychological scientific term for that sort of acting).

Yes but again it’s too complex for a simple answer, and for sure I don’t want to be responsible for trashing anyone’s system. Which happens easily if you use a wrong x here. If I did write “usually /dev/sdy” a number of people would use that and blame me afterwards for killing their system (and at least in parts rightly so).
And explaining the whole Linux device naming philosophy and implementation is clearly out of scope as well, so you as a user have to fill the gap yourself. It will not get any simpler than that.

Ok we can agree to disagree. I found another thread which has helped me configure this but I still have questions I hope you can answer for me.

I formatted the sd card again, put it in the Pi, created the mount point, successfully mounted it, created a directory, and set permissions to user backup. I did this all as the openhabian user because I didn’t see anywhere that I was supposed to switch to user backup. So when I try to create a file it fails due to permissions, when I try to switch user to backup it asks for a password & I don’t know what that is.

Also, I noticed that in the other thread the OP said he modified the fstab file to make it auto-mount but I don’t see that in your instructions. Is this not needed?

No you did this as root, it would not work as any other user. sudo X means to run X as root.
You can sudo -u backup bash to switch users.
Use sudo passwd backup to set the backup user’s password or do it via the menu (1X I think).

You will want to do that to have it happen automatically after a reboot.
But as it says in the document, explaining Linux file systems is beyond the document scope.
Anyone who does not want to dive in can use the auto backup feature on installation.