>_Backup com Bacula – Criando templates Pool’s adotando o GFS – 1.12

Entendendo um pouco da estrutura de backup do Bacula.

logo

Pool padrão do Bacula.

# Default pool definition
Pool {
  Name = Default
  Pool Type = Backup
  Recycle = yes                       # Bacula can automatically recycle Volumes
  AutoPrune = yes                     # Prune expired volumes
  Volume Retention = 365 days         # one year
}

# File Pool definition
Pool {
  Name = File
  Pool Type = Backup
  Recycle = yes                       # Bacula can automatically recycle Volumes
  AutoPrune = yes                     # Prune expired volumes
  Volume Retention = 365 days         # one year
  Maximum Volume Bytes = 50G          # Limit Volume size to something reasonable
  Maximum Volumes = 100               # Limit number of Volumes in Pool
}

Criando novas Pool’s adotando o modelo de GFS.

Name = Diario
# Nome da Pool.

Pool Type = Backup
# Tipo.

Recycle = yes
# Reciclagem automática de volumes.

AutoPrune = yes
# Limpeza do volume.

Volume Use Duration = 24 hours
# O volume ficara com o status append durante o período de 24 horas.

Volume Retention = 6 days
# O volume ficara com o status used durante o período de 6 dias. (Retenção).

Maximum Volume Bytes = 100G
# Só utilizado para backup em disco. Importante para otimizar o backup em disco. Com ele é estabelecido o tamanho do volume máximo.

Maximum Volumes = 10
# Só utilizado em backup em disco. Tem como função limitar a quantidade de volumes que poderão serem criados. Neste cenário teremos 10 volumes de 100 Gigas. Totalizando 1Tb.

Label Format =”diario-${NumVols}”
# Cria os volumes automaticamente. A variável NumVols especifica o número atual de volumes no pool.

Pool diário.

# File Pool definition
 Pool {
        Name 			= Diario             	
        Pool Type 		= Backup               
        Recycle 		= yes                   
        AutoPrune 		= yes                   
	Volume Use Duration 	= 24 hours		
        Volume Retention 	= 6 days         	
        Maximum Volume Bytes 	= 100G         		
        Maximum Volumes 	= 10               	
	Label Format 		="diario-${NumVols}" 	
}

Pool semanal.

# File Pool definition
 Pool {
        Name                    = Semanal               
        Pool Type               = Backup                
        Recycle                 = yes                   
        AutoPrune               = yes                   
        Volume Use Duration     = 3 days                
        Volume Retention        = 27 days               
        Maximum Volume Bytes    = 200G                  
        Maximum Volumes         = 4                     
        Label Format            ="semanal-${NumVols}"   
}

Pool anual.

# File Pool definition
 Pool {
        Name                    = Mensal               
        Pool Type               = Backup               
        Recycle                 = yes                   
        AutoPrune               = yes                   
        Volume Use Duration     = 3 days                
        Volume Retention        = 362 days              
        Maximum Volume Bytes    = 200G                  
        Maximum Volumes         = 12                     
        Label Format            ="mensal-${NumVols}"    
}

Configurando no servidor Bacula as Pool’s.

# cd /etc/bacula/
# vim bacula-dir.conf
JobDefs {
  Name = "DefaultJob"
  Type = Backup
  Level = Incremental
  Client = bacula-fd
  FileSet = "Full Set"
  Schedule = "WeeklyCycle"
  Storage = File
  Messages = Standard
  Pool = File
  Priority = 10
  Write Bootstrap = "/var/spool/bacula/%c.bsr"
}

PARA

JobDefs {
  Name = "DefaultJob"
  Type = Backup
  Level = Incremental
  Client = bacula-fd
  FileSet = "Full Set"
  Schedule = "WeeklyCycle"
  Storage = File
  Messages = Standard
  Pool = Diario
  Priority = 10
  Write Bootstrap = "/var/spool/bacula/%c.bsr"
}

Em seguida a criação da Pool Diário.

Pool {
        Name                    = Diario
        Pool Type               = Backup
        Recycle                 = yes
        AutoPrune               = yes
        Volume Use Duration     = 24 hours
        Volume Retention        = 6 days
        Maximum Volume Bytes    = 10G
        Maximum Volumes         = 3
        Label Format            ="diario-${NumVols}"
}

Reiniciando o Bacula Director.

# /etc/init.d/bacula-dir restart
Shutting down bacula-dir:                                  [  OK  ]
Starting bacula-dir:                                       [  OK  ]

Gerando um novo backup utilizando a Pool Diário.

