Instalar Bacula no CentOS 6

Installing Bacula 5.2.6 with webmin on Centos 6.2
If you are looking for a free open source network backup solution, Bacula is your answer.
It’s a network Client/Server based backup program that has many benefits.
To list a few:
Cross- platform (I installed clients on different OS’s, Centos, Ubuntu, Mac OS X, Win7, WinXP, Win Vista, Solaris)
Totally free (It’s main advantage over Amanda is that all the clients are for free and so is the GUI)
Relatively easy to install and manage.
In addition to many backup features such as: Schedules, Data & Communication encryption, Data compression, many backup levels, open files backup…
Detailed info can be found on the Project’s official website:

Installation on Centos 6.2:

The installation on Bacula is relatively easy for the Linux experienced user.

First we need to install the C and C++ compiler. As a root user:

#yum install gcc gcc-c++ autoconf automake

Bacula supports many databases engines, i will be using MySQL:
Install MySQL
#yum install mysql-server mysql mysql-devel php-mysql
Start MySQL
#service mysqld start
Set the MySQL root user password: (replace the password between brackets)
>use mysql;
>UPDATE user SET Password=PASSWORD(‘password’) WHERE user=’root’;
>flush privileges;

Installing Bacula:

#tar -xvzf bacula-5.2.6.tar.gz
#cd bacula-5.2.6
# CFLAGS=”-g -Wall” ./configure \
–prefix=/usr \
–sbindir=/usr/sbin \
–sysconfdir=/etc/bacula \
–with-scriptdir=/etc/bacula \
–enable-smartalloc \
–with-mysql \
–with-openssl \
–with-working-dir=/var/bacula \
–with-pid-dir=/var/run \
–enable-batch-insert \
–enable-tray-monitor \
#make install

Create the Bacula MySQL Database and Tables:

#/etc/bacula/create_mysql_database -u root -p
#/etc/bacula/make_mysql_tables -u root -p
#/etc/bacula/grant_mysql_privileges -u root -p
#/etc/bacula/grant_bacula_privileges -u root -p

Set the MySQL Bacula user bacula password:

#mysql -u root -p
>UPDATE mysql.user SET Password=PASSWORD(‘password’) WHERE user=’bacula’;
>flush privileges;

Configure Bacula:

#cd /etc/bacula
#vi bacula-dir.conf
Change the Director password, the Client password, the Storage password, insert the MySQL bacula user password under Catalog dbpassword = “password” and the Console password.

#vi bacula-sd.conf
Change the bacula-dir and bacula-mon password to the ones supplied in the bacula-dir.conf, and the Archive Device under Device to whatever location on your server you want to backup up on, e.g Archive Device = /backup and later create that directory and grant it the privileges:
#mkdir /backup
#chown bacula /backup

#vi bacula-fd.conf
Change the bacula-dir and bacula-mon passwords.

#vi bconsole.conf
Change the bacula-dir password

Start Bacula:
#cd /etc/bacula
#./bacula start

If iptables is turned on, it will be blocking the ports 9101, 9102 and 9103 that Bacula needs to communicate with its different components.
You can either turn off iptables #/etc/init.d/iptables stop or create rules to allow the above ports.

You can manage bacula from its console:
Connecting to Director bacula:9101
1000 OK: bacula-dir Version: 5.2.6 (21 February 2012)
Enter a period to cancel a command.

For more information about the Bacula Console commands check the documentation on the website.


Managing bacula from a GUI interface can be done with webmin. Webmin a web-based interface for system administration for *nix.

Installing webmin:

#cat > /etc/yum.repos.d/webmin.repo << EOF > [Webmin]
> name=Webmin Distribution Neutral
> #baseurl=
> mirrorlist=
> enabled=1

#rpm –import
#yum install webmin

After its installed, you can access it from your browser by going to http://youripaddress:10000 and login with your server root user credentials.

Note: if iptables is on, either turn it off or allow port 10000.

You will find Bacula Backup System under System on the left. When you access it for the first time, it will fait to connect to the database, click on module configuration and under Bacula Database Settings chose MySQL and set the MySQL root password and finally Save.

Now you need to understand how the Pools, Volumes, Devices and Storage Daemons work together in order to properly set it up.

Clients Installation:

I will be updating this post later on client installation on different OSs, for now i have successfully installed and backed up: Windows XP, Windows Vista, Windows 7, CentOS, Ubuntu, Solaris, Mac OS X.

Contact me for any further related configuration and questions.




Deixe uma resposta

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *