-- 

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:
>
> [EMAIL PROTECTED] scripts]# cat /etc/redhat-release; rpm -qa | grep
> bacula; ps aux | grep [b]acula
> CentOS release 4.3 (Final)
> bacula-mysql-1.38.5-4
> bacula-mtx-1.38.5-4
> 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:
>
> [EMAIL PROTECTED] scripts]# cat /etc/redhat-release; rpm -qa | grep
> bacula; ps aux | grep [b]acula
> CentOS release 4.3 (Final)
> bacula-client-1.38.5-4
> 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.

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.


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

Reply via email to