wiki:Csle2022/Agenda/bacula

Version 7 (modified by geethike, 19 months ago) ( diff )

--

Bacula Lab

In this lab, you will backup and restore files using a Bacula. For this practical we need 2 Machines, Bacula Server and a Bacula Client. Download Bacula_VM from below link. We will use Existing Machine from previous sessions of this workshop as client.

Install Bacula Server in Bacula_VM

A Bacula server, which we will also refer to as the “backup server”, has these components:

Bacula Director (DIR): Software that controls the backup and restore operations that are performed by the File and Storage daemons

Storage Daemon (SD): Software that performs reads and writes on the storage devices used for backups

Catalog: Services that maintain a database of files that are backed up. The database is stored in an SQL database such as MySQL or PostgreSQL

Bacula Console: A command-line interface that allows the backup administrator to interact with, and control, Bacula Director

Install postgresql Database

sudo apt-get update -y
sudo apt install postgresql

Install Bacula

sudo apt-get install bacula -y

While installing Bacula, you will be asked to configure Postfix.Pick "No configuration" under 'General Type of Mail Configuration.

If prompted for 'Configure database for bacula-director-postgresql with dbconfig-common?' Enter "Yes." For 'Password of the database's administrative user,set the password as 1234.

Create Backup Directory and assign permission

sudo mkdir -p /bacula/backup 
sudo chown -R bacula:bacula /bacula
sudo chmod -R 700 /bacula

Install Bacula Client in Client Machine

A Bacula client, i.e. a server that will be backed up, runs the File Daemon (FD) component. The File Daemon is software that provides the Bacula server (the Director, specifically) access to the data that will be backed up. We will also refer to these servers as “backup clients” or “clients”.

Install and Configure Bacula Client

sudo apt-get update
sudo apt-get install bacula-client

you can verify your installation by executing

sudo systemctl status bacula-fd

if the service is not running

sudo systemctl start bacula-fd
sudo systemctl enable bacula-fd

Configure Client

Before configuring the client File Daemon, you will want to look up the following information, which will be used throughout the remainder of this practical:

Client hostname: Our example will use “ClientHost

Client Private FQDN: We’ll refer to this as “client_private_FQDN”, which may look like clienthost.private.example.com or private IP address

Bacula Server hostname: Our example will use “BackupServer

Note:-Your actual setup will vary from the example, so be sure to make substitutions where appropriate.

Open the File Daemon configuration:

sudo vi /etc/bacula/bacula-fd.conf

We need to change a few items and save some information that we will need for our server configuration.

change the “Name” parameter to the hostname of your backup server followed by “-dir”.

Director {
  Name = BackupServer-dir
  Password = "IrIK4BHRA2o5JUvw2C_YNmBX_70oqfaUi"
}

You also need to copy the Password, which is the automatically generated password used for connections to File Daemon, and save it for future reference. This will be used in the Backup Server’s Director configuration, which we will set in an upcoming step, to connect to your Client’s File Daemon.

Configure Bacula Director

Bacula has several components that must be configured independently in order to function correctly. The configuration files can all be found in the /etc/bacula directory.

We’ll start with the Bacula Director.

Open the Bacula Director configuration file in your favorite text editor. We’ll use vi:

sudo vi /etc/bacula/bacula-dir.conf

Attachments (19)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.