On 07/06/06, Scott Ruckh <[EMAIL PROTECTED]> wrote:
> This is what you said Will McDonald
> > Hi all. Tried to send this mail yesterday and it appeared to bounce.
> > Apologies if this is a duplicate.
> >
> > I have a problem with a Client Run Before Job script to backup MySQL
> > databases which is only occurring when it's called by Bacula.
> >
> > On the Director I have:
> >
> > bacula   25352  0.0  0.4 39808 2168 ?        Ssl  09:20   0:00
> > /usr/sbin/bacula-sd -u bacula -g disk -v -c /etc/bacula/bacula-sd.conf
> > root     25357  0.0  0.3 18132 1848 ?        Ssl  09:20   0:00
> > /usr/sbin/bacula-fd -u root -g bacula -v -c /etc/bacula/bacula-fd.conf
> > bacula   25362  0.0  0.5 60420 2988 ?        Ssl  09:20   0:00
> > /usr/sbin/bacula-dir -u bacula -g bacula -v -c
> > /etc/bacula/bacula-dir.conf
> >
> > And the clients are:
> > root     14325  0.0  0.4 38976 2216 ?        Ssl  Mar28  13:31
> > /usr/sbin/bacula-fd -u root -g bacula -c /etc/bacula/bacula-fd.conf
> >
> > The script runs mysqlshow to build a list of available databases then
> > dumps them out to a standard location. It runs fine from the shell as
> > root on the client hosts themselves, when called during a backup
> > though I see the following:
> >
> > 06-Jun 10:56 archive: Start Backup JobId 1045,
> > Job=devmon1.2006-06-06_10.56.26
> > *messages
> > 06-Jun 10:56 devmon1: ClientRunBeforeJob: /usr/bin/mysqlshow: Access
> > denied for user 'root'@'localhost' (using password: NO)
> >
> > Again, running mysqlshow on a client from the shell as root works
> > perfectly:
>
> Looks like your are running the bacula program as the user bacula.  When
> you run your script as root and use root's home directory for your my.cnf
> file that will be different then your bacula user.  Plus some shells do
> not respect some of your dot files in a non-interactive shell, but I am
> not sure this is your problem.

The Bacula Director and Storage daemons are running as bacula on the
backup server. The Bacula File Daemon running on the clients is
running as use root, group bacula. As the script's running on the
client I'd have thought it'd execute as root, and it is.

> I am using,
> http://worldcommunity.com/opensource/utilities/mysql_backup.html, to
> backup my databases from Bacula Director (ClientRunBeforeJob).
>
> ClientRunBeforeJob= "/usr/local/bin/mysqlbackup/mysqlbackup.pl"
>
> This appears to work good for me.

Do you have passworded MySQL root user access? i.e. to you need to
supply "-p somepass" when connecting using the CLI?

Will.


_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to