Installing Bacula on CentOS 6
Install EPEL repo from
#yum install webmin
Install mysql and Bacula
# yum
install mysql-devel mysql-server
#yum install bacula-storage-mysql bacula-docs bacula-director-mysql bacula-console bacula-client bacula-traymonitor
#yum install bacula-storage-mysql bacula-docs bacula-director-mysql bacula-console bacula-client bacula-traymonitor
Initiate Bacula databaseand scripts included
in Bacula.
#/usr/libexec/bacula/grant_mysql_privileges
-u root –p
#/usr/libexec/bacula/create_mysql_database
-u root –p
#/usr/libexec/bacula/make_mysql_tables
-u root –p
#/usr/libexec/bacula/grant_bacula_privileges
-u root –p
Config Files:
/etc/bacula/bacula-dir.conf - Bacula Master configuration
/etc/bacula/bacula-sd.conf - Bacula stroage deamon
/etc/bacula/bacula-fd.conf - Bacula client config file
Edit Bacula director conf file and change
default password
#nano /etc/bacula/bacula-dir.conf
Also change Bacula database settings here
Catalog
{
Name = MyCatalog
dbname = "bacula"; dbuser =
"bacula"; dbpassword = "bacula"
}
To connect bacula client to server,
Change Bacula-fd default password and director
name to connect to Bacula master.
#nano /etc/bacula/bacula-fd.conf
To connect bacula storage device to server,
Change Bacula director name and password, also
can change default archive device location.
#nano /etc/bacula/bacula-sd.conf
Finally start Bacula services
#/etc/init.d/bacula-dir start
#/etc/init.d/bacula-sd start
#/etc/init.d/bacula-fd start
If any error look at log file
#tail –f /var/log/Bacula-/log
#chkconfig bacula-dir on
#chkconfig bacula-sd on
#chkconfig bacula-fd on
Login to webmin https://you_domain_name:10000 and add config to bacula backup system. Now the bacula system is ready to go.
Volume recycling
To recycle volumes in pool, create pool with
desired volume retention period for ex 2 weeks.
Create new volume in same pool with different
volume name ex, myvol2.
Once the volume retention period is over,
Bacula delete the old volume and try to use new volume created above in this
case it is myvol2. If no volumes are present after retention period, Bacula
uses the current volume to append data and create new without recycling old
volumes. This leads to more storage occupied by the volumes that are not in
use.
Sample monthly backup job
Job {
Name = mybackup
Type = Backup
Client = bacula-fd
FileSet = full
Schedule = Monthly
Storage = File
Messages = Standard
Pool = Default
Full Backup Pool = Full
Incremental Backup Pool = INCR
Differential Backup Pool = Diff
Level = Full
}
Schedule {
Name = Monthly
Run = Level=Full Pool=Full on 1 at 18:00
Run = Level=Differential Pool=Diff sun at 20:05
Run = Level=Incremental Pool=INCR on 2-31 at 20:10
}
Pool {
Name = Full
Pool Type = Backup
Volume Retention = 3 months
Recycle = yes
AutoPrune = yes
LabelFormat = full-
Maximum Volume Jobs = 1
}
Pool {
Name = INCR
Pool Type = Backup
Volume Retention = 2 months
Recycle = yes
AutoPrune = yes
LabelFormat = incr-
Maximum Volume Jobs = 1
}
Pool {
Name = Diff
Pool Type = Backup
Volume Retention = 40 days
Recycle = yes
AutoPrune = yes
LabelFormat = diff-
Maximum Volume Jobs = 1
}
+rajan nagarajan
No comments:
Post a Comment