Bacula setup is a client-server backup system that can be used to recover data from your computer. This open-source program supports all major operating systems, including Windows, macOS, and Windows. It also supports a wide range of backup devices.
Before we get into the installation, let’s take a look at some of the prerequisites and components.
Bacula Server Components
It is divided into two parts: bacula server and bacula clients. The Bacula Server (also known as the Backup server) further subdivides into three core components. These are:
Bacula Directory
It manages and restores server operations. You can interact with the Bacula Directory using the Bacula Console.
Bacula Storage Daemon – SD
It can read and write to the storage devices.
Bacula Catalog
It backs up the database files. Bacula can work with SQL databases like PostgreSQL and MySQL.
The Bacula Client is the second. It is the server that needs to be backed up. It has a File Daemon (FD) component that allows you to access the server’s data.
Bacula Setup Requirements
This demonstration uses a MySQL database with Ubuntu 20.04. You must ensure that there is enough disk storage available for the server to start backups. You will need 2GB RAM.
Steps to Bacula Setup
Step 1: Install MySQL
Start by running the following:
Wait for the packages updates to complete, then run MySQL Server by running
The computer will ask you to enter the password for the MySQL database administrator user. You will need to confirm your password and keep it safe for Bacula installation.
Step 2: Install Bacula
By default, Ubuntu 20.04 contains the Bacula package. These commands are available:
You will need to configure Postfix while installing Bacula
Select “Internet Site” from the “General Type of Mail Configuration”. Next, enter your FQDN (or hostname) for your server.
If prompted for ‘Configure database for bacula-director-MySQL with dbconfig-common?’ Enter “Yes.” For ‘Password of the database’s administrative user,’ key in the MySQL root password you created during MySQL installation.
Lastly, enter and confirm a new password for ‘MySQL application password for bacula-director-myself or generate a random password by leaving the prompt blank. In preparation for the catalog backup job, you can update the Bacula script permissions.
Configure Bacula Storage
Next, create a backup directory after installing the Bacula client and server. Run
Next, modify the directory’s owner and grant it bacula user, group, and permissions. Run the following command to do this:
Next, edit the Bacula configuration and default storage file to define the storage location and device.
You can also use vi instead of nano.
By running, you can comment on other “Devices”.
Close the file, save the changes, and then start the storage again by running.
Configure Backup Director
Next, edit the Bacula configuration file and then specify the storage location. This command will be executed:
Next, configure files and local storage. File set. Local jobs are as follows:
Check for backup
Once you’ve installed and configured Bacula for daily running at 5:00 every day, go ahead.
You will receive an output indicating that Director localhost has been connected. You can also start the backup by running
When prompted, choose option 2 (LocalBackup), and hit enter to start a backup job.
Type
Once everything is confirmed to be working properly, exit the console and run
The bacula setup has been completed.
Conclusion
Once you have access to an SQL database and an operating system that has enough disk space for backup, you are ready to proceed with the Bacula setup. After performing preliminary updates, you will need to install the MySQL database.
Next, install Bacula, paying particular attention to file sets and backups, storage, and file sets. Finally, verify that everything is working properly and exit the system.