Bacula – a set of client-server programs for managing backups.
It consists of the components of Director Daemon (DD), Storage Daemon (SD), File Daemon (FD) and Bacula Console (BC).
To install in Ubuntu/Debian, perform:
sudo apt-get install bacula
During the installation process, the MySQL user’s root password will be requested and a database created, and Postfix installed.
Create directories and set permissions:
sudo mkdir -p /bacula/backup /bacula/restore sudo chown -R bacula:bacula /bacula sudo chmod -R 700 /bacula
Open the configuration file DD, for example, in the text editor nano:
sudo nano /etc/bacula/bacula-dir.conf
Let’s find “Standard Restore template” and there where “Where” we change the path:
Job { Name = "RestoreFiles" Type = Restore Client=Blank-fd FileSet="Full Set" Storage = File Pool = Default Messages = Standard Where = /bacula/restore }
Further we find “List of files to be backed up” and a little bit lower where “File =” we specify that it is necessary to copy in a backup copy.
Unnecessary directories can be deleted by adding for example:
Exclude { File = /bacula File = /proc File = /tmp }
Open the configuration file SD:
sudo nano /etc/bacula/bacula-sd.conf
Let’s find “Devices supported by this Storage daemon” and specify in “Archive Device =” where to store backup copies, for example:
Archive Device = /bacula/backup
We test the correctness of the configuration:
sudo bacula-dir -tc /etc/bacula/bacula-dir.conf sudo bacula-sd -tc /etc/bacula/bacula-sd.conf
If the command did not say anything, then everything is fine and there are no errors.
Restart bacula services to apply configuration changes:
sudo service bacula-sd restart sudo service bacula-director restart
Let’s check if all three services are running:
netstat -nlpt | grep [b]acula
Open the console bacula:
sudo bconsole
Check status:
status
We type the command:
label
and specify the name of the backup, then specify 2 that this file.
Run our configured backup process (select 1 and yes):
run
View successful completion messages:
messages
Leave the console bacula:
quit
A backup file should appear in the /bacula/backup directory.
See also:
How to install Bacula-web