Bacula (bacula-dir.conf)

Bacula efetuando full backup

Categoria: Miscelânea

Software: Bacula

[ Hits: 23.862 ]

Por: Daniel Lara Souza


Meu bacula-dir.conf, onde tenho dois clientes configurados efetuando o full backup  de sempre, tem os últimos 7 dias de backup.


#
Director {                            # define myself
  Name = BACULA-DIR-dir
  DIRport = 9101                # where we listen for UA connections
  QueryFile = "/etc/bacula/scripts/query.sql"
  WorkingDirectory = "/var/lib/bacula"
  PidDirectory = "/var/run"
  Maximum Concurrent Jobs = 20
  Password = "Aa3dGMQ7lA6wMEGdiz2xKdlhTaqpVFtFH79ODABgwGkG2al3"         # Console password
  Messages = Daemon
}
#

#################################################################################
# BACULADIR

#JOB
Job {
  Name = "BACULADIR"
  Type = Backup
  Level = FULL
  Client = BACULA-DIR-dir
  FileSet = "BACULADIR"
  Schedule = "baculadir"
  Storage = BACULADIR
  Messages = Standard
#  RunBeforeJob = /etc/scripts/backup_mysql.sh
  Pool = BACULADIR-manual
  Priority = 10
  Maximum Concurrent Jobs = 20
  Write Bootstrap = "/var/lib/bacula/BACULADIR.bsr"
}
#JOB RESTORE
Job {
  Name = "BACULADIR-Restore"
  Type = Restore
  Client=BACULA-DIR-dir
  FileSet="BACULADIR"
  Storage = BACULADIR
  Pool = BACULADIR-manual
  Messages = Standard
  Where = /tmp/bacula-restores
}
# FILE SET
FileSet {
  Name = "BACULADIR"
  Include {
    Options {
      signature = MD5
    }
    File = /home/bacula
    File = /etc
}
}
#CLIENT
Client {
  Name = BACULA-DIR-dir
  Address = 10.1.1.12
  FDPort = 9102
  Catalog = MyCatalog
  Password = "1lSoS4R3NLvsoEBL2HwmfmOt3+YeTebu8KF1RYh3HqRR933r"          # password for FileDaemon
  File Retention = 7 days            # 30 days
  Job Retention = 7 days            # six months
  AutoPrune = yes                     # Prune expired Jobs/Files
}
Storage {
  Name = BACULADIR
# Do not use "localhost" here    
  Address = 10.1.1.12            # N.B. Use a fully qualified name here
  SDPort = 9103
  Password = "Y5yknPHZnkIQJT45RDtAy7E2LFo+Sae/z7BTVxoLHITfOWAc"
  Device = BACULADIR
  Media Type = File
}

Schedule {
  Name = "baculadir"
  Run = Full Pool=BACULADIR-domingo sun at 02:30
  Run = Full Pool=BACULADIR-segunda mon at 02:30
  Run = Full Pool=BACULADIR-terca tue at 02:30
  Run = Full Pool=BACULADIR-quarta wed at 02:30
  Run = Full Pool=BACULADIR-quinta thu at 02:30
  Run = Full Pool=BACULADIR-sexta fri at 02:30
  Run = Full Pool=BACULADIR-sabado sat at 02:30
}


#POOL Semanal
Pool {
  Name = BACULADIR-domingo
  Pool Type = Backup
  Recycle = yes                       # Bacula can automatically recycle Volumes
  AutoPrune = yes                     # Prune expired volumes
  Volume Retention = 6 days         # one year
}
Pool {
  Name = BACULADIR-segunda
  Pool Type = Backup
  Recycle = yes                       # Bacula can automatically recycle Volumes
  AutoPrune = yes                     # Prune expired volumes
  Volume Retention = 6 days         # one year
}
Pool {
  Name = BACULADIR-terca
  Pool Type = Backup
  Recycle = yes                       # Bacula can automatically recycle Volumes
  AutoPrune = yes                     # Prune expired volumes
  Volume Retention = 6 days         # one year
}
Pool {
  Name = BACULADIR-quarta
  Pool Type = Backup
  Recycle = yes                       # Bacula can automatically recycle Volumes
  AutoPrune = yes                     # Prune expired volumes
  Volume Retention = 6 days         # one year
}
Pool {
  Name = BACULADIR-quinta
  Pool Type = Backup
  Recycle = yes                       # Bacula can automatically recycle Volumes
  AutoPrune = yes                     # Prune expired volumes
  Volume Retention = 6 days         # one year
}
Pool {
  Name = BACULADIR-sexta
  Pool Type = Backup
  Recycle = yes                       # Bacula can automatically recycle Volumes
  AutoPrune = yes                     # Prune expired volumes
  Volume Retention = 6 days         # one year
}
Pool {
  Name = BACULADIR-sabado
  Pool Type = Backup
  Recycle = yes                       # Bacula can automatically recycle Volumes
  AutoPrune = yes                     # Prune expired volumes
  Volume Retention = 6 days         # one year
}
Pool {
  Name = BACULADIR-manual
  Pool Type = Backup
  Recycle = yes                       # Bacula can automatically recycle Volumes
  AutoPrune = yes                     # Prune expired volumes
  Volume Retention = 20 minutes        # one year
}
###########################################################################
#
# MYSQL

#JOB

Job {
  Name = "MYSQL"
  Type = Backup
  Level = FULL
  Client = RHMYSQL05-fd
  FileSet = "MYSQL"
  Schedule = "mysql"
  Storage = MYSQL
  Messages = Standard
  ClientRunBeforeJob = /root/backup
  ClientRunAfterJob = /root/remove
  Pool = MYSQL-manual
  Priority = 10
  Maximum Concurrent Jobs = 20
  Write Bootstrap = "/var/lib/bacula/MYSQL.bsr"
}


#JOB RESTORE

Job {
  Name = "MYSQL-Restore"
  Type = Restore
  Client= RHMYSQL05-fd
  FileSet="MYSQL"
  Storage = MYSQL
  Pool = MYSQL-manual
  Messages = Standard
  Where = /tmp/bacula-restores
}

# FILE SET
FileSet {
  Name = "MYSQL"
  Include {
    Options {
      signature = MD5
    }
    File = /etc
    File = /E/backup
}
}

#CLIENT
Client {
  Name = RHMYSQL05-fd
  Address = 10.1.1.9
  FDPort = 9102
  Catalog = MyCatalog
  Password = "1lSoS4R3NLvsoEBL2HwmfmOt3+YeTebu8KF1RYh3HqRR933r"          # password for FileDaemon
  File Retention = 7 days            # 30 days
  Job Retention = 7 days            # six months
  AutoPrune = yes                     # Prune expired Jobs/Files
}

Storage {
  Name = MYSQL
# Do not use "localhost" here    
  Address = 10.1.1.12            # N.B. Use a fully qualified name here
  SDPort = 9103
  Password = "Y5yknPHZnkIQJT45RDtAy7E2LFo+Sae/z7BTVxoLHITfOWAc"
  Device = MYSQL
  Media Type = File
}

Schedule {
  Name = "mysql"
  Run = Full Pool=MYSQL-domingo sun at 02:30
  Run = Full Pool=MYSQL-segunda mon at 02:30
  Run = Full Pool=MYSQL-terca tue at 02:30
  Run = Full Pool=MYSQL-quarta wed at 02:30
  Run = Full Pool=MYSQL-quinta thu at 02:30
  Run = Full Pool=MYSQL-sexta fri at 02:30
  Run = Full Pool=MYSQL-sabado sat at 02:30
}

