Bacula 1.30 User's Guide | Chapter 3

The Current State of Bacula | Index | Installing Bacula

# Getting Started with Bacula

If you are like me, you want to get Bacula running immediately to get a feel for it, then later you want to go back and read about all the details. This chapter attempts to accomplish just that: get you going quickly without all the details. If you want to skip the section on Pools, Volumes and Labels, you can always come back to it, but please read to the end of this chapter, and in particular follow the instructions for testing your tape drive.

## Supported Operating Systems

- Linux systems (built and tested on RedHat 7.3).
- Solaris
- FreeBSD (tape driver supported in 1.30)
- Windows Client (File daemon) binaries
- OpenBSD client
- Irix File daemon (implemented but production testing not confirmed)
- Bacula is known to work on many other systems (Mandrake, AIX, Mac-Darwin, ...) but we do not have first hand knowledge of these systems.
- See the Porting Chapter of this manual for information on porting to other systems.

## System Requirements

- Bacula has been compiled and run on Linux RedHat, FreeBSD, and Solaris systems.
- It requires GNU C++ version 2.96 to compile. You can try with other compilers and other version, but you are on your own. (We have successfully compiled and briefly tested Bacula on RH8.0 with GCC 3.2, and several users report that it works fine. Note, in general GNU C++ is a separate package (e.g. RPM) from GNU C, so you need them both loaded. On RedHat systems, the C++ compiler is part of the gcc-c++ rpm package.
- There are certain third party packages that Bacula needs. Except for MySQL, they can all be found in the depkgs and depkgs1 releases.
- If you want to build the Win32 binaries, you will need the full Cygwin 1.3.20 release. Although all components build (console has some warnings), only the File daemon has been tested. Please note that if you attempt to build Bacula on any other version of Cygwin, particularly older versions or with GCC 3.2, you will be on your own.
- Bacula requires a good implementation of pthreads to work.
- The source code has been written with portability in mind and is mostly POSIX compatible. Thus porting to any POSIX compatible operating system should be relatively easy.
- The GNOME Console program is developed and tested under GNOME 1.4. It also compiles under GNOME 2.0 (Bacula version 1.30 on a RH 8.0 system), and appears to work fine, but more production testing is needed.

## Supported Tape Drives

It is very difficult to supply a list of supported tape drives, or drives that are known to work with Bacula because of limited feedback (so if you use Bacula on a different drive, please let us know). The following drives are known to work with Bacula:

- Sony DDS 2,3,4 drives
- HP DLT drives
- Compaq DDS 2,3,4 drives (probably OEMed)
- Exabyte drives (except for those 10 years old or older)
- HP Colorado T4000S (Travan-4) drives with Backward Space Record = No
- Ecrix VXA drives.
- Tandberg MLR3 on Linux
- Tandbert SLR6 on FreeBSD

Please check the btape section of this manual for procedures that you can use to verify if your tape drive will work with Bacula. Also there is a list of supported autochangers models in the autochangers chapter of this document, where you will find other tape drives that work with Bacula.

## Unsupported Tape Drives

The following drives are known either to not work or to have serious problems.

- All OnStream IDE-SCSI drives do not work
- OnStream SCSI drives are unlikely to work

QIC tapes are known to have a number of particularities (fixed block size, and one EOF rather than two to terminate the tape). As a consequence, you will need to take a lot of care in configuring them to make them work correctly with Bacula.

## Up Front Decisions

- Before building Bacula you need to decide if you want to use SQLite or MySQL. Unless you are already familiar with MySQL, we suggest that you use the SQLite database as it is the simplest. If you need security or have a large operation, you should consider the MySQL database because it provides all the Bacula features and is the best tested. MySQL is also much easier to upgrade than SQLite when new versions of Bacula require a database update.
- If you wish to use SQLite as the Bacula catalog, please see Installing and Configuring SQLite chapter of this manual.
- If you wish to use MySQL as the Bacula catalog, please see the Installing and Configuring MySQL chapter of this manual.
- At this point, you should have Bacula built and installed. If not, please follow the instructions in the Bacula Installation Chapter of this manual.

## Installing Bacula

Before setting up your configuration files, you will want to install Bacula in its final location. Simply enter:

    make install

If you have previously installed Bacula, the old binaries will be overwritten, but the old configuration files will remain unchanged, and the "new" configuration files will be appended with a .new. Generally if you have previously installed and run Bacula you will want to discard or ignore the configuration files with the appended .new. For the details of doing the install, please see the Installing Bacula chapter of this manual.

## Understanding Pools, Volumes and Labels

If you have been using a program such as tar to backup your system, Pools, Volumes, and labeling may be a bit confusing at first. A Volume is a single physical tape (or possibly a single file) on which Bacula will write your backup data. Pools group together Volumes so that a backup is not restricted to the length of a single Volume (tape). Consequently, rather than explicitly naming Volumes in your Job, you specify a Pool, and Bacula will select the next appendable Volume from the Pool and request you to mount it.

Although the basic Pool options are specified in the Director's Pool resource, the real Pool is maintained in the Bacula Catalog. It contains information taken from the Pool resource (bacula-dir.conf) as well as information on all the Volumes that have been added to the Pool. Adding Volumes to a Pool is usually done manually with the Console program using the label command.

For each Volume, Bacula maintains a fair amount of catalog information such as the first write date/time, the last write date/time, the number of files on the Volume, the number of bytes on the Volume, the number of Mounts, etc.

Before Bacula will read or write a Volume, the physical Volume must have a Bacula software label so that Bacula can be sure the correct Volume is mounted. This is usually done using the label command in the Console program.

The steps for creating a Pool, adding Volumes to it, and writing software labels to the Volumes, may seem tedious at first, but in fact, they are quite simple to do, and they allow you to use multiple Volumes (rather than being limited to the size of a single tape). Pools also give you significant flexibility in your backup process. For example, you can have a "Daily" Pool of Volumes for Incremental backups and a "Weekly" Pool of Volumes for Full backups. By specifying the appropriate Pool in the daily and weekly backup Jobs, you thereby insure that no daily Job ever writes to a Volume in the Weekly Pool and vise versa, and Bacula will tell you want tape is needed and when.

For more on Pools, see the Pool Resource section of the Director Configuration chapter, or simply read on, and we will come back to this subject later.

## Setting Up Bacula Configuration Files

After running the appropriate ./configure command and doing a make, and a make install, if this is the first time you are running Bacula, you must create valid configuration files for the Director, the File daemon, the Storage daemon, and the Console programs. If you have followed our recommendations, default configuration files as well as the daemon binaries will be located in your installation directory. In any case, the binaries are found in the directory you specified on the --sbindir option to the ./configure command, and the configuration files are found in the directory you specified on the --sysconfdir option.

When initially setting up Bacula you will need to invest a bit of time in modifying the default configuration files to suit your environment. This may entail starting and stopping Bacula a number of times until you get everything right. Please do not despair. Once you have created your configuration files, you will rarely need to change them nor will you stop and start Bacula very often. Most of the work will simply be in changing the tape when it is full.

### Configuring the Console Program

The Console configuration file is found in the directory specified on the --sysconfdir option that you specified on the ./configure command and by default is named console.conf. Normally, for first time users, no change is needed to this file. Reasonable defaults are set.

### Configuring the File daemon

The File daemon configuration file is found in the directory specified on the --sysconfdir option that you specified on the ./configure command. By default, the File daemon's configuration file is named bacula-fd.conf. Normally, for first time users, no change is needed to this file. Reasonable defaults are set. However, if you are going to back up more than one machine, you will need to install the File daemon with a unique configuration file on each machine to be backed up. The information about each File daemon must appear in the Director's configuration file.

### Configuring the Director

The Director configuration file is found in the directory specified on the --sysconfdir option that you specified on the ./configure command. Normally the Director's configuration file is named bacula-dir.conf.

In general, the only change you must make is modify the FileSet resource so that the Include configuration directive contains at least one line with a valid name of a directory (or file) to be saved.

If you do not have a DLT tape drive, you will probably want to edit the Storage resource to contain names that are more representative of your actual storage device. You can always use the existing names as you are free to arbitrarily assign them, but they must agree with the corresponding names in the Storage daemon's configuration file.

You may also want to change the email address for notification from the default root to your email address.

Finally, if you have multiple systems to be backed up, you will need a separate File daemon or Client specification for each system, specifying its name, address, and password. We have found that giving your daemons the same name as your system but post fixed with -fd helps a lot in debugging. That is, if your system name is foobaz, you would give the File daemon the name foobaz-fd. For the Director, you might use foobaz-dir, and for the storage daemon, you might use foobaz-sd.

### Configuring the Storage daemon

The Storage daemon's configuration file is found in the directory specified on the --sysconfdir option that you specified on the ./configure command. By default, the Storage daemon's file is named bacula-sd.conf. Edit this file to contain the correct Archive device names for any tape devices that you have. If the configuration process properly detected your system, they will already be correctly set. These Storage resource name and Media Type must be the same as the corresponding ones in the Director's configuration file bacula-dir.conf.

## Testing your Configuration Files

You can test if your configuration file is syntactically correct by running the appropriate daemon with the -t option. The daemon will process the configuration file and print any error messages then terminate. For example, assuming you have installed your binaries and configuration files in the same directory.

    cd <installation-directory>
    ./bacula-dir -t -c bacula-dir.conf
    ./bacula-fd -t -c bacula-fd.conf
    ./bacula-sd -t -c bacula-sd.conf
    ./console -t -c console.conf

will test the configuration files of each of the main programs. If the configuration file is OK, the program will terminate without printing anything.

## Testing Bacula Compatibility with Your Tape Drive

Before spending a lot of time on Bacula only to find that it doesn't work with your tape drive, please read the btape -- Testing Your Tape Drive chapter of this manual. If you have a modern standard SCSI tape drive on a Linux or Solaris, most likely it will work, but better test than be sorry. For FreeBSD (and probably other xBSD flavors), reading the above mentioned tape testing chapter is a must.

## Running Bacula

Please see the Running Bacula Chapter of this manual for detailed instructions on how to run Bacula

## Log Rotation

If you use the default bacula-dir.conf or some variation of it, you will note that it logs all the Bacula output to a file. To avoid that this file grows without limit, we recommend that you copy the file logrotate from the scripts/logrotate to /etc/logrotate.d/bacula. This will cause the log file to be rotated once a month and kept for a maximum of 5 months. You may want to edit this file to change the default log rotation preferences.

## Disaster Recovery

If you intend to use Bacula as a disaster recovery tool rather than simply a program to restore lost or damaged files, you will want to read the Disaster Recovery Using Bacula Chapter of this manual.

In any case, you are strongly urged to carefully test restoring some files that you have saved rather than wait until disaster strikes. This way, you will be prepared.

The Current State of Bacula | Index | Installing Bacula

Bacula 1.30 User's Guide The Network Backup Solution | Copyright © 2000-2003 Kern Sibbald and John Walker