Bacula Overview
From Chaos
Contents |
Summary
This is a simple How-To for setting up bacula. Bacula is a cross-platform backup and archive program that runs on many platforms.
Getting Ready
- Please install the bacula port from /usr/ports/sysutils/bacula-server.
- You will also need MySQL installed and configured.
Bacula Overview
The easiest way to get a picture of how Bacula works is below. The director, (dir), controls n number of clients (fd), and n number of storage daemons, (sd):
However, because Bacula is so complex, this is probably a bit more accurate in terms of a general setup:
Director Daemon
- The director daemon (dir) has 9 main definitions (10 if you include MySQL).
- Director (Definition of itself).
- Job (This is what defines the actual backup job that is run).
- FileSet (What files to include/exclude when running the job).
- Schedule (When and how often the Job should be run).
- Client (Where the Job is going to be run).
- Storage (Where the backup data from the Job is actually stored).
- Messages (How the operator is notified of a Job's status/errors).
- Console (How the bacula console program can connect to the director to perform maintenance tasks like restore, running jobs immediately, labelling volumes, etc).
- Pool (How the various volumes are labaled/allocated within the Storage Daemon).
- MySQL (Indexing service that makes it easy to restore large amounts of data quickly by having the ability to search for various files/directories that you may want to restore).
Storage Daemon
- The storage daemon (sd) has only 4 main definitions.
- Storage (Definition of itself).
- Director (Which director(s) can communicate with this storage daemon).
- Device (The actual device where files are stored (hard drive, tape, etc.)).
- Messages (What messages are sent to the director when there are errors or status updates).
Client Daemon
- The client daemon (fd) has 3 main definitions.
- Director (Which director(s) can communicate with this client daemon).
- FileDaemon (So the director knows which FD to communicate with).
- Messages (What messages are sent to the director when there are errors or status updates).
Set up Bacula
In the above diagram, I laid out the options that I am using for my specific setup. Please note that your setup may differ, and you might need to make changes to your config. For instance, I use Hard Drives to backup all of my data, I don't have any tape drives.
- The director config (dir) is by far the hardest config file to setup. I hope that with the diagram above, the steps below, and the Bacula Documentation, that you gain some concept of how bacula organizes itself.
- The storage config (sd) is the second hardest to configure, but should be much easier than the director. Keep in mind that labelling your volumes isn't automatic, and you must tell the director to do this.
- The client config (fd) is probably the easiest. As long as you are running the client as root, you should have free access to the entire filesystem, and backing up is as easy as adding/removing files/directories to the 'FileSet' definition in the Director.
