Bacula for Linux

Detailed guide for setting up Bacula backup on your Linux server.


Log in to your server via SSH. To install the packages required for Bacula to work, you need to log in as root.

Run this command to install the Bacula software (note that the exact command may vary depending on which Linux distribution you are using):

Command
apt-get install bacula-client

Open the file /etc/bacula/bacula-fd.conf and replace the existing content with the configuration shown below.

If your server is placed in Stockholm:

/etc/bacula/bacula-fd.conf
Director {
        Name = bacula02-fbg-fd
        Password = "YourPasswordGoesHere"
}  
FileDaemon {
        Name = ds*****
        FDport = 9102
        FDAddress = 0.0.0.0
        WorkingDirectory = /var/lib/bacula
        Pid Directory = /var/run/bacula
        Maximum Concurrent Jobs = 20
}  
Director {
        Name = bacula02-fbg-mon
        Password = "LkRjyq760wGbAXeah4ofS55bG41q4p"
        Monitor = yes
}  
Messages {
        Name = "Standard"
        director = bacula02-fbg-dir = all, !skipped
}

If your server is placed in Falkenberg:

Replace YourPasswordGoesHere with a password you choose. Also, change ds****-fd to your server’s name, e.g., ds1234-fd.

Bacula requires the directories /var/lib/bacula and /var/run/bacula to exist (unless you have specified different paths in your configuration).

If they were not created during installation, create them with:

Then, restart Bacula by using the command:

Enter your password in the form at https://secrets.glesys.com/ and send the link together with a list of the directories you want to back up to [email protected]. Preferably in the format shown below:

Keep in mind that if you are using a firewall to protect your server, you need to allow traffic from Bacula; the iptables rules are listed below:

MySQL backup with Bacula

Backups with Bacula operate at the file level and read data directly from disk. For MySQL, it isn’t always guaranteed that all data has been flushed to disk, and restoring MySQL’s raw data files doesn’t always work. Therefore, we recommend dumping the database to SQL files at regular intervals.

Example script for dumping data in MySQL:

This script could be scheduled in crontab with the following entry to save the database to a file every day at 22:00.

Last updated

Was this helpful?