======== Quick installation guide with the SQLite backend ========

Perform the following commands to install Bacula with its default configuration
and all daemons and consoles in one server.

1) Install packages

# dnf -y install sqlite \
    bacula-director bacula-storage bacula-client \
    bacula-console bacula-console-bat

2) Select the SQLite database backend

# alternatives --set libbaccats.so /usr/lib64/libbaccats-sqlite3.so

3) Create database

# 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 dir=bacula-dir | bconsole

# systemctl start bacula-sd.service
# echo status storage=bacula-sd | bconsole

# systemctl start bacula-fd.service
# echo status client=bacula-fd | bconsole

6) Access to the consoles is controlled by the read permission on the console
configuration files. Unless console authentication is configured (for example
with the Director LDAP or TOTP BPAM plugins), a user that can read them can
perform any command. To grant access to a specific user:

# setfacl -m u:user:r /etc/bacula/bconsole.conf /etc/bacula/bat.conf
