Hola Andy
Los testeos desde bacula-sd y bacual-fd son correctos debido a que ambos demonios no atacan al catalogo de bacula, es el demonio bacula-dir quien realiza las operaciones sobre la base de datos.
Ahora bien, en primer lugar deberías intentar conectarte al catálogo desde linea de comandos mediante el comando psql para comprobar que accedes bien al catalogo, logueado como usuario root:
/etc/bacula# psql -U bacula bacula
psql (9.1.4)
Type "help" for help.
bacula=#
En el caso de no poder conectarte con el usuario bacula, es decir, te dará un error de permiso denegado, tendrás que loguearte con el usuario postgres y probar a acceder.
Me surge la duda de si la instalación las has realizado desde los fuentes o desde los paquetes que te proporciona la distribución. Para el primer caso deberás asignarle una contraseña al usuario bacula en la base de datos bacula y luego esta contraseña deberá coindicir con la definida en la sección Catalog del fichero de configuración bacula-dir.conf.
# psql -U bacula bacula
bacula =# alter user bacula with password '123456';
Catalog {
Name = MyCatalog
# Uncomment the following line if you want the dbi driver
# dbdriver = "dbi:sqlite3"; dbaddress = 127.0.0.1; dbport =
dbname = "bacula"; DB Address = ""; dbuser = "bacula"; dbpassword = "123456"
}
- Reinicia servicio bacula-director y prueba.
Otra cosa que deberás comprobar, es que en el fichero de configuración de postgres pg_hba.conf esté configurado correctamente para que bacula pueda acceder al catalogo; pon especial cuidado en la columna donde se asigna el METHOD ya que dependiendo de uno u otro bacula no podrá acceder. Te envio ej:
# Database administrative login by Unix domain socket
local all postgres trust
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all <aqui deberas indicar segmento de red al cual pertenece tu servidor de backup> md5
# IPv6 local connections:
host all all ::1/128 md5
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local replication postgres peer
#host replication postgres 127.0.0.1/32 md5
#host replication postgres ::1/128 md5
Espero te sirva de ayuda.
Un saludo
De: "Guy" <guy AT britewhite DOT net>
Para: bacula-users AT lists.sourceforge DOT net
Enviados: Lunes, 20 de Agosto 2012 10:44:59
Asunto: Re: [Bacula-users] Database error after bacula installation with postgresql
Have you configured the postgres database?
can you connect to the postgres database called "bacula" with the username "bacula" and no password
> bacula-dir: postgresql.c:243-0 db_user=bacula db_name=bacula db_password=
it would seem that bacula doesn't seem to think it can.
Cheers,
--Guy
On 17 Aug 2012, at 16:39, adx00356 <bacula-forum AT backupcentral DOT com> wrote:
> Dear colleagues,
>
> sorry for my bed english. I learnd it in the school before 27 years.
>
> I installed bacula with the postgresql datebase. The tests after the install procedure with bacula-sd -t, bacula-fd -t are o.k.! But the test with bacula-dir -t get some error.
>
> -- error message --
>>>
> root@debkup:/etc/bacula# bacula-dir -t -d 100
> bacula-dir: dird.c:185-0 Debug level = 100
> bacula-dir: dir_plugins.c:160-0 Load dir plugins
> bacula-dir: dir_plugins.c:162-0 No dir plugin dir!
> bacula-dir: postgresql.c:1126-0 db_init_database first time
> bacula-dir: postgresql.c:241-0 pg_real_connect done
> bacula-dir: postgresql.c:243-0 db_user=bacula db_name=bacula db_password=
> bacula-dir: dird.c:993 Could not open Catalog "MyCatalog", database "bacula".
> bacula-dir: dird.c:998 postgresql.c:248 Unable to connect to PostgreSQL server. Database=bacula User=bacula
> Possible causes: SQL server not running; password incorrect; max_connections exceeded.
> 17-Aug 16:53 bacula-dir ERROR TERMINATION
> Please correct configuration file: bacula-dir.conf
> <<
>
> Who can help me?
> How can I modify the postgresql parameters?
>
> Thanks for your solutions
>
> Andy
>
> +----------------------------------------------------------------------
> |This was sent by adx00356 AT yahoo DOT de via Backup Central.
> |Forward SPAM to abuse AT backupcentral DOT com.
> +----------------------------------------------------------------------
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Bacula-users mailing list
> Bacula-users AT lists.sourceforge DOT net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users