Bacula 9 - Pool de Cópia

1. Bacula 9 - Pool de Cópia

JOAO PAULO SCOPEL
joaopauloscopel

(usa Ubuntu)

Enviado em 01/10/2018 - 09:21h

Bom dia,

Instalei o Bacula 9 para realizar um Upgrade de meus clientes, que hoje estão trabalhando na versão 5.0.2. Como ainda estou realizando os testes com a ferramenta, ainda não realizei a migração de todos até conseguir configurar direito e sanar minhas dúvidas.

Bem, então vamos lá! Meu bácula está configurado da seguinte forma (arquivo bacula-dir.conf):


Director {
Name = "bacula9-dir"
Messages = "Daemon"
QueryFile = "/etc/bacula/scripts/query.sql"
WorkingDirectory = "/var/lib/bacula"
PidDirectory = "/var/run"
MaximumConcurrentJobs = 20
Password = "p77fv0gkSPIBiujE8odnWSnGty3QFYIK6FvATdVLDPmC"
}
Client {
Name = "bacula9-fd"
Address = "192.168.24.249"
FdPort = 9102
Password = "kN5OInI4GVwXjYTXKmup5IaaakVuDCzrcWOzZ+93Ofrf"
Catalog = "MyCatalog"
FileRetention = 5184000
JobRetention = 15552000
AutoPrune = yes
}
Client {
Name = "cwork-fd"
Description = "Sistema Ponto Cwork"
Address = "192.168.24.11"
Password = "EJv20oDjZurlCk8TR57TgpWWARoQNOiemOMyNB9SyEyd"
Catalog = "MyCatalog"
SnapshotRetention = 2592000
}
Job {
Name = "BackupCatalog"
Level = "Full"
Fileset = "Catalog"
Schedule = "Incremental"
JobDefs = "DefaultJob"
WriteBootstrap = "/var/lib/bacula/%n.bsr"
Runscript {
RunsWhen = "Before"
RunsOnClient = no
Command = "/etc/bacula/scripts/make_catalog_backup.pl MyCatalog"
}
Runscript {
RunsWhen = "After"
RunsOnClient = no
Command = "/etc/bacula/scripts/delete_catalog_backup"
}
Priority = 11
}
Job {
Name = "BackupClient1"
JobDefs = "DefaultJob"
}
Job {
Name = "CWork Full"
Description = "Backup Completo CWork - Mensal"
Type = "Backup"
Level = "Full"
Messages = "Daemon"
Storage = "Storage"
Pool = "File"
Client = "cwork-fd"
Fileset = "CWork"
}
Job {
Name = "Cwork"
Description = "Backup Segunda á Sexta Feira - Incremental"
Type = "Backup"
Level = "Incremental"
Messages = "Daemon"
Storage = "File1"
Pool = "File"
Client = "cwork-fd"
Fileset = "CWork"
Schedule = "Incremental"
MaximumConcurrentJobs = 20
}
Job {
Name = "RestoreFiles"
Type = "Restore"
Messages = "Standard"
Storage = "File1"
Pool = "File"
Client = "bacula9-fd"
Fileset = "Full Set"
Where = "/mnt/backup/bacula-restores"
}
Storage {
Name = "File1"
SdPort = 9103
Address = "192.168.24.249"
Password = "h5UE/lPtZ9DSfiaox22XLhHkk/lzsCg3eDwYAhnUoLow"
Device = "FileChgr1"
MediaType = "File1"
Autochanger = "File1"
MaximumConcurrentJobs = 20
}
Storage {
Name = "Storage"
SdPort = 9103
Address = "192.168.24.249"
Password = "h5UE/lPtZ9DSfiaox22XLhHkk/lzsCg3eDwYAhnUoLow"
Device = "Storage"
MediaType = "File2"
Autochanger = "Storage"
MaximumConcurrentJobs = 20
}
Storage {
Name = "StorageC"
Description = "Storage Correta"
Address = "192.168.24.249"
Password = "h5UE/lPtZ9DSfiaox22XLhHkk/lzsCg3eDwYAhnUoLow"
Device = "Storage"
MediaType = "File2"
Autochanger = "StorageC"
}
Catalog {
Name = "MyCatalog"
Password = ""
User = "bacula"
DbName = "bacula"
}
Schedule {
Name = "Incremental"
Run = Level="Incremental" at 23:10
}
Schedule {
Name = "Inobram"
Run = Level="Full" 1st sun at 23:05
Run = Level="Differential" 2nd-5th sat at 23:05
Run = Level="Incremental" mon-sat at 23:05
}
Fileset {
Name = "CWork"
Include {
File = "c:/BACKUP2/"
}
}
Fileset {
Name = "Catalog"
Include {
File = "/var/lib/bacula/bacula.sql"
Options {
Signature = "Md5"
}
}
}
Fileset {
Name = "Full Set"
Include {
File = "/usr/sbin"
Options {
Signature = "Md5"
}
}
Exclude {
File = "/var/lib/bacula"
File = "/mnt/backup"
File = "/proc"
File = "/tmp"
File = "/sys"
File = "/.journal"
File = "/.fsck"
}
}
Pool {
Name = "Copia"
PoolType = "Backup"
Storage = "Storage"
AutoPrune = yes
Recycle = yes
}
Pool {
Name = "File"
PoolType = "Backup"
LabelFormat = "Vol-"
MaximumVolumes = 100
MaximumVolumeBytes = 53687091200
VolumeRetention = 31536000
NextPool = "Copia"
AutoPrune = yes
Recycle = yes
}
Messages {
Name = "Daemon"
MailCommand = "/usr/sbin/bsmtp -h localhost -f \"(Bacula) <%r>\" -s \"Bacula daemon message\" %r"
Mail = [email protected] = All, !Debug, !Saved, !Skipped
Append = /var/log/bacula.log = All, !Debug, !Saved, !Skipped
Console = All, !Debug, !Saved, !Skipped
}
Messages {
Name = "Standard"
MailCommand = "/usr/sbin/bsmtp -h localhost -f \"(Bacula) <%r>\" -s \"Bacula: %t %e of %c %l\" %r"
OperatorCommand = "/usr/sbin/bsmtp -h localhost -f \"(Bacula) <%r>\" -s \"Bacula: Intervention needed for %j\" %r"
Mail = [email protected] = All, !Debug, !Saved, !Skipped
Append = /var/log/bacula.log = All, !Debug, !Saved, !Skipped
Console = All, !Debug, !Saved, !Skipped
Operator = [email protected] = Mount
Catalog = All, !Debug, !Saved
}
Console {
Name = "bacula9-mon"
Password = "6dPAEoM2gqH7zGXyeBH3iO55Qqeq84IWCFa6zCgZq3q5"
CommandAcl = "status"
CommandAcl = ".status"
}
JobDefs {
Name = "DefaultJob"
Type = "Backup"
Level = "Incremental"
Messages = "Standard"
Storage = "File1"
Pool = "File"
Client = "bacula9-fd"
Fileset = "Full Set"
Schedule = "Inobram"
WriteBootstrap = "/var/lib/bacula/%c.bsr"
SpoolAttributes = yes
Priority = 10
}