[root@ba-vm-bkp-01 ~]# bconsole 
Connecting to Director localhost:9101
1000 OK: bacula-dir Version: 5.0.0 (26 January 2010)
Enter a period to cancel a command.
*run
Automatically selected Catalog: MyCatalog
Using Catalog "MyCatalog"
A job name must be specified.
The defined Job resources are:
     1: BackupClient1
     2: Backup do cliente Debian
     3: Backup do cliente Windows
     4: BackupCatalog
     5: RestoreFiles
Select Job resource (1-5): 1

 

Run Backup job
JobName:  BackupClient1
Level:    Incremental
Client:   bacula-fd
FileSet:  Bacula_etc_var_opt
Pool:     Diario (From Job resource)
Storage:  File (From Job resource)
When:     2015-05-01 13:36:24
Priority: 10
OK to run? (yes/mod/no): yes

Dica:
Para verificar detalhadamente os volumes, utiliza o comando llist.

Continua …
Fonte:
www.bacula.com.br
www.bacula.org
187.7.106.13/folha/T-07_T-08_T 09/Modulo%20II/Projeto_Implantacao_Servidores/Turma_08/Aula_8_Servidor_de_Backup/Manual_do_Bacula_-_PT_BR.pdf

>_Backup com Bacula – Criando templates Pool’s adotando o GFS – 1.12
Tagged on:

4 thoughts on “>_Backup com Bacula – Criando templates Pool’s adotando o GFS – 1.12

  • 6 de abril de 2016 at 10:35
    Permalink

    Como fazer para que o label seja criado de acordo com o barcode da fita?

    Reply
  • 6 de abril de 2016 at 10:56
    Permalink

    Obrigado Vandocouto.

    Reply
  • 6 de abril de 2016 at 15:53
    Permalink

    Oi, tive um problema que após ler as fitas com o Label Barcode e etiquetá-las ao rodar um job de backup tive o seguinte problema:
    06-Abr 15:10 bacula-sd JobId 262: Job BACULA-DIRECTOR.2016-04-06_15.10.00_02 is waiting. Cannot find any appendable volumes.
    Please use the “label” command to create a new Volume for:
    Storage: “LTO-5” (/dev/st0)
    Pool: PoolDiariaFita
    Media type: LTO5

    Meu list media apresenta os volumes como abertos, veja:
    Pool: File
    +———+————+———–+———+———-+———-+————–+———+——+———–+———–+———————+
    | MediaId | VolumeName | VolStatus | Enabled | VolBytes | VolFiles | VolRetention | Recycle | Slot | InChanger | MediaType | LastWritten |
    +———+————+———–+———+———-+———-+————–+———+——+———–+———–+———————+
    | 29 | 000094L5 | Append | 1 | 64,512 | 0 | 31,536,000 | 1 | 1 | 1 | LTO5 | 0000-00-00 00:00:00 |
    | 30 | 000093L5 | Append | 1 | 64,512 | 0 | 31,536,000 | 1 | 2 | 1 | LTO5 | 0000-00-00 00:00:00 |
    | 31 | 000092L5 | Append | 1 | 64,512 | 0 | 31,536,000 | 1 | 3 | 1 | LTO5 | 0000-00-00 00:00:00 |
    | 32 | 000091L5 | Append | 1 | 64,512 | 0 | 31,536,000 | 1 | 4 | 1 | LTO5 | 0000-00-00 00:00:00 |
    | 33 | 000070L5 | Append | 1 | 64,512 | 0 | 31,536,000 | 1 | 5 | 1 | LTO5 | 0000-00-00 00:00:00 |
    | 34 | 000069L5 | Append | 1 | 64,512 | 0 | 31,536,000 | 1 | 6 | 1 | LTO5 | 0000-00-00 00:00:00 |
    | 35 | 000068L5 | Append | 1 | 64,512 | 0 | 31,536,000 | 1 | 7 | 1 | LTO5 | 0000-00-00 00:00:00 |
    | 36 | 000067L5 | Append | 1 | 64,512 | 0 | 31,536,000 | 1 | 8 | 1 | LTO5 | 0000-00-00 00:00:00 |
    | 37 | 000066L5 | Append | 1 | 64,512 | 0 | 31,536,000 | 1 | 9 | 1 | LTO5 | 0000-00-00 00:00:00 |
    | 38 | 000085L5 | Append | 1 | 64,512 | 0 | 31,536,000 | 1 | 10 | 1 | LTO5 | 0000-00-00 00:00:00 |
    | 39 | 000084L5 | Append | 1 | 64,512 | 0 | 31,536,000 | 1 | 0 | 0 | LTO5 | 0000-00-00 00:00:00 |
    | 40 | 000082L5 | Append | 1 | 64,512 | 0 | 31,536,000 | 1 | 12 | 1 | LTO5 | 0000-00-00 00:00:00 |
    +———+————+———–+———+———-+———-+————–+———+——+———–+———–+———————+

    Reply

Deixe uma resposta

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *

%d blogueiros gostam disto: