April 16, 2014
 
 
RSSRSS feed

Bacula: Robust, Reliable Enterprise Backup and Recovery, part 1

It comes by night and sucks the vital essence from your computers

  • November 18, 2008
  • By Deann Corum

Deann CorumIf you're looking for a darned good open-source backup solution, this may be your lucky day for an interview with this data-sucking vampire. For tape backup and even disk-to-disk backup, Bacula is one of the more popular and well-maintained open source applications out there. In this first of two parts, we'll give an overview of how to get started with Bacula, look at different pieces that make up Bacula and look at setup and configuration basics. This isn't meant to be a comprehensive guide, but should give an overview for those who haven't waded through the copious and excellent online documentation for Bacula.

Basic Bacula Components and Services

The three major services Bacula uses are the storage director (bacula-sd), the file director (bacula-fd) and the director itself (bacula-dir). The storage director facilitates the storage and recovery of data and attributes to physical media. The file director is the client piece which is installed on the machine to be backed up, and the bacula director is the manager and coordinator of all backup job activities. You'll use the Bacula director (bacula-dir) to configure storage pools, jobs and to automate and schedule backups and the Bacula console (bconsole) to interface with and control it all.

The repository for all this media, file and job data is the Bacula catalog. Yes, it requires a database, and that means you will have to install and maintain either a MySQL, PostgreSQL or SQLite database to use Bacula.

Preliminaries and SQL Installation Phase I

Depending on your operating system, some preliminary steps may be necessary. If your operating system doesn't include mtx (most modern ones do) or you intend to use SQLite, the easiest thing to to is download the depkgs then create a /bacula directory where you will untar the bacula and depkgs source code. Untar depkgs into that directory and run:

make sqlite
make mtx

Since MySQL seems to be the most commonly used database with Bacula, we'll zero in on installation of that particular database for now. With MySQL, be sure to get the mysql-devel and libz-devel packages to get the SQL header files Bacula requires, and the gzip compression libraries for mysqlclient. If you're installing MySQL by .rpm, you'll need the following:

mysql-.rpm  
mysql-server-.rpm  
mysql-devel-.rpm

If installing from source, untar the files, then from the directory you placed the source code in, you will run:

./configure --enable-thread-safe-client --prefix=mysql-directory

where you replace mysql-directory with the directory where you want to install mysql. Normally for system-wide use this is /usr/local/mysql. Run make and make install and finally, run:

./scripts/mysql_install_db

This creates the SQL databases for controlling user access.

Sitemap | Contact Us