Skip to content

3. HowTo change database password

Renato Freitas edited this page Dec 20, 2019 · 2 revisions

3.1. Changing database bacula user password

systemctl stop bacula-dir.service ; systemctl stop bacula-sd.service ; systemctl stop bacula-fd.service

su - postgres

psql bacula

alter user bacula with password 'password';

\q

3.2. Changing bacula-dir.conf

You'll have to add this password to two locations in the bacula-dir.conf file: once to the Catalog resource and once to the RunBeforeJob entry in the BackupCatalog Job resource. With the password in place, these two lines should look something like:

dbname = bacula; user = bacula; password = "password"

... and ...

WARNING!!! Passing the password via the command line is insecure.

RunBeforeJob = "/etc/make_catalog_backup Catalog-default bacula password"

systemctl start bacula-dir.service ; systemctl start bacula-sd.service ; systemctl start bacula-fd.service