Can't configure with success the Postgres Plugins

70 views
Skip to first unread message

WAG Admin

unread,
Jul 18, 2022, 2:09:28 PM7/18/22
to bareos-users
Dear Bareos users,
It's been a week that I try to make the Postgres plugin works with the documentation, but I have been left so far without a solution. 
The install of the plugin happens without any problem - python3 - bareos-postgresql-python-plugin (here there's a error in the doc with the name of the package). The configuration of the FileSet on the backup server exactly like on the website with naturally the setup of every parameter (module_path, module_name,postgresDataDir,walArchiv) for our systems (Linux Opensuse 15.3). 
Our Postgres is the version 13.7
The "normal" backup of the server works like a charm. It's only the plugin. We have Bareos 21 on the server and backup client.
I have configured the conf file of postgres for the plugin too (restore_command, archive_command,  archive_mode) and create the file recovery.signal in Postgres Data.
All the services were restarted too. When I execute the backup, I receive a Fatal error Command plugin with requested but is not loaded. I've search on Internet but I've not found anything really relevant. 
Someone here can help me or show me the direction to understand this kind of error?
It would be really nice from you!
Thank you ahead.
Regards,
Joel.T
ps: I found something but in 2015 and it's really the same problem.
https://www.mail-archive.com/bareos...@googlegroups.com/msg01087.html


Bruno Friedmann

unread,
Jul 20, 2022, 4:36:22 AM7/20/22
to bareos-users
Not sure if you have done it, did you check that account using the plugin has access to dateutils and pg8000 (by installed rpm or pip3 method) ?

WAG Admin

unread,
Jul 21, 2022, 6:21:35 AM7/21/22
to bareos-users
I don't know what dateutils is. But I've installed pg8000 with the command pip3 install pg8000 with the dbadmin user on the client system.
Message has been deleted

WAG Admin

unread,
Jul 21, 2022, 7:01:59 AM7/21/22
to bareos-users
I've got this error today on the client:
Fatal error: python3-fd-mod: could not import Python module: No module named 'pg8000'
TwoWayAuthenticate failed, because job was canceled.

Bruno Friedmann

unread,
Jul 21, 2022, 9:32:58 AM7/21/22
to bareos-users
The trick with pip3 install is to place the package on a python path that the user (here it's root normally on fd) can find the needed module.
With root this is not advised to be used as you can install package that will conflict with packaged one, but still the simplest solution. I guess in your case only the dbadmin has pg8000 module installed for itself.

WAG Admin

unread,
Jul 21, 2022, 11:00:10 AM7/21/22
to bareos-users
Dear Mr. Friedmann,

it has worked like a charm. But now I need to provide a db password and in the documentation there's nothing about that (I mean a parameter for the plugin to pass the password).
Have you any clue about that?
Thank you ahead (and your time)

Bruno Friedmann

unread,
Jul 26, 2022, 4:50:09 AM7/26/22
to bareos-users
As you can check here https://github.com/bareos/bareos/blob/f3b636f06340e081746a9af256e67098d4a87f2a/core/src/plugins/filed/python/postgres/BareosFdPluginPostgres.py#L121
there's no handle of dbpassword configuration for the plugin, only traditional libpq ENV var. (Which I tend to prefer or the usage of ~/.pgpass)

Reply all
Reply to author
Forward
0 new messages