#POOL Semanal
Pool {
  Name = MYSQL-domingo
  Pool Type = Backup
  Recycle = yes                       # Bacula can automatically recycle Volumes
  AutoPrune = yes                     # Prune expired volumes
  Volume Retention = 6 days         # one year
}
Pool {
  Name = MYSQL-segunda
  Pool Type = Backup
  Recycle = yes                       # Bacula can automatically recycle Volumes
  AutoPrune = yes                     # Prune expired volumes
  Volume Retention = 6 days         # one year
}
Pool {
  Name = MYSQL-terca
  Pool Type = Backup
  Recycle = yes                       # Bacula can automatically recycle Volumes
  AutoPrune = yes                     # Prune expired volumes
  Volume Retention = 6 days         # one year
}
Pool {
  Name = MYSQL-quarta
  Pool Type = Backup
  Recycle = yes                       # Bacula can automatically recycle Volumes
  AutoPrune = yes                     # Prune expired volumes
  Volume Retention = 6 days         # one year
}
Pool {
  Name = MYSQL-quinta
  Pool Type = Backup
  Recycle = yes                       # Bacula can automatically recycle Volumes
  AutoPrune = yes                     # Prune expired volumes
  Volume Retention = 6 days         # one year
}
Pool {
  Name = MYSQL-sexta
  Pool Type = Backup
  Recycle = yes                       # Bacula can automatically recycle Volumes
  AutoPrune = yes                     # Prune expired volumes
  Volume Retention = 6 days         # one year
}
Pool {
  Name = MYSQL-sabado
  Pool Type = Backup
  Recycle = yes                       # Bacula can automatically recycle Volumes
  AutoPrune = yes                     # Prune expired volumes
  Volume Retention = 6 days         # one year
}
Pool {
  Name = MYSQL-manual
  Pool Type = Backup
  Recycle = yes                       # Bacula can automatically recycle Volumes
  AutoPrune = yes                     # Prune expired volumes
  Volume Retention = 20 minutes        # one year
}
#########################################################################################
Catalog {
  Name = MyCatalog
 dbdriver = "dbi:mysql"; dbaddress = 10.1.1.9; dbport = 3306
  dbname = "bacula"; dbuser = "rhbacula"; dbpassword = "s3nh@rhbacula"

# dbdriver = "dbi:mysql"; dbaddress = 10.1.30.11; dbport = 3306
# dbname = "bacula"; dbuser = "root"; dbpassword = "rino@3542"

}
Messages {
  Name = Standard
  mailcommand = "/usr/bin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: %t %e of %c %l\" %r"
  operatorcommand = "/usr/bin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: Intervention needed for %j\" %r"
  mail = daniellarasouza@yahoo.com.br = all, !skipped            
  operator = root@localhost = mount
  console = all, !skipped, !saved
  append = "/var/log/bacula/bacula.log" = all, !skipped
  catalog = all
}

# Message delivery for daemon messages (no job).
Messages {
  Name = Daemon
  mailcommand = "/usr/bin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula daemon message\" %r"
  mail = daniellarasouza@yahoo.com.br = all, !skipped            
  console = all, !skipped, !saved
  append = "/var/log/bacula/bacula.log" = all, !skipped
  catalog = all, !skipped, !saved
}
Console {
  Name = BACULA-DIR-mon
  Password = "pWxL3lwQCHlurKThxvktKbWzjq0r38F5mlIPTSKsgjalK3Yx"
  CommandACL = status, .status
}
  


Comentários
[1] Comentário enviado por esmiril em 27/08/2013 - 17:46h

Bacana!! Sempre é bom ver um novo modo de fazer backup. Eu já prefiro dividir as pools por Incremental, diferencial e Full, mas varia de acordo com a necessidade. Parabens!!

[2] Comentário enviado por danniel-lara em 27/08/2013 - 17:56h


[1] Comentário enviado por esmiril em 27/08/2013 - 17:46h:

Bacana!! Sempre é bom ver um novo modo de fazer backup. Eu já prefiro dividir as pools por Incremental, diferencial e Full, mas varia de acordo com a necessidade. Parabens!!


o legal de usar o bacula é que tu podes configurar como tu quer

[3] Comentário enviado por esmiril em 06/09/2013 - 14:50h


[2] Comentário enviado por danniel-lara em 27/08/2013 - 17:56h:


[1] Comentário enviado por esmiril em 27/08/2013 - 17:46h:

Bacana!! Sempre é bom ver um novo modo de fazer backup. Eu já prefiro dividir as pools por Incremental, diferencial e Full, mas varia de acordo com a necessidade. Parabens!!

o legal de usar o bacula é que tu podes configurar como tu quer


com certeza, Bacula é uma excelente ferramente de backup, muito versátil e dinamica


Contribuir com comentário

  



Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts