View Issue Details

IDProjectCategoryView StatusLast Update
0001010bareos-coreinstaller / packagespublic2023-09-05 16:06
Reporteraron_sAssigned Tobruno-at-bareos  
PrioritynormalSeverityfeatureReproducibilityalways
Status closedResolutionfixed 
PlatformLinuxOSUbuntuOS Version16.04
Product Version17.2.4 
Summary0001010: Bareos database scripts should use db_address parameter in catalog config
DescriptionIf we configure the catalog resource and set "DB Address" and/or "DB Port" it is not used by the database scripts. For flawless configuration the scripts should be capable of installing, maintaining and deleting remote databases.
Steps To Reproduce# Check the configuration
bareos@ubuntu1604-daemons:~# /usr/sbin/bareos-dbcheck -B
catalog=MyCatalog
db_name=bareos
db_driver=postgresql
db_user=bareos
db_password=postgrespassword
db_address=databasehost.example.com
db_port=5432
db_socket=
db_type=PostgreSQL
working_dir=/var/lib/bareos

# Execute one of the scripts
bareos@ubuntu1604-daemons:~# su postgres -c /usr/lib/bareos/scripts/drop_bareos_tables
Dropping postgresql tables
psql: FATAL: database "bareos" does not exist
Dropping of Bareos PostgreSQL tables failed.

# Execute the script and pass the not-recognized parameter like the hostname
bareos@ubuntu1604-daemons:~# su postgres -c "/usr/lib/bareos/scripts/drop_bareos_tables --host databasehost.example.com"
Dropping postgresql tables
Password:
DROP TABLE
[...]
DROP TABLE
Dropping of Bareos PostgreSQL tables succeeded.
TagsNo tags attached.

Activities

bruno-at-bareos

bruno-at-bareos

2023-09-05 16:06

manager   ~0005379

the scripts usually respect PG_XXX ENV variables. beware that your catalog config need to be accessible to "postgres" user when using su postgres -c

Issue History

Date Modified Username Field Change
2018-09-24 13:42 aron_s New Issue
2018-09-24 13:42 aron_s Status new => assigned
2018-09-24 13:42 aron_s Assigned To => aron_s
2018-09-24 13:43 aron_s Status assigned => confirmed
2018-10-04 14:31 aron_s Assigned To aron_s =>
2018-10-04 14:31 aron_s Steps to Reproduce Updated
2023-09-05 16:06 bruno-at-bareos Assigned To => bruno-at-bareos
2023-09-05 16:06 bruno-at-bareos Status confirmed => closed
2023-09-05 16:06 bruno-at-bareos Resolution open => fixed
2023-09-05 16:06 bruno-at-bareos Note Added: 0005379