Andre,

in your bacula-dir.conf (or in a file referenced from it) file you will find:

Catalog {
 Name = <CATALOG_NAME>
 DB Address = <DB_SERVER_ADDRESS>
 DB Port = <DB_PORT>
 dbname = <DB_NAME>
 user = <DB_USER_NAME>
 password = "<DB_PASSWORD>"
}


Change that to the configuration information for your new database server and instance.





I also had to make changed to the catalog backup script: <INSTALL_DIR>/etc/make_catalog_backup
Here is the script in its entirety:
###############################################
#!/bin/sh
#
# This script dumps your Bacula catalog in ASCII format
# It works for MySQL, SQLite, and PostgreSQL
#
#  $1 is the name of the database to be backed up and the name
#     of the output file (default = bacula).
#  $2 is the user name with which to access the database
#     (default = bacula).
#  $3 is the password of the bacula database user
#  $4 is the hostname of the database server
#  $5 is the port on the database server

#-------------------------------------------
# check that all of the arguments are there:
#-------------------------------------------
if [ $# != "5" ];then
echo "Usage: $0 <database> <username> <password> <hostname> <db_port_number>"
       exit 1
fi

#-------------------------------------------
# change to the backup directory:
#-------------------------------------------
cd /usr/local/bacula_knightworks/var/bacula/working

#-------------------------------------------
# remove the previous catalog dump:
#-------------------------------------------
if [ -f ${1}.sql ]; then
       rm -f ${1}.sql
fi

#-------------------------------------------
# do the backup:
#-------------------------------------------
if test xsqlite = xmysql ; then
 echo ".dump" | /usr/bin/sqlite $1.db >$1.sql
else
 if test xmysql = xmysql ; then
/usr/bin/mysqldump -h $4 -u $2 --port=$5 --password=$3 -f --opt $1 >$1.sql
 else
   /usr/bin/pg_dump -U $2 $1 >$1.sql
 fi
fi
########################################################



For this to work, you need to change your catalog backup RunBeforeJob settings: RunBeforeJob = "/<INSTALL_DIR>/etc/make_catalog_backup <database> <username> <password> <hostname> <db_port_number>"


-Jeff Humes



Larose, Andre wrote:

Hi,

I am in the process of replacing two old Bacula servers.

The new servers will also have a common MYSQL database server.

How do I configure Bacula to connect to a remote MYSQL server and use a different database name.

I.E. Bacula server1 would connect to MYSQL server and use BACULA1 db with user bacula1 and password pass1

And

Bacula server2 would connect to MYSQL server and use BACULA2 db with user bacula2 and password pass2

Thank you for your help.

André Larose

[EMAIL PROTECTED]

------------------------------------------------------------------------

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
------------------------------------------------------------------------

_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to