Estou conseguindo realizar os backups normalmente no disco rígido local, porém não consigo fazer com que após ser executado o JOB de backup no disco local, seja executada a cópia para a POOL onde deixei mapeado minha Storage de rede (/opt/externo).

As configurações do meu bacula-sd.conf são as seguintes:

Director {
Name = "bacula9-dir"
Password = "h5UE/lPtZ9DSfiaox22XLhHkk/lzsCg3eDwYAhnUoLow"
}
Director {
Name = "bacula9-mon"
Password = "YPj9xQUU91bv1NBL38HsD1+3EPCMXhOKF2iTF2zDvJOk"
Monitor = yes
}
Storage {
Name = "bacula9-sd"
WorkingDirectory = "/var/lib/bacula"
PidDirectory = "/var/run"
PluginDirectory = "/usr/lib64"
MaximumConcurrentJobs = 20
}
Device {
Name = "FileChgr1-Dev1"
MediaType = "File1"
ArchiveDevice = "/mnt/backup"
RemovableMedia = no
RandomAccess = yes
AutomaticMount = yes
LabelMedia = yes
AlwaysOpen = no
MaximumConcurrentJobs = 5
}
Device {
Name = "Storage"
MediaType = "File2"
ArchiveDevice = "/opt/externo"
RandomAccess = yes
AutomaticMount = yes
LabelMedia = yes
Description = "Storage de Backup Administrativo"
}
Messages {
Name = "Standard"
Director = bacula9-dir = All, !Debug, !Saved
}
Autochanger {
Name = "FileChgr1"
Device = "FileChgr1-Dev1"
Device = "Storage"
ChangerDevice = "/dev/null"
ChangerCommand = ""
}

A interface WEB está funcionando normalmente e eu consigo rodar backups por lá sem nenhum problema, meu problema está na cópia dos backups do HD local para a Storage na Rede. Não quero usar RSYNC e nem SCP ou qualquer outro método via ShellScript pelo fato que o bacula não gravará no catálogo a informação da cópia a para a Storage, e em caso de um desastre ficará mais difícil realizar um procedimento de Restore dos arquivos.

Alguém que ja enfrentou o mesmo problema, poderia me auxiliar?

Quando executo o BCONSOLE, vou em Status > Storage, ele só me aparece o dispositivo padrão que cadastrei quando instalei o bacula que é o HD Interno Local da máquina e não o mapeamento que fiz em /opt/externo.

[IMG]http://i65.tinypic.com/20l1hc8.png[/IMG]
http://i65.tinypic.com/20l1hc8.png