= 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 [[BR]] '''Storage Daemon (SD):''' Software that performs reads and writes on the storage devices used for backups[[BR]] '''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[[BR]] '''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 }}} == 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 }}}