Bacula Backup Client – Part 2


In previous post we have seen how to setup the bacula backup server. Now we need to test to take the backup of the one linux server.

File Daemon server:
Hostname: client.lguru.local
IPAddress: 192.168.1.174
OS: CentOS 6.9

Step 1: Install bacula backup agent packages

[root@client ~]# yum -y install bacula-client bacula-console

Step 2: Configure File daemon

[root@client ~]# vi /etc/bacula/bacula-fd.conf
Director {
Name = bacula-dir
Password = "password" # Give Director Daemon password in line 15
}
# line 22-26: delete them
#Director {
# Name = bacula-mon
# Password = "@@MON_FD_PASSWORD@@"
# Monitor = no
#}

Step 3: Start the bacula client service

[root@client ~]# /etc/init.d/bacula-fd start
Starting bacula-fd: Error: Default password in config [FAILED]

If you get above error after step 2 then follow the below changes

[root@client ~]# vi /etc/init.d/bacula-fd

#Comment out the Line 36-46
#checkconf() {
# Check if we still have our @@PLACEHOLDERS@@ in the config.
# If yes, refuse to start, the user has never touched the config.
# grep -q '_PASSWORD@@' $CONFIG
# if [ $? -eq 0 ]; then
# echo -n "Error: Default password in config"
# echo_failure
# echo
# exit 6
# fi
#}

# Comment out Line no 53

start() {
[ "$EUID" != "0" ] && exit 4


echo -n "Starting $prog: "
# checkconf
daemon $prog $OPTS
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
return $RETVAL
}

[root@client ~]# /etc/init.d/bacula-fd start
Starting bacula-fd: [ OK ]

[root@client ~]# chkconfig bacula-fd on


[root@client ~]# netstat -anp | grep 9102
tcp 0 0 0.0.0.0:9102 0.0.0.0:* LISTEN 1550/bacula-fd

[root@client ~]# vi /etc/bacula/bconsole.conf
Director {
Name = bacula-dir
DIRport = 9101
address = mgmtsrv.lguru.local # Director Daemon hostname
Password = "password" # Director Daemon password
}

Copy some file to /opt file system to check bacula director server backup these files

[root@client ~]# cp /etc/passwd /etc/shadow /etc/group /opt/
[root@client ~]# ls -l /opt/
total 12
-rw-r--r-- 1 root root 456 Sep 13 03:18 group
-rw-r--r-- 1 root root 924 Sep 13 03:18 passwd
---------- 1 root root 614 Sep 13 03:18 shadow