#670 Issue closed: rear mkbackup with multiple bacula dir

Labels: enhancement, waiting for info, needs sponsorship

Kamoul opened issue at 2015-10-19 15:45:

Hello
when we have a multiple bacula dir defined in the bconsole.conf the rear mkbackp is not working.
trace:

rear -v mkbackup
Relax-and-Recover 1.17.1 / Git
Using log file: /var/log/rear/rear-XXXX0908.log
ERROR: Bacula director not reachable.
Aborting due to an error, check /var/log/rear/rear-XXXX0908.log for details
Terminated

bconsole.conf:

Director {
  Name = XXXX0908-dir
  DIRport = 9101
  Password = "............." # not my password 
  Address = 192.168.10.08
}
Director {
  Name = XXXX0907-dir
  DIRport = 9101
  Password = "............." # not my password 
  Address = 192.168.10.07
}

How to fix this issue:
edit 50_check_BACULA_bconsole_results.sh
vi /usr/share/rear/prep/BACULA/default/50_check_BACULA_bconsole_results.sh
and replace the lline 15
by this part:

#Fix a multi director defined in the console
#by specifying the BACULA_DIRECTOR in the rear local configuration file
if [ "x${BACULA_DIRECTOR}" == "x" ]
then
 BACULA_DIRECTOR=$(grep -i address /etc/bacula/bconsole.conf | awk '{ print $3 }')
fi

and also replace the line 36 by the following part:

#Fix a multi director defined in the console
#by specifing the BACULA_DIR_NAME in the rear local configuration file

if [ "x${BACULA_DIR_NAME}" == "x" ]
then
  BACULA_RESULT=( `echo -e " status client=${BACULA_CLIENT}-fd" | bconsole |grep Connect ` )
else
  BACULA_RESULT=( `echo -e " status client=${BACULA_CLIENT}-fd" | bconsole -D ${BACULA_DIR_NAME} |grep Connect ` )
fi

and add your definitions in the /etc/rear/local.conf

BACULA_DIR_NAME=XXXX0907-dir
BACULA_DIRECTOR=192.168.10.07

this is useful when you have tow bacula servers and each server backup another one

Kamoul

gdha commented at 2015-11-18 13:17:

@Kamoul makes sense. Why not create a pull request?

gdha commented at 2015-12-10 07:06:

@Kamoul It seems that we need to add new variable definitions in conf/default.conf:
BACULA_DIR_NAME= and BACULA_DIRECTOR= with some explanation.
Are you able to prepare a pull request?

Kamoul commented at 2015-12-10 07:45:

Hello
Ok i Will do the request

Envoyé de mon iPhone

Le 10 déc. 2015 à 08:06, gdha notifications@github.com a écrit :

@Kamoul It seems that we need to add new variable definitions in conf/default.conf:
BACULA_DIR_NAME= and BACULA_DIRECTOR= with some explanation.
Are you able to prepare a pull request?


Reply to this email directly or view it on GitHub.

gdha commented at 2017-10-03 15:37:

@Kamoul not sure if this is still relevant? Or shall we close the issue?

gdha commented at 2018-01-12 08:05:

no response -> no interest anymore? We close this issue for now


[Export of Github issue for rear/rear.]