Bug 835185

Summary: missing documentation
Product: Red Hat Enterprise Linux 7 Reporter: Karel Volný <kvolny>
Component: baculaAssignee: Petr Hracek <phracek>
Status: CLOSED CURRENTRELEASE QA Contact: Tomas Dolezal <todoleza>
Severity: high Docs Contact:
Priority: high    
Version: 7.0CC: jscotka, phracek, todoleza
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Unspecified   
Whiteboard:
Fixed In Version: bacula-5.2.13-6.fc19 Doc Type: Release Note
Doc Text:
======== Quick installation guide for the database backends ======== Perform the following commands to install Bacula with its default configuration and all daemons and consoles in one server. 1) Install packages 1a) for MySQL # yum -y install mysql-server \ bacula-director bacula-storage bacula-client \ bacula-console bacula-console-bat 1b) for PostgreSQL # yum -y install postgresql-server \ bacula-director bacula-storage bacula-client \ bacula-console bacula-console-bat 1c) for SQLite3 # yum -y install sqlite \ bacula-director bacula-storage bacula-client \ bacula-console bacula-console-bat 2) Select the database backend # alternatives --set libbaccats.so /usr/lib64/libbaccats-{mysql|postgresql|sqlite3}.so 3) Create database 3a) For MySQL # systemctl enable mysqld.service # systemctl start mysqld.service # cd /usr/libexec/bacula # ./create_bacula_database mysql # ./make_bacula_tables mysql # ./grant_bacula_privileges mysql 3b) For PostgreSQL # postgresql-setup initdb # systemctl enable postgresql.service # systemctl start postgresql.service # su - postgres $ cd /usr/libexec/bacula $ ./create_bacula_database $ ./make_bacula_tables $ ./grant_bacula_priviledges 3c) for SQLite # cd /usr/libexec/bacula # ./create_bacula_database sqlite3 # ./make_bacula_tables sqlite3 # ./grant_bacula_privileges sqlite3 4) Change passwords in /etc/bacula/*.conf with something you like. # sed -i -e 's/@@DIR_PASSWORD@@/dir-password/g' \ -e 's/@@FD_PASSWORD@@/fd-password/g' \ -e 's/@@SD_PASSWORD@@/sd-password/g' \ -e 's/@@MON_DIR_PASSWORD@@/mon-dir-password/g' \ -e 's/@@MON_FD_PASSWORD@@/mon-fd-password/g' \ -e 's/@@MON_SD_PASSWORD@@/mon-sd-password/g' \ /etc/bacula/*.conf 5) Enable daemons and check they are working # systemctl enable bacula-dir.service # systemctl enable bacula-sd.service # systemctl enable bacula-fd.service # systemctl start bacula-dir.service # echo status bacula-dir | bconsole # systemctl start bacula-sd.service # echo status bacula-sd | bconsole # systemctl start bacula-fd.service # echo status bacula-fd | bconsole 6) To grant console access to regular users add the read permission to the console configuration files. Remember that there is no authentication check; so a user that can launch the console can perform any command. # chmod +r /etc/bacula/bconsole.conf /etc/bacula/bat.conf
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-05-07 09:21:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Karel Volný 2012-06-25 18:58:56 UTC
Description of problem:
The way of configuring the database seems to have changed drastically between RHEL6 and RHEL7. The documentation how to setup the new version is severely lacking.


Version-Release number of selected component (if applicable):
bacula-director-5.2.6-4.el7.x86_64


Steps to Reproduce:
1. alternatives --display bacula-dir


Actual results:
(nothing)


Expected results:
.qa.[root@x86-64-6s-m1 ~]# alternatives --display bacula-dir
bacula-dir - status is manual.
 link currently points to /usr/sbin/bacula-dir.sqlite
/usr/sbin/bacula-dir.sqlite - priority 40
 slave create_bacula_database: /usr/libexec/bacula/create_bacula_database.sqlite
 slave drop_bacula_database: /usr/libexec/bacula/drop_bacula_database.sqlite
 slave drop_bacula_tables: /usr/libexec/bacula/drop_bacula_tables.sqlite
 slave grant_bacula_privileges: /usr/libexec/bacula/grant_bacula_privileges.sqlite
 slave make_bacula_tables: /usr/libexec/bacula/make_bacula_tables.sqlite
 slave make_catalog_backup: /usr/libexec/bacula/make_catalog_backup.sqlite
 slave update_bacula_tables: /usr/libexec/bacula/update_bacula_tables.sqlite
 slave bacula-dbcheck: /usr/sbin/dbcheck.sqlite
/usr/sbin/bacula-dir.mysql - priority 50
 slave create_bacula_database: /usr/libexec/bacula/create_bacula_database.mysql
 slave drop_bacula_database: /usr/libexec/bacula/drop_bacula_database.mysql
 slave drop_bacula_tables: /usr/libexec/bacula/drop_bacula_tables.mysql
 slave grant_bacula_privileges: /usr/libexec/bacula/grant_bacula_privileges.mysql
 slave make_bacula_tables: /usr/libexec/bacula/make_bacula_tables.mysql
 slave make_catalog_backup: /usr/libexec/bacula/make_catalog_backup.mysql
 slave update_bacula_tables: /usr/libexec/bacula/update_bacula_tables.mysql
 slave bacula-dbcheck: /usr/sbin/dbcheck.mysql
/usr/sbin/bacula-dir.postgresql - priority 60
 slave create_bacula_database: /usr/libexec/bacula/create_bacula_database.postgresql
 slave drop_bacula_database: /usr/libexec/bacula/drop_bacula_database.postgresql
 slave drop_bacula_tables: /usr/libexec/bacula/drop_bacula_tables.postgresql
 slave grant_bacula_privileges: /usr/libexec/bacula/grant_bacula_privileges.postgresql
 slave make_bacula_tables: /usr/libexec/bacula/make_bacula_tables.postgresql
 slave make_catalog_backup: /usr/libexec/bacula/make_catalog_backup.postgresql
 slave update_bacula_tables: /usr/libexec/bacula/update_bacula_tables.postgresql
 slave bacula-dbcheck: /usr/sbin/dbcheck.postgresql
Current `best' version is /usr/sbin/bacula-dir.postgresql.


Additional info:
In my case, I'm trying to configure bacula-director to use sqlite.
In the previous version, 'alternatives --set bacula-dir /usr/sbin/bacula-dir.sqlite' did the trick. This doesn't work any longer.

It seems that the backend has to be set withing the configfile /etc/bacula/bacula-dir.conf but there's no information how to do that.
The official documentation at
http://www.bacula.org/en/dev-manual/main/main/Installing_Configuring_SQLi.html
doesn't even mention that configfile.

Also, as for the initialisation, there used to be a symlink from /usr/libexec/bacula/make_bacula_tables to a script corresponding to the chosen backend like /usr/libexec/bacula/make_bacula_tables.sqlite
Now make_bacula_tables is a standalone script which chooses the right backend depending on commandline parameter. This also isn't mentioned in the documentation.

The only useful thing I was able to find was in /usr/share/doc/bacula-common-5.2.6/README.Fedora that I have to use
alternatives --set libbaccats.so /usr/lib64/libbaccats-mysql-5.2.5.so
but
1) that is not enough
2) hardcoding paths like "lib64" and library versions is less than optimal.

The file /usr/share/doc/bacula-common-5.2.6/ReleaseNotes has some text about changing the default backend, but it involves modifying files in /usr, which is sooooooooooo bad that it is even worse than hardcoding "lib" or "lib64" and the library versions.

Comment 10 Tomas Dolezal 2013-03-22 15:51:57 UTC
I found how to work with non-default database
Just execute any scripts from /usr/libexec/bacula/ with db_type variable defined to value from create_bacula_database.

# db_type=sqlite3 /usr/libexec/bacula/create_bacula_database

Comment 11 Douglas Silas 2013-11-11 18:56:00 UTC
If this feature or issue should be documented in the Release or Technical Notes for RHEL 7.0 Beta, please select the correct Doc Type from the drop-down menu and enter a description in Doc Text.

For info about the differences between known issues, driver updates, deprecated functionality, release notes and Technology Previews, see:

https://engineering.redhat.com/docs/en-US/Policy/70.ecs/html-single/Describing_Errata_Release_and_Technical_Notes_for_Engineers/index.html#bh-known_issue

If you have questions, please email rhel-notes.