I read this thread with some interest. I have had problems with my install as well.
Given the stated openhab objective of “Simpler setup and configuration possibilities for “regular” i.e. not tech-savvy users” one would expect the Readme would contain at least some guidance as to what needs to be done. As is I don’t think the current README does that. I have some suggestions to fix that
In this post I provide my experiences with installing AMANDA using the existing README. Note that these comments are based on a NAS backup so some or all of these comments may not apply if using the USB attached storage option (which I did not try). While there is a lot of detail I have provided this as I think it would be useful feedback for the maintainers. I have not provided details of the exact linux commands I used as I figured anybody using a NAS would know how to access man pages and Google for more details.
Firstly, I read the Amanda README several times in great detail trying to get a feel for what was going on. In this respect I found the introduction section to be excellent background information. Was a bit confused as to how to actually do it so I just dived right in.
Since I would be using a Synology NAS I mounted it on the Pi and tested it. It later transpired that I should have given the “backup” user permissions on the mount on the Pi and this is not in the README nor is it obvious (at least it wasn’t to me anyway). And BTW you cannot switch to backup user unless you know the backup users password – which is not in the README. I found out how to change that via Google and an Amanda users group!
In respect of mounting the NAS I had read this thread and knew that I had to place the mount at “/mnt/NAS” before running install but this is NOT mentioned in the README and is only obvious if you look at the config files (more on that later).
On installation users will get a step which asks them the mount location. A non tech savvy user may think that answering this step will create the mount which of course it doesn’t.
I tried to open the config files but it seems that I am not logged in as backup user. Change to backup user and I cannot traverse the directory structure because backup is not in the sudoer group. Fixed that but this is getting frustrating. Entered my email details but left everything else alone.
So I then ran the install and it asked me how many tapes or slots I wanted. The concept of tapes or slots is not described in the README . I had no clue so I aborted the install and went to read the docs at Amanda.org. Still no clue. I initially entered four and then it wants to know the size of the tapes. Back to Amanda.org. Still no clue so entered size of the SD card (32GB). I still don’t know if this is optimal but I have heaps of space on my NAS. In this respect I suggest the Readme should briefly explain how Amanda uses slots to emulate physical tapes and how these are used by the installed configuration. This does not have to be complicated and for a NAS backup I was thinking something like.
- “ For a NAS backup the installed configuration will set up a number of slots in the storage directory. Each of these slots will emulate a physical tape. The default/recommended number of slots (tapes) is 15 but this can be changed during the installation process. The installation process will ask for the size of the storage directory and each slot will be allocated that size divided by the number of slots. The suggested/recommended size required for a full openhabian backup is XXXXXMB. The installation will run a full [not sure if its a full back up or incremental?] backup (amdump) at midnight and that backup will be stored in the first non-empty slot. The next day’s backup will be stored in the next available slot and so on until each slot is full at which time the first slot will be overwritten. All of these actions can be changed via the Amanda configuration files– see amanda.org manual pages for further details”
By the way it appears the Amanda config files are only accessible AFTER you have actually installed Amanda. Which means users have no idea what the default configuration is until after the install - by which time they have changed it and may already have entered sub optimal values for tapes and tape size and it doesn’t work. They then have to go back and edit and its starts to get messy. Similarly you cannot see the adopted backup strategy set out by Cron and Disks configuration files until after you have installed Amanda . This means it’s more difficult to figure out what is going on before you install and thus there is more chance of not setting it up properly. As a suggestion could a section be added to the README which sets out the questions the installation process will ask and also gives some model answers based on a standard openhabian backup.
Anyway in my situation I left the config files as is and only changed the email address field. I had already set up EXIM4 email on the pi.
Also when I mounted my NAS It was not clear that I did not have to create a slots directory with the required number of slots in it because the installation process does that for you.
Ok so I had the installation finished and I try to run it and it fails. I had to wait 5 hours before amdump reported a fail and I found that out – (again not mentioned in the readme but is mentioned in several forum posts so I was expecting it).
So after accessing the detail of the default config files (from a post on the forum because you cannot access them until after the installation is finished) I change the file back to default configuration with 15 slots and re-entered my email details
I ran Amcheck and it just hangs with the display of - Slot:0 volume”” with no response to keybd input on Putty (ctrl C to stop it) which is when I figured out I needed to give backup user permissions on the mount folder. Ahh …. Now it seems to work. Amcheck runs ok. Amreport says nothing found so we do an Amdump. Which works. Finally - after four days (a large portion of which was trying to understand Amanda! and what it wanted/needed).
Now I go to sort out cloning an SD card. I used my NAS as the temporary storage location which worked OK. However, I note that the Readme instructions for the amfetch are misleading as they use “openhab” rather than the default “openhab-dir” as the dump to fetch! They are also referencing a different user name and directories than would be found in a normal openhabian setup. This was a bit confusing.
So in summary I got it working but it took quite a while. For the benefit of others I have provided a suggested checklist for using the NAS option (with comments questions): but please note I have simply listed the steps I followed to get it to work. There may be a more optimal approach:
- Before trying to install Amanda from the config console decide on the backup strategy, tape numbers and sizes .
- Make sure there is a NAS (NFS type) local mount in the location that is expected by Amanda (which is /mnt/NAS?). Test the mount to make sure any local changes are reflected in the remote location. Also give ‘backup’ user permissions on the mount location on the Pi. Configure the NAS to allow NFS access by the Pi.
- Install Amanda using the config console
- Change the backup users password (the default password is ???)
- Add backup user to the sudo group. You need to do this or you will not be able to edit any config files.
- If you want email notifications from Amanda set up and enable an email system on the Raspberry pi (Exim4?) and amend the Amanda config file to enter your email address.
- Run amcheck on the configuration see Amanda.org for troubleshooting
- Run amreport see Amanda.org for troubleshooting
- Run amdump on the configuration. Note: this may take a number of hours
- Check wherever the backup went to and that it has actually backed up the files
- Run amrestore to check that functionality
- If backing up the SD card image make a clone of the SD card. [Add some sub steps on how to do that such as mount second card or add second mount for temp NAS location or whatever]
Finally: and on a more positive note I think this is a very good backup solution. Thanks for that. I feel the README just needs a bit of tweaking to provide a little more background and some high-level steps for using the NAS option. Also while I did not appreciate it at the time I have learned a lot about Linux while debugging the install.