Documentacion Bacula
Documentacion Bacula
Documentacion Bacula
Que es Bacula?
File (FD) Este servicio, conocido como cliente o servidor de ficheros est
instalado en cada mquina a salvaguardar y es especfico al sistema operativo
donde se ejecuta. Responsable para enviar al Director los datos cuando este lo
requiera.
La Jerga de Bacula
Que es Webmin?
# nano /etc/yum.repos.d/webmin.repo
[Webmin]
name=Webmin Distribution Neutral
#baseurl=http://download.webmin.com/download/yum
mirrorlist=http://download.webmin.com/download/yum/mirrorlist
enabled=1
A continuacin, obtenga e instale la clave GPG que se utiliza para firmar los
paquetes Webmin:
# wget http://www.webmin.com/jcameron-key.asc
# rpm --import jcameron-key.asc
activar webmin
https://TU_IP:10000
Instalacion Mysql (mariadb)
Activar mariadb
sudo mysql_secure_installation
mysql -u root -p
exit
Elegir cual librera Mysql se ocupara como predeterminada
Selection Command
-----------------------------------------------
1 /usr/lib64/libbaccats-mysql.so
2 /usr/lib64/libbaccats-sqlite3.so
*+ 3 /usr/lib64/libbaccats-postgresql.so
Configuracion de la consola
# vi /etc/bacula/bconsole.conf
Director {
Step 5:
Storage {
Name = lokesh-bacula-storage.com-sd #
SDPort = 9103 #
WorkingDirectory = "/var/spool/bacula"
Pid Directory = "/var/run"
Maximum Concurrent Jobs = 20
SDAddress = 172.17.20.100
}
Director {
Name = lokesh-bacula-server.com-dir #
Password = "server32" #
}
Autochanger {
Name = NAS-Server # c
Device = NAS #
Changer Command = ""
Changer Device = /dev/null
}
Device {
Name = NAS # Device name
Media Type = File
Archive Device = /backup/nas # Backup Path server
LabelMedia = yes; # lets Bacula label unlabeled media
Random Access = Yes;
AutomaticMount = yes; # when device opened, read it
RemovableMedia = no;
AlwaysOpen = no;
Maximum Concurrent Jobs = 5
}
Messages {
Name = Standard
director = centos-bacula-server-dir = all # set Director
}
Check configuration file
Director {
Name = lokesh-bacula-server.com-dir # should be Same on bconsole.conf
DIRport = 9101 # should be Same on bconsole.conf
QueryFile = "/etc/bacula/query.sql"
WorkingDirectory = "/var/spool/bacula"
PidDirectory = "/var/run"
Maximum Concurrent Jobs = 20
Password = "server32" # should be Same on bconsole.conf
Messages = Daemon
DirAddress = 172.17.20.100 # should be Same on bconsole.conf
}
##### aqu se coloca cuando se hace la tarea o backups ###
Schedule {
Name = "SundayCycle"
Run = Level=Full sun at 1:00
Run = Level=Differential wed at 2:00
Run = Level=Incremental mon tue thu fri sat at 1:00
Schedule {
Name = "WeeklyCycle"
Run = Full 1st sun at 23:05
Run = Differential 2nd-5th sun at 23:05
Run = Incremental mon-sat at 23:05
}
# This schedule does the catalog. It starts after the WeeklyCycle
Schedule {
Name = "WeeklyCycleAfterBackup"
Run = Full sun-sat at 23:10
}
Storage {
Name = bacula-sd # cambiar al nombre que desees
Address = 192.168.30.40 # ip del disco duro el cual puede ser el mismo
servidor o algun otro
SDPort = 9103 # puerto en el que escucha
Password = "server2" # Match on bacula-sd.conf
Device = NAS-Server # Autochange name
Media Type = File
Maximum Concurrent Jobs = 10 # trabajos que se pueden realizar
Catalog {
Name = MyCatalog #nombre asignado a la base de datos de bacula podria cambiar
si lo desea
dbname = "bacula"; dbuser = "bacula"; dbpassword = "password de usuario mysql"
}
Go to the end Add Line at the end of file for Remote Client Configuration
Configuracin clientes :
Creacin de conf.d
# mkdir /etc/bacula/conf.d
# vi /etc/bacula/conf.d/md-client.com
Client 1:
# Md Client Information
Client {:
Name = md-client.com-fd #Client Name : will be match on bacula-fd.conf on
client side
Address = 172.17.20.140 #Client IP
FDPort = 9102 #Port
Catalog = MyCatalog
Password = "server32" # Password : will be match on bacula-fd.conf on
client side
File Retention = 30 days
Job Retention = 6 months
AutoPrune = yes
}
JobDefs {
Name = "md-client-job"
Type = Backup
Level = Differential
Client = md-client.com-fd # Client name :will be match on bacula-fd.conf
on client side
FileSet = "md-client-fileset"
Schedule = "SundayCycle" # schedule : see in bacula-dir.conf
Storage = Centos-Bacula-NAS
Messages = Standard
Pool = md-client-pool
Priority = 10
Write Bootstrap = "/var/spool/bacula/%c.bsr"
}
Job {
Name = "md-client-Backup"
Client = md-client.com-fd # Client name : will be match on bacula-fd.conf
on client side
JobDefs = "md-client-job"
}
Job {
Name = "md-client-Restore"
Type = Restore
Client= md-client.com-fd # Client name : will be match on bacula-fd.conf
on client side
FileSet= "md-client-fileset"
Storage = Centos-Bacula-NAS
Pool = md-client-pool
Messages = Standard
Where = /restore # Restore Directory
}
FileSet {
Name = "md-client-fileset"
Include {
Options {
signature = MD5
compression = GZIP
}
File = /var/www/html/
File = /etc
## directorios excluidos ##
Exclude {
File = /var/spool/bacula
File = /proc
File = /tmp
File = /.journal
File = /.fsck
File = /backup
}
}
## agrupado ##
Pool {
Name = md-client-pool #
Pool Type = Backup
Recycle = yes
Label Format = md-client-backup-file- # set volume label format
AutoPrune = yes
Volume Retention = 180 days
Maximum Volume Bytes = 50G
Maximum Volumes = 100
}
bacula-client-2.png
Client 2:
# vi /etc/bacula/conf.d/hs-client.conf
# HS Client Information #
Client {
JobDefs {
Name = "hs-client-job"
Type = Backup
Level = Differential
Client = hs-client.com-fd # Client name :will be match on bacula-fd.conf on
client side
FileSet = "hs-client-fileset"
Schedule = "SundayCycle" # schedule : see in bacula-dir.conf
Storage = Centos-Bacula-NAS
Messages = Standard
Pool = hs-client-pool
Priority = 10
Write Bootstrap = "/var/spool/bacula/%c.bsr"
}
Job {
Name = "hs-client-Backup"
Client = hs-client.com-fd # Client name : will be match on bacula-
fd.conf on client side
JobDefs = "hs-client-job"
}
Job {
Name = "hs-client-Restore"
Type = Restore
Client= hs-client.com-fd # Client name : will be match on bacula-fd.conf
on client side
FileSet= "hs-client-fileset"
Storage = Centos-Bacula-NAS
Pool = hs-client-pool
Messages = Standard
Where = /restore # Restore Directory
FileSet {
Name = "hs-client-fileset"
Include {
Options {
signature = MD5
compression = GZIP
}
File = /var/www/html/
File = /etc
}
Exclude {
File = /var/spool/bacula
File = /proc
File = /tmp
File = /.journal
File = /.fsck
File = /backup
}
}
## Pool Configuration ##
Pool {
Name = hs-client-pool # pool name
Pool Type = Backup
Recycle = yes
Label Format = hs-client-backup-file- # set volume label format
AutoPrune = yes
Volume Retention = 180 days
Maximum Volume Bytes = 50G
Maximum Volumes = 100
Bacula Cliente-servidor
vi /etc/bacula/bacula-fd.conf
y procedemos a configurar el archivo configuracin
Director {
Name = bacula-dir
Password = "
password
"
}
# line 22-26: comment out
#
Director {
#
Name = bacula-mon
#
Password = "@@MON_FD_PASSWORD@@"
#
Monitor = yes
#
}
ahora vamos al archivo de configuracin de la consola
vi /etc/bacula/bconsole.conf
Director {
Name = bacula-dir
DIRport = 9100
# Ip del director o servidor
address = 192.168.30.40
# password del director
Password = "password"