changing default path for postgresql DB Files

16 views
Skip to first unread message

DUCARROZ Birgit

unread,
May 24, 2020, 6:56:17 AM5/24/20
to bareos-users
Hi all,

I wonder in which file I can change the default path from
/var/lib/postgresql to something else.

I'm looking around in the config files, but I can't figure it out.

On another server I just created a symbolic link, but trying this on a
new server, I get the error below, and this even if MyCatalog.conf is
configured with

dbaddress = 127.0.0.1
dbport = 5432

Or is there a possibility to add a working_dir into MyCatalog.conf ?

The error I get when creating a symbolic link in /var/lib/ to the
postgresql files which are located somewhere else:


bareos-dir: dird/dird.cc:927-0 Could not open Catalog "MyCatalog",
database "bareos".
bareos-dir: dird/dird.cc:932-0 cats/postgresql.cc:254 Unable to connect
to PostgreSQL server. Database=bareos User=bareos
Possible causes: SQL server not running; password incorrect;
max_connections exceeded.
bareos-dir ERROR TERMINATION
Please correct the configuration in /etc/bareos/bareos-dir.d/*/*.conf

Thank you for any hint!
Regards,
Birgit

spadaj

unread,
May 24, 2020, 8:14:34 AM5/24/20
to bareos...@googlegroups.com
I'm not quite sure what you want to achieve.
You use db address and db port to point the director to a running
Database Server (in your case - PostgreSQL, as I understand) instance.
It's up to the database server to be up and have the port open for
connections. In case of PostgreSQL it's also important to set up
appropriate authentication methods in pg_hba.conf.
Are you sure you can connect to the database? Don't you have firewall
rules limiting (local) access? Is the database server listening on
loopback interface? Isn't SELinux interfering with the connection (I
assume you use linux here).
Try to su to user you're running bareos with and connect with psql to
your database.

Best regards.
MK

W dniu 24.05.2020 o 12:56, 'DUCARROZ Birgit' via bareos-users pisze:

DUCARROZ Birgit

unread,
May 24, 2020, 12:34:20 PM5/24/20
to bareos...@googlegroups.com
Thank you a lot, I found the issue:
it was a rights problem on the external directory itself.

Anyway, I wonder if it is possible to change the original path from
/var/lib/postgresql into something else directly in the installation script.

Kind regards,
Birgit
Reply all
Reply to author
Forward
0 new messages