No defined tcp_port_range i= n '/etc/amanda-security.conf'

  • Platform information:
    • Hardware: armv7l/RAM 2GB
    • OS: openhabian 3.2.0
    • Java Runtime Environment: openjdk 11.0.12 2021-07-20
    • openHAB version: 3.2.0
  • Issue of the topic: Amanda is broken, after wiping the tape disk

Unfortunately I’ve wiped the amanda tape disk. After this misfortune, I’ve just recreated the target directory for amanda, but I’ve got still error message by amanda dump.
So I tried to uninstall amanda (apt-get purge + removing directories). Then I installed amanda again and configured it by openhabian-config.
Unfortunately I’m still getting error messages:

The next 10 tapes Amanda expects to use are: 10 new tapes.


FAILURE DUMP SUMMARY:
  planner: ERROR Request to kunigunde2 failed: No defined tcp_port_range i=
n '/etc/amanda-security.conf'
  kunigunde2 /dev/mmcblk0 lev 0  FAILED [Request to kunigunde2 failed: No =
defined tcp_port_range in '/etc/amanda-security.conf']
  kunigunde2 /boot lev 0  FAILED [Request to kunigunde2 failed: No defined=
 tcp_port_range in '/etc/amanda-security.conf']
  kunigunde2 /etc lev 0  FAILED [Request to kunigunde2 failed: No defined =
tcp_port_range in '/etc/amanda-security.conf']
  kunigunde2 /var/lib/openhab lev 0  FAILED [Request to kunigunde2 failed:=
 No defined tcp_port_range in '/etc/amanda-security.conf']

How can I repair my amanda installation? Or would it better to uninstall and install new?

Below is the default contents of /etc/amanda-security.conf, edit to match.

############################################################
# /etc/amanda-security.conf                                #
#                                                          #
# See: man amanda-security.conf                            #
#                                                          #
# This file must be installed at /etc/amanda-security.conf #
#                                                          #
# It list all executables amanda can execute as root.      #
# This file must contains realpath to executable, with     #
# all symbolic links resolved.                             #
# You can use the 'realpath' command to find them.         #
#                                                          #
# It list program and a symbolic name for the program      #
# Followed by the realpath of the binary                   #
#                                                          #
# Uncomment and edit the following lines to let Amanda to  #
# use customized system commands.  If multiple PATH is     #
# necessary, please put them in different lines.           #
# e.g.:                                                    #
# amgtar:GNUTAR_PATH=/usr/bin/tar                          #
# amgtar:GNUTAR_PATH=/usr/bin/tar-1.28                     #
#                                                          #
#                                                          #
# Only binary listed are allowed to be run as root.        #
#                                                          #
# You can find the configured binary with amgetconf        #
#     amgetconf build.gnutar_path                          #
#     amgetconf build.star_path                            #
#     amgetconf build.bsdtar_path                          #
#                                                          #
############################################################
#runtar:gnutar_path=/bin/tar
#amgtar:gnutar_path=/bin/tar
#amstar:star_path=/usr/bin/star
#ambsdtar:bsdtar_path=/usr/bin/bsdtar

#restore_by_amanda_user=no
tcp_port_range=512,1024
udp_port_range=840,860
amgtar:gnutar_path=/usr/bin/tar

Thank you for the fast answere. I’ve just replaced my /etc/amanda-security.conf with your excample. Before mine has only twice the line

amgtar:gnutar_path=/usr/bin/tar

Unfortunately I’m getting now other error messages:

The next 10 tapes Amanda expects to use are: 10 new tapes.

FAILURE DUMP SUMMARY:
  planner: ERROR kunigunde2 NAK: user backup from localhost is not allowed=
 to execute the service noop: /var/backups/.amandahosts: owned by id 0, sh=
ould be 34
  kunigunde2 /dev/mmcblk0 lev 0  FAILED [kunigunde2 NAK: user backup from =
localhost is not allowed to execute the service noop: /var/backups/.amanda=
hosts: owned by id 0, should be 34]
  kunigunde2 /boot lev 0  FAILED [kunigunde2 NAK: user backup from localho=
st is not allowed to execute the service noop: /var/backups/.amandahosts: =
owned by id 0, should be 34]

What is the next step?

This is not a known recipe one just needs to apply so do not expect anyone to guide you through this. You need to interpret the errors yourself.
Resetting permissions might help but frankly as we do not know what else you broke with your activities so starting all over from scratch is the safer and probably faster solution.

markus@devpc:~ $ ls -l /var/backups/.amandahosts
lrwxrwxrwx 1 backup backup 16 Apr  7  2021 /var/backups/.amandahosts -> /etc/amandahosts
markus@devpc:~ $ ls -l /etc/amandahosts
-rw------- 1 backup backup 174 Okt 14 21:24 /etc/amandahosts
markus@devpc:~ $