Bacula-users

Re: [Bacula-users] bacula-dir permanent connect to database (version 7.4.3)

2017-05-17 14:21:25
Subject: Re: [Bacula-users] bacula-dir permanent connect to database (version 7.4.3)
From: Kern Sibbald <kern AT sibbald DOT com>
To: Andrey Mursenkov <a.mursenkov AT voskhod DOT ru>, bacula-users AT lists.sourceforge DOT net
Date: Wed, 17 May 2017 20:20:00 +0200
Well, first, you should not be getting database disconnects.  If you 
are, either something is configured incorrectly, or perhaps you are 
running your database on a machine other than where the Director is, 
which is possible but not really recommended for performance reasons.

The only time that Bacula will stop because of a database problem is 
when Bacula first starts.  Bacula attempts to connect to the database 
and on failure will retry for a certain period (5 minutes I think). If 
it cannot establish a connection, Bacula gives up and will not run.  If 
the connection succeeds, Bacula closes the connection and runs.  None of 
Bacula's connections to the database are permanent.

In all other cases, a new database connection is done for each job that 
starts and terminated at the end of the job.  For a console, it can open 
and close the database connections multiple times if it is needed to 
satisfy a command. The principles are very similar for a Console to a 
Job. If the connection drops while a job is running, the job is failed, 
but Bacula continues running other jobs.  In production environments, it 
is rare that a database connection is dropped.

If your behavior is other than the above, most likely you have either a 
bad Bacula build or installation or a problem with your database 
server.  Bacula only supports MySQL and PostgreSQL.   On some distros 
they have replaced MySQL with MariaDB and though we do not "officially" 
support it (lack of resources), it seems to work perfectly well.

Best regards,

Kern


On 05/17/2017 02:32 PM, Andrey Mursenkov wrote:
> Hello,
>
> what connection type does bacula-dir use while connecting to database,
> permanent or not?
>
> If bacula-dir uses permanent connection does it support reconnect?
>
>
> Here what I can see:
>
> When I launch bacula-console and run job manually, bacula-dir
> establishes network connection to database and keep it till I close
> bacula-console. If some network error occurs during this session any
> sequential job commands fails dew to database unavailability.
>
> I was trying to open a bug (http://bugs.bacula.org/view.php?id=2283) but
> it was closed. It seems to me that bacula-dir indeed uses permanent
> connections. I think there may be some misunderstanding on my side.
> Please explain.
>
> Debain 8, Bacula 7.4.3.
>
> --
>
> Mursenkov Andrey
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Bacula-users mailing list
> Bacula-users AT lists.sourceforge DOT net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
>


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users


ADSM.ORG Privacy and Data Security by https://kimlaw.us