Configure Bacula Server
|
Configure Director daemon and Storage daemon on bacula server. | |
Step [1] | Configure Director daemon. |
# replace because comments are so many
[root@dlp ~]#
mv /etc/bacula/bacula-dir.conf /etc/bacula/bacula-dir.conf.bk
[root@dlp ~]#
grep '^[^#]' /etc/bacula/bacula-dir.conf.bk > /etc/bacula/bacula-dir.conf
[root@dlp ~]#
chmod 600 /etc/bacula/bacula-dir.conf
[root@dlp ~]#
vi /etc/bacula/bacula-dir.conf
Director { Name = dlp-dir DIRport = 9101 QueryFile = "/usr/lib64/bacula/query.sql" WorkingDirectory = "/var/lib/bacula" PidDirectory = "/var/run" Maximum Concurrent Jobs = 1
# line 8: specify password
Password = "
password
"Messages = Daemon } Job { Name = "RestoreFiles" Type = Restore Client=dlp-fd FileSet="Full Set" Storage = File Pool = Default Messages = Standard
# line 53: specify directory that has restore files
Where =
/var/restores
} FileSet { Name = "Full Set" Include { Options { signature = MD5
# line 60: add
Compression = GZIP
}
# line 62: specify objective directory for backup on client
File =
/home
} Client { Name = dlp-fd
# line 92: specify IP address of client
Address =
192.168.0.24
FDPort = 9102 Catalog = MyCatalog
# line 95: specify password
Password = "
password
"File Retention = 30 days Job Retention = 6 months AutoPrune = yes } Storage { Name = File
# line 102: Bacula server's IP address
Address =
192.168.0.20
SDPort = 9103
# line 104: specify password
Password = "
password
"Device = FileStorage Media Type = File } Catalog { Name = MyCatalog
# line 110: bacula's password on MySQL
dbname = "bacula"; dbuser = "bacula"; dbpassword = "
dbpassword
"} Pool { Name = Default Pool Type = Backup Recycle = yes AutoPrune = yes
# line 134: specify terms of keeping volumes
Volume Retention =
180
days} [root@dlp ~]#
/etc/rc.d/init.d/bacula-dir start
Starting Bacula Director services:
[ OK ]
[root@dlp ~]#
chkconfig bacula-dir on
|
Step [2] | Configure Storage daemon |
# replace because comments are many
[root@dlp ~]#
mv /etc/bacula/bacula-sd.conf /etc/bacula/bacula-sd.conf.bk
[root@dlp ~]#
grep '^[^#]' /etc/bacula/bacula-sd.conf.bk > /etc/bacula/bacula-sd.conf
[root@dlp ~]#
chmod 600 /etc/bacula/bacula-sd.conf
[root@dlp ~]#
vi /etc/bacula/bacula-sd.conf
Director { Name = dlp-dir
# line 10: specify password
Password = "
password
"} Director { Name = dlp-mon
# line 14: specify password
Password = "
password
"Monitor = yes } Device { Name = FileStorage Media Type = File
# line 20: specify file that is used as a storage for backup
Archive Device =
/var/backup/backup
LabelMedia = yes; Random Access = Yes; AutomaticMount = yes; RemovableMedia = no; AlwaysOpen = no; } [root@dlp ~]#
mkdir /var/backup
[root@dlp ~]#
touch /var/backup/backup
[root@dlp ~]#
chown -R bacula. /var/backup
[root@dlp ~]#
chmod 660 /var/backup/backup
[root@dlp ~]#
/etc/rc.d/init.d/bacula-sd start
Starting Bacula Storage services:
[ OK ]
[root@dlp ~]#
chkconfig bacula-sd on
|
Step [3] | Configure bconsole |
[root@dlp ~]#
vi /etc/bacula/bconsole.conf
Director { Name = dlp-dir DIRport = 9101
# line 8: specify Director daemon's IP address
address =
127.0.0.1
# line 9: specify password
Password = "
password
"} |