Step 1:Edit Director Section of “bacula-dir.conf” file and Change Director Name and Password of your choice as i mentioned below:
# vim /etc/bacula/bacula-dir.conf
Step 2:Edit Catalog Section of bacula-dir.conf file and Change dbuser as bacula and dbpassword as redhat:
Step 3:Create Client {…} section in bacula-dir.conf file for client (192.168.0.151):
Name: this Client {…} section defines the client, so name it client.
Address: the IP address of the client.
Password: password specific for client and must match the password specified in bacula-fd.conf Director {…} section on the client server.
Step 4:Create Client {…} section in bacula-dir.conf file for window pc (192.168.0.100):
Step5:Edit Storage {…} section in bacula-dir.conf file:
Name: we are going to use 2 devices (disks) for backup, so I like the name of this section to represent the disk number of the device, this section is going to point to filestorage having name file and filestorage2 is having name file2.
Address: ip address of the pc which is having storage available.
SDPort: the port on which to connect the Storage Daemon.
Password: this password should match the bacula-sd.conf Director {…} section.
Media Type: Bacula supports many different media types, eg. DDS-4 tapes, DVDs etc. We are using files to store the backup data, so we specify the Media Type = File.
Step 6:create new Pools in Pool {…} section in bacula-dir.conf:
Step 7:Open bconsole.conf file and edit bconsole.conf Director Section on bacula server:
# vim /etc/bacula/bconsole.conf
Name: Here you must use the same name you gave the bacula-dir.conf Director {} section (there the Director defines itself).
DIRport: The port on which the Console will contact the Director.
Address: the address on which the Director run
Password: the password should match the password in the bacula-dir Director {} section.
Edit name, address and password. It should be same as mentioned in bacula-dir.conf file.
Step 8:Create the backup folders:
I am configuring storage on the same machine which i used for bacula server.So, storage and bacula server is on same PC.
# mkdir /backup1
# mkdir /backup2
#chown -R bacula:bacula /backup1
#chown -R bacula:bacula /backup2
#chmod -R 700 /backup1
#chmod -R 700 /backup2
Step 9:Now,Open bacula-sd.conf file and edit storage Section:
# vim /etc/bacula/bacula-sd.conf
Name: This same name is also in the bacula-dir.conf Storage {…} section.
SDPort: The port on which this Storage daemon will listen (and therefore the port on which the Director must contact this Storage daemon).
SDAdress: mention IP of the storage server.
Now, Edit Director Section in bacula-sd.conf file:
Name: the name of the Director that can administer this Storage daemon.
Password: the password that the Director must use to administer this Storage daemon. This same password is also in the bacula-dir.conf Storage {…} section.
Now, Edit device Section in bacula-sd.conf file:
Name: this will specify a disk device to use for storage.
Archive Device: here you specify the mount point of the actual device (the actual hard drive I want to use is mounted as /bacula/backup1). You can also use just a folder to store your backup, it does not need to be a fresh disk.
Step 10:Edit message Section in bacula-sd.conf file:
Change to correct Director Name, in our case its kvit-dir. This section Send all messages to the Director, mount messages also are sent to the email address.
Now, start Bacula and Mysql services:
# service bacula-dir start
# service bacula-sd start
# chkconfig bacula-dir on
# chkconfig bacula-sd on
# service mysqld start
# chkconfig mysqld on