Professional Documents
Culture Documents
DESABILITANDO FIREWALL
systemctl disable firewalld
systemctl stop firewalld
systemctl status firewalld
DESABILITANDO SELinux
vi /etc/sysconfig/selinux
SELINUX=disabled
Salvar e reiniciar
sestatus
Iniciando MARIADB
sudo systemctl start mariadb
Script de Segurança
sudo mysql_secure_installation
Dando permissoes
sudo chown -R bacula:bacula /bacula
sudo chmod -R 700 /bacula
sudo restorecon -R -v /bacula/
Job {
Name = "BackupLocalFiles" (BackupClient1)
JobDefs = "DefaultJob"
}
Job {
Name = "RestoreLocalFiles"
Type = Restore
Client=BackupServer-fd
FileSet="Full Set"
Storage = File
Pool = Default
Messages = Standard
Where = /bacula/restore
}
FileSet {
Name = "Full Set"
Include {
Options {
signature = MD5
compression = GZIP
}
File = /
}
Exclude {
File = /var/lib/bacula
File = /proc
File = /tmp
File = /.journal
File = /.fsck
File = /bacula
}
}
Storage {
Name = File
# Do not use "localhost" here
Address = 192.168.4.132 # N.B. Use a fully qualified name here
SDPort = 9103
Password = "@@SD_PASSWORD@@"
Device = FileStorage
Media Type = File
}
Configurar Pool
sudo vi /etc/bacula/bacula-sd.conf
STORAGE DAEMON
SD_PASSWORD=`date +%s | sha256sum | base64 | head -c 33`
sudo sed -i "s/@@SD_PASSWORD@@/${SD_PASSWORD}/" /etc/bacula/bacula-sd.conf
sudo sed -i "s/@@SD_PASSWORD@@/${SD_PASSWORD}/" /etc/bacula/bacula-dir.conf
FILE DAEMON
FD_PASSWORD=`date +%s | sha256sum | base64 | head -c 33`
sudo sed -i "s/@@FD_PASSWORD@@/${FD_PASSWORD}/" /etc/bacula/bacula-dir.conf
sudo sed -i "s/@@FD_PASSWORD@@/${FD_PASSWORD}/" /etc/bacula/bacula-fd.conf
CLIENT
Configurando Bacula-Dir
sudo vi /etc/bacula/bacula-dir.conf
No final da linha adicionar
@|"find /etc/bacula/conf.d -name '*.conf' -type f -exec echo @{} \;"
Testar o bacula
sudo bacula-dir -tc /etc/bacula/bacula-dir.conf
Configurar Bacula-Fd
Director {
Name = bacula-dir
Password ="
}
FileDaemon { # this is me
Name = BYSERVER-fd
FDAddress = 192.168.4.146
FDport = 9102 # where we listen for the director
WorkingDirectory = /var/spool/bacula
Pid Directory = /var/run
Maximum Concurrent Jobs = 20
}
Messages {
Name = Standard
director = bacula-dir = all, !skipped, !restored
}
Reiniciar bacula-fd
sudo systemctl restart bacula-fd
Iniciar Bacula File Automaticamente
sudo systemctl enable bacula-fd
FileSet {
Name = "Pasta001 and Pasta002"
Include {
Options {
signature = MD5
compression = GZIP
}
File = /Pasta001
File = /Pasta002
}
Exclude {
File = /home/bacula/not_important
}
}
Client {
Name = BYSERVER-fd
Address = 192.168.4.146
FDPort = 9102
Catalog = MyCatalog
Password = "NmZiZTA3NzM4Mzg2MWU1NjcxMWU5YjQxN" # SENHA DO FileDaemon
File Retention = 30 days # 30 days
Job Retention = 6 months # six months
AutoPrune = yes # Prune expired Jobs/Files
}
Job {
Name = "BackupBYSERVER"
JobDefs = "DefaultJob"
Client = BYSERVER-fd
Pool = RemoteFile
FileSet="Pasta001 and Pasta002"
}