2014/07/15 16:36 1/27 Instalação e Configuração do Bacula no Debian Squeeze Douglas Quintiliano dos Santos - http://douglas.wiki.br/ Instalação e Configuração do Bacula no Debian Squeeze Disco de 100GB para os backups ■ ip do servidor: 192.168.0.80 ■ Prepare o seu sistema com o seguinte script http://www.douglas.wiki.br/doku.php?id=confinicialsqueeze para que não falte nenhum pacote ou configuração. Vamos ajustar o hosts vim /etc/hosts 127.0.0.1 localhost 192.168.0.80 bacula.douglas.wiki.br bacula [...] Vamos instalar os pré-requisitos para podermos compilar o bacula aptitude install libreadline-dev libreadline6-dev postgresql postgresql-client postgresql-common postgresql-contrib \ postgresql-doc postgresql-server-dev-all postgresql-server-dev-8.4 libreadline6-dev libreadline6 lib32readline6 lib32readline6-dev -y Agora vamos ajustar o acesso ao postgresql sed -i "s/#listen_addresses = 'localhost'/listen_addresses = '*'/g" /etc/postgresql/8.4/main/ postgresql.conf Agora precisamos reiniciar o postgresql /etc/init.d/postgresql restart Agora vamos criar um arquivo para importar para preparar a base para o bacula vim /tmp/base.sql ALTER USER postgres WITH PASSWORD 'senha'; CREATE USER bacula WITH PASSWORD 'senha'; CREATE DATABASE bacula WITH OWNER bacula ENCODING 'SQL_ASCII' TEMPLATE=template0; Agora precisamos importar a base su postgres -c 'psql -f /tmp/base.sql' Agora vamos criar os diretórios para o bacula mkdir /var/lib/bacula mkdir /var/run/bacula mkdir /var/log/bacula mkdir -p /etc/bacula/scripts Agora vamos criar o usuário bacula useradd -s /bin/bash -d /var/lib/bacula bacula Agora vamos ajustar as permissões dos diretórios
27
Embed
Instalacao e Configuracao Do Bacula No Debian Squeeze
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
2014/07/15 16:36 1/27 Instalação e Configuração do Bacula no Debian Squeeze
Douglas Quintiliano dos Santos - http://douglas.wiki.br/
Instalação e Configuração do Bacula no Debian Squeeze
Disco de 100GB para os backups■
ip do servidor: 192.168.0.80■
Prepare o seu sistema com o seguinte script http://www.douglas.wiki.br/doku.php?id=confinicialsqueeze paraque não falte nenhum pacote ou configuração.
Vamos ajustar o hosts
vim /etc/hosts127.0.0.1 localhost192.168.0.80 bacula.douglas.wiki.br bacula[...]
Vamos instalar os pré-requisitos para podermos compilar o bacula
sed -i "s/#listen_addresses = 'localhost'/listen_addresses = '*'/g" /etc/postgresql/8.4/main/postgresql.conf
Agora precisamos reiniciar o postgresql
/etc/init.d/postgresql restart
Agora vamos criar um arquivo para importar para preparar a base para o bacula
vim /tmp/base.sqlALTER USER postgres WITH PASSWORD 'senha';CREATE USER bacula WITH PASSWORD 'senha';CREATE DATABASE bacula WITH OWNER bacula ENCODING 'SQL_ASCII' TEMPLATE=template0;
Agora vamos deixar o arquivo do director do bacula da seguinte forma
2014/07/15 16:36 3/27 Instalação e Configuração do Bacula no Debian Squeeze
Douglas Quintiliano dos Santos - http://douglas.wiki.br/
vim /etc/bacula/bacula-dir.conf############################################# ARQUIVO DE CONFIGURACAO PADRAO DO BACULA ############################################# # DEFININDO O 'DIRECTOR' # Director { Name = bacula-dir DIRport = 9101 # Porta de Comunicacao do Bacula QueryFile = "/etc/bacula/scripts/query.sql" # Script de Query WorkingDirectory = "/var/lib/bacula" # Diretório de Trabalho do Bacula PidDirectory = "/var/run/bacula" # PID do Bacula Maximum Concurrent Jobs = 1 # Maximo de Backups em Execucao Password = "Cv70F6pf1t6pBopT4vQOnigDrR0v3L" # Senha para ajustar no Bconsole Messages = Daemon # Nivel de mensagens} # DEFINICOES DE CLIENTES E JOBS ## ARQUIVO ONDE SERA CONFIGURADO E AJUSTADO OS CLIENTES E JOBS DO BACULA # @/etc/bacula/bacula-dir-clients-and-jobs.conf # DEFINICOES DE ARQUIVOS PARA BACKUP - (FILE SETS)## ARQUIVO ONDE SERA CONFIGURADO E AJUSTADO OS 'FILE SETS' DO BACULA # @/etc/bacula/bacula-dir-filesets.conf # DEFINICOES DE AGENDAMENTO DOS BACKUPS #@/etc/bacula/bacula-dir-agendamento.conf # DEFINICOES DE DISPOSITIVO DE ARMAZENAMENTO ## AQUI DEFINIMOS O STORAGE A SER UTILIZADO PELO BACULA # Storage { Name = File Address = bacula.douglas.wiki.br # Pode ser usado Nome ou IP SDPort = 9103 # Porta de Comunicação do Storage Password = "LE_T_-c_55qu1f777Dm52map-s3xpgR4q" # Senha Storage Bacula Device = FileStorage # Device de Storage Media Type = File # Tipo de Midia (Fita, DVD, HD) Maximum Concurrent Jobs = 10 # Num. Maximo de Jobs executados nessa Storage.} # Generic catalog serviceCatalog { Name = Catalogo # Nome do Catalogo dbname = "bacula"; dbaddress = 127.0.0.1; dbuser = "bacula"; dbpassword = "senha" # Configuracoesdo PostGreSQL} # Reasonable message delivery -- send most everything to email address# and to the consoleMessages { Name = Standard # ABAIXO E POSSIVEL AJUSTAR COMO O BACULA ENVIARA MENSAGENS AO ADMINISTRADOR # mailcommand = "/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: %t %e of %c %l\" %r" operatorcommand = "/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: Intervention neededfor %j\" %r" mail = root@localhost = all, !skipped operator = root@localhost = mount console = all, !skipped, !saved append = "/var/log/bacula/bacula.log" = all, !skipped catalog = all}
http://douglas.wiki.br/Printed on 2014/07/15 16:36
# Message delivery for daemon messages (no job).Messages { Name = Daemon mailcommand = "/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula daemon message\" %r" mail = root@localhost = all, !skipped console = all, !skipped, !saved append = "/var/log/bacula/bacula.log" = all, !skipped} # POOL PADRAO DEFINIDOPool { Name = File # o Job de Backup por padrao aponta para o 'File' Pool Type = Backup # O Tipo do Pool = Backup, Restore, Etc. Recycle = yes # Bacula can automatically recycle Volumes AutoPrune = yes # Prune expired volumes Volume Retention = 1 month # Retencao de Volume = 1 Mes Volume Use Duration = 23 hours # Duracao de um volume aberto Maximum Volume Bytes = 20 Gb # Tamanho maximo de um volume Maximum Volumes = 10 # Volume Bytes X Volumes <= Dispositivo de backup LabelFormat = "volume" # Nome Default do Volume} # Scratch pool definition# Volumes que serao emprestado a alguma Pool temporariamentePool { Name = Scratch Pool Type = Backup} ## Restricted console used by tray-monitor to get the status of the director#Console { Name = bacula-mon Password = "aNy+nof5uHWBvO3tv8YRy5OJo3YVDsuAuET06WRmDcuw" CommandACL = status, .status}
Agora vamos criar o arquivo que controla os agendamentos do bacula
vim /etc/bacula/bacula-dir-agendamento.conf################################################################### ARQUIVO DE CONFIGURACAO DE AGENDAMENTO DE TAREFAS DO BACULA #################################################################### DEFINICOES DE AGENDAMENTO DOS BACKUPS # # AGENDAMENTO PADRAO DO BACULA - CICLO SEMANAL DE BACKUP #Schedule { Name = "WeeklyCycle" # Ciclo Semanal de Backup Run = Level=Full 1st sun at 23:05 # Backup Full no Primeiro Domingo do Mes as 23:05hrs Run = Level=Differential 2nd-5th sun at 16:50 # Backup Diferencial de Seg. a Sabado as 23:05hrs Run = Level=Incremental mon-sat at 10:30 # Backup Incremental de Seg. a Sabado as 23:05hrs} # AGENDAMENTO PARA SERVIDOR LINUX - CICLO SEMANAL DE BACKUP #Schedule { Name = "CicloBackupProxy" Run = Level=Full 1st sun at 23:00 Run = Level=Full mon-sat at 10:00} # AGENDAMENTO PARA SERVIDOR WINDOWS SERVER - CICLO SEMANAL DE BACKUP #
2014/07/15 16:36 5/27 Instalação e Configuração do Bacula no Debian Squeeze
Douglas Quintiliano dos Santos - http://douglas.wiki.br/
Schedule { Name = "CicloBackupWindows" # Ciclo Semanal de Backup Run = Level=Full 1st sun at 23:00 # Backup Full no Primeiro Domingo do Mesas 23:05 hrs Run = Level=Differential 2nd-5th sun at 14:10 # Backup Diferencial de Seg. a Sabado as11:40 hrs Run = Level=Full mon-sat at 10:00 # Backup Incremental de Seg. a Sabado as11:25} # DEFINICOES DE AGENDAMENTO DO BACKUP DOS CATALOGOS ## FEITO SEMPRE DEPOIS DOS BACKUPS #Schedule { Name = "WeeklyCycleAfterBackup" Run = Level=Full sun-sat at 09:15}
Agora vamos criar o arquivo de controle dos clientes do bacula e jobs do bacula
vim /etc/bacula/bacula-dir-clients-and-jobs.conf##################################################### ARQUIVO DE CONFIGURACAO PARA CLIENTES E JOBS ##################################################### # JOB PADRAO PARA O BACULA SERVER #JobDefs { Name = "DefaultJobs" # Nome do Job Padrao Type = Backup # Tipo de Job (Backup, Restore, Verificacao) Level = Incremental # Nivel do Job (Full, Incremental, Diferencial) Client = bacula-fd # Nome do Cliente FD FileSet = "Full Set" # File Set Definido para Esse Job Schedule = "WeeklyCycle" # Agendamento Definido para Esse Job Storage = File # Define Storage Messages = Standard # Nivel de mensagens Pool = File # Define a Pool Priority = 10 # Qual o nivel de Prioridade Write Bootstrap = "/var/lib/bacula/%c.bsr" # Arquivo gerado pelo Bacula para armazenarinformacoes de backups feitos em seus clientes.# AS OPCOES ABAIXO EVITAM QUE SEJAM DUPLICADO JOBS NO SERVIDOR, CASO TENHA UM JOB DUPLICADO O MESMO ECANCELADO Allow Duplicate Jobs = no # Permite Jobs Duplicados Cancel Lower Level Duplicates = yes # Cancela niveis inferiores duplicados} # JOB DE BACKUP PARA OS SERVIDORES WINDOWS SERVER #JobDefs { Name = "DefaultWindows" # Nome do Job Para Servidores Windows Type = Backup # Tipo de Job (Backup, Restore, Verificacao) Level = Incremental # Nivel do Job (Full, Incremental, Diferencial) Client = bacula-fd # Nome do Cliente FD FileSet = "WindowsFS" # File Set Definido para Esse Job Schedule = "CicloBackupWindows" # Agendamento Definido para Esse Job Storage = File # Define Storage Messages = Standard # Nivel de mensagens Pool = File # Define a Pool Priority = 10 # Qual o nivel de Prioridade Write Bootstrap = "/var/lib/bacula/%c.bsr" # Arquivo gerado pelo Bacula para armazenarinformacoes de backups feitos em seus clientes.# AS OPCOES ABAIXO EVITAM QUE SEJAM DUPLICADO JOBS NO SERVIDOR, CASO TENHA UM JOB DUPLICADO O MESMO ECANCELADO Allow Duplicate Jobs = no # Permite Jobs Duplicados Cancel Lower Level Duplicates = yes # Cancela niveis inferiores duplicados} # JOB DE BACKUP DO CATALOGO #Job { Name = "BackupCatalogo" # Nome do Job ParaBackup do Catalogo JobDefs = "DefaultJobs" # JobDefs usado para
http://douglas.wiki.br/Printed on 2014/07/15 16:36
operacao Level = Full # Nivel do Job (Full,Incremental, Diferencial) FileSet = "Catalogo" # File Set Definidopara Esse Job Schedule = "WeeklyCycleAfterBackup" # AgendamentoDefinido para Esse Job RunBeforeJob = "/etc/bacula/scripts/make_catalog_backup.pl Catalogo" # Acao executadaantes da operacao Write Bootstrap = "/var/lib/bacula/%c.bsr" # Arquivo geradopelo Bacula para armazenar informacoes de backups feitos em seus clientes. Priority = 11 # Executar depois doBackup - ajustar prioridade} # JOB DE RESTAURACAO - (RESTORE) - SO E PRECISO ESSE JOBS PARA RESTAURACAO DE BACKUP #Job { Name = "RestoreFiles" # Nome do Job ParaRestore Type = Restore # Tipo de Job (Backup,Restore, Verificacao) Client = bacula-fd # Nome do Cliente FD FileSet = "Full Set" # File Set Definido paraEsse Job Storage = File # Agendamento Definidopara Esse Job Pool = File # Define a Pool Messages = Standard # Nivel de mensagens Where = /tmp/bacula-restores # Diretorio onde o baculaira restaurar os arquivos nos clientes} ######################################################################### AQUI VAMOS DEFINIR OS CLIENTES E JOBS PARA CADA CLIENTE ADICIONADO ######################################################################## ## ------------------------------------------------------------------- ### JOB DE BACKUP PARA O DIRECTOR DO BACULA# HOSTNAME: bacula.douglas.wiki.br# IP: 192.168.0.80 Job { Name = "BackupDirector" # Nome do Job para Backup do Director(Proprio Servidor Bacula) JobDefs = "DefaultJobs" # JObDefs Definido Client = bacula-fd # Cliente fd} Client { Name = bacula-fd # Cliente fd Address = bacula.douglas.wiki.br # Ajustado no /etc/hosts Password = "ExgYbEinJWMf7lsWPBcpffZaNMmiGcbgp" # Senha do Director do Bacula @/etc/bacula/clientes/basic-client # Arquivo onde contem informacoes sobre o cliente.}## -------------------------------------------------------------------- ##
Agora vamos criar o arquivo que define o que vamos copiar dos clientes
vim /etc/bacula/bacula-dir-filesets.conf##################################################### ARQUIVO DE CONFIGURACAO PARA CLIENTES E JOBS ##################################################### # LISTA DOS ARQUIVOS QUE SERAO COPIADOS FileSet { Name = "Full Set" # Nome do FileSets
2014/07/15 16:36 7/27 Instalação e Configuração do Bacula no Debian Squeeze
Douglas Quintiliano dos Santos - http://douglas.wiki.br/
# Arquivos que serao incluidos para serem copiados ao backup Include { Options { signature = SHA1 compression = GZIP verify = pin1 onefs = no } File = /etc File = /root File = /var/log File = /var/www File = /home File = /usr/sbin File = /etc/bacula/ }# Arquivos que serao ignorados ao backup Exclude { File = /var/lib/bacula File = /proc File = /tmp File = /.journal File = /.fsck }} # LISTA DOS ARQUIVOS QUE SERAO COPIADOS - CATALOGO # FileSet { Name = "Catalogo"# Arquivos que serao incluidos para serem copiados ao backup Include { Options { signature = SHA1 } File = "/var/lib/bacula/bacula.sql" }} # LISTA DOS ARQUIVOS QUE SERAO COPIADOS - SISTEMA WINDOWS SERVER # FileSet { Name = "WindowsFS" #Habilita o Volume shadow copy service Enable VSS = yes# Arquivos que serao incluidos para serem copiados ao backup Include {# Plugin = "alldrivers" Options { signature = SHA1 Compression = GZIP OneFS = no } File = "C:/" File = "F:/" }}
Agora vamos configurar o bacula como cliente tambem
vim /etc/bacula/bacula-fd.conf############################################################### ARQUIVO DE CONFIGURACAO DO FILE DAEMON DO BACULA ############################################################### ## List Directors who are permitted to contact this File daemon#Director {
http://douglas.wiki.br/Printed on 2014/07/15 16:36
Name = bacula-dir # Nome do Director Password = "ExgYbEinJWMf7lsWPBcpffZaNMmiGcbgp" # ESTA SENHA ESTA DEFINIDA NO ARQUIVO DE CLIENTEEM /ETC/BACULA/BACULA-DIR-CLIENTS-AND-JOBS.CONF} ## Restricted Director, used by tray-monitor to get the# status of the file daemon#Director { Name = bacula-mon Password = "z27BNYXA9dx1SZWk1vp-kSZ8azwz2HMS8" # ESTA SENHA E UTILIZADO PELO BACULA-MONITOR Monitor = yes} ## "Global" File daemon configuration specifications#FileDaemon { Name = bacula-fd # Nome do Bacula-fd FDport = 9102 # Porta de Comunicacao do bacula-fd WorkingDirectory = /var/lib/bacula # Diretorio de trabalho Pid Directory = /var/run/bacula # Diretorio de Pid Maximum Concurrent Jobs = 20 # Numero maximo de jobs executados no bacula FDAddress = 0.0.0.0 # COMENTAR OU REMOVER ESSA LINHA PARA QUE ELE POSSA 'OUVIR'CONEXOES EM TODAS AS INTERFACES} # Send all messages except skipped files back to DirectorMessages { Name = Standard director = bacula-dir = all, !skipped, !restored # AS MENSAGEM SAO ENCAMINHADAS PARA O'BACULA-DIR' DEFINIDO NESSA LINHA}
Agora vamos ajustar o arquivo de controle do armazenamento do backup
vim /etc/bacula/bacula-sd.conf############################################################### ARQUIVO PADRAO DE CONFIGURACAO DE STORAGE DO BACULA ############################################################### Storage { Name = bacula-sd # Nome do Storage SDPort = 9103 # Porta do Director WorkingDirectory = "/var/lib/bacula" # Diretorio de Trabalho Pid Directory = "/var/run/bacula" # Pid do Bacula Maximum Concurrent Jobs = 20 # Maximo de Backups em Execucao SDAddress = 0.0.0.0 # Comentar ou remover essa Linha para nao fazer loopback} ## List Directors who are permitted to contact Storage daemon#Director { Name = bacula-dir Password = "LE_T_-c_55qu1f777Dm52map-s3xpgR4q"} ## Restricted Director, used by tray-monitor to get the# status of the storage daemon# Usado pelo tray-monitor do bacula para obter status do servidorDirector { Name = bacula-mon Password = "kNuOgEZUq2pqP6hRqPHMHm7UyxCOG1LBf" Monitor = yes
2014/07/15 16:36 9/27 Instalação e Configuração do Bacula no Debian Squeeze
Douglas Quintiliano dos Santos - http://douglas.wiki.br/
} # ABAIXO DEFINIMOS O NOME, TIPO, E O DIRETÓRIO DE ARQUIVOS DO BACULA Device { Name = FileStorage # Nome do Device Media Type = File # Tipo de Midia (DVD, CD, HD, FITA) Archive Device = /srv/backup # Diretorio onde serao salvos os volumes de backup LabelMedia = yes; # Midias de Etiquetamento do Bacula Random Access = Yes; # AutomaticMount = yes; # Montar Automaticamente RemovableMedia = no; # Midia Removivel AlwaysOpen = no; # Manter Sempre Aberto} ## Send all messages to the Director,# mount messages also are sent to the email address#Messages { Name = Standard director = bacula-dir = all}
Agora vamos ajustar o arquivo do bconsole que é como vamos conectar no bacula para fazer backup pela linhade comando
vim /etc/bacula/bconsole.conf## Bacula User Agent (or Console) Configuration File# Director { Name = bacula-dir DIRport = 9101 address = bacula Password = "Cv70F6pf1t6pBopT4vQOnigDrR0v3L"}
Agora vamos criar o diretório para armazenar os clientes
mkdir -p /etc/bacula/clientes
Agora vamos criar o arquivo de controle básico para os clientes
vim /etc/bacula/clientes/basic-client############################################################ ARQUIVO PARA CONFIGURACAO DE CLIENTE LINUX NO BACULA ############################################################ Catalog = Catalogo # Nome do Catalogo definido File Retention = 30 days # Tempo de Retencao do Backup Job Retention = 6 months # Tempo de Retencao do Job AutoPrune = yes # Prune de Jobs/Arquivos Expirados
Agora vamos criar o diretório para armazenar os backups
Agora vamos testar o bacula, vamos verificar se ele está respondendo e se ele está reconhecendo o ele comocliente
Vamos se conectar no bconsole
bconsoleConnecting to Director bacula:91011000 OK: bacula-dir Version: 5.2.13 (19 February 2013)Enter a period to cancel a command.*
Ele está respondendo, agora vamos testar o cliente bacula ainda no bconsole
*status client=bacula-fdConnecting to Client bacula-fd at bacula.douglas.wiki.br:9102 bacula-fd Version: 5.2.13 (19 February 2013) x86_64-unknown-linux-gnu debian 6.0.7Daemon started 12-Abr-13 13:23. Jobs: run=0 running=0. Heap: heap=270,336 smbytes=23,497 max_bytes=23,644 bufs=53 max_bufs=54 Sizeof: boffset_t=8 size_t=8 debug=0 trace=0Running Jobs:Director connected at: 12-Abr-13 13:25No Jobs running.==== Terminated Jobs:====*
O nosso bacula está sendo reconhecido como cliente.
Vamos efetuar um backup do catalogo que é o banco de dados de controle do bacula
*runAutomatically selected Catalog: CatalogoUsing Catalog "Catalogo"A job name must be specified.The defined Job resources are: 1: BackupCatalogo 2: RestoreFiles 3: BackupDirectorSelect Job resource (1-3): 1Run Backup jobJobName: BackupCatalogoLevel: FullClient: bacula-fdFileSet: CatalogoPool: File (From Job resource)Storage: File (From Job resource)
2014/07/15 16:36 11/27 Instalação e Configuração do Bacula no Debian Squeeze
Douglas Quintiliano dos Santos - http://douglas.wiki.br/
When: 2013-04-12 13:27:02Priority: 11OK to run? (yes/mod/no): yesJob queued. JobId=1
Aqui o primeiro comando é run que chama a execução do backup, depois precisamos selecionar a opção comoeu quero backup do catalogo tive que escolher a opção 1 e por fim precisei confirmar com um yes.
Agora vamos consultar o job de backup ainda no bconsole
list jobs+-------+----------------+---------------------+------+-------+----------+----------+-----------+| jobid | name | starttime | type | level | jobfiles | jobbytes | jobstatus |+-------+----------------+---------------------+------+-------+----------+----------+-----------+| 1 | BackupCatalogo | 2013-04-12 13:27:05 | B | F | 1 | 43,545 | T |+-------+----------------+---------------------+------+-------+----------+----------+-----------+
Agora se eu consultar o status do cliente novamente no bconsole vamos ter a seguinte mensagem
status client=bacula-fdConnecting to Client bacula-fd at bacula.douglas.wiki.br:9102 bacula-fd Version: 5.2.13 (19 February 2013) x86_64-unknown-linux-gnu debian 6.0.7Daemon started 12-Abr-13 13:23. Jobs: run=1 running=0. Heap: heap=675,840 smbytes=99,492 max_bytes=169,308 bufs=60 max_bufs=79 Sizeof: boffset_t=8 size_t=8 debug=0 trace=0Running Jobs:Director connected at: 12-Abr-13 13:28No Jobs running.==== Terminated Jobs: JobId Level Files Bytes Status Finished Name====================================================================== 1 Full 1 43.54 K OK 12-Abr-13 13:27 BackupCatalogo
Como podemos notar temos um backup do tipo full efetuado as 13:27 com sucesso.
Agora vamos fazer backup dos arquivos do servidor
*runA job name must be specified.The defined Job resources are: 1: BackupCatalogo 2: RestoreFiles 3: BackupDirectorSelect Job resource (1-3): 3Run Backup jobJobName: BackupDirectorLevel: IncrementalClient: bacula-fdFileSet: Full SetPool: File (From Job resource)Storage: File (From Job resource)When: 2013-04-12 13:29:50Priority: 10OK to run? (yes/mod/no): yesJob queued. JobId=2
Aqui o primeiro comando é run que chama a execução do backup, depois precisamos selecionar a opção comoeu quero backup dos arquivos do servidor tive que escolher a opção 3 e por fim precisei confirmar com um yes.
Agora vamos consultar o job do nosso backup no bconsole
http://douglas.wiki.br/Printed on 2014/07/15 16:36
*list jobs+-------+----------------+---------------------+------+-------+----------+------------+-----------+| jobid | name | starttime | type | level | jobfiles | jobbytes | jobstatus |+-------+----------------+---------------------+------+-------+----------+------------+-----------+| 1 | BackupCatalogo | 2013-04-12 13:27:05 | B | F | 1 | 43,545 | T || 2 | BackupDirector | 2013-04-12 13:29:53 | B | F | 1,889 | 22,790,302 | T |+-------+----------------+---------------------+------+-------+----------+------------+-----------+
Como pode ser notado temos o backup ok to tipo full com um total de 1.889 arquivos, agora vamos consultar ostatus do nosso cliente no bconsole
status client=bacula-fdConnecting to Client bacula-fd at bacula.douglas.wiki.br:9102 bacula-fd Version: 5.2.13 (19 February 2013) x86_64-unknown-linux-gnu debian 6.0.7Daemon started 12-Abr-13 13:23. Jobs: run=2 running=0. Heap: heap=819,200 smbytes=101,017 max_bytes=186,312 bufs=65 max_bufs=118 Sizeof: boffset_t=8 size_t=8 debug=0 trace=0Running Jobs:Director connected at: 12-Abr-13 13:31No Jobs running.==== Terminated Jobs: JobId Level Files Bytes Status Finished Name====================================================================== 1 Full 1 43.54 K OK 12-Abr-13 13:27 BackupCatalogo 2 Full 1,889 22.79 M OK 12-Abr-13 13:29 BackupDirector
Temos agora as informações que o backup ocorreu com sucesso :D.
Agora se eu precisar restaurar por exemplo o /etc/network do backup podemos fazer da seguinte forma nobconsole
*restore First you select one or more JobIds that contain filesto be restored. You will be presented several methodsof specifying the JobIds. Then you will be allowed toselect which files from those JobIds are to be restored. To select the JobIds, you have the following choices: 1: List last 20 Jobs run 2: List Jobs where a given File is saved 3: Enter list of comma separated JobIds to select 4: Enter SQL list command 5: Select the most recent backup for a client 6: Select backup for a client before a specified time 7: Enter a list of files to restore 8: Enter a list of files to restore before a specified time 9: Find the JobIds of the most recent backup for a client 10: Find the JobIds for a backup for a client before a specified time 11: Enter a list of directories to restore for found JobIds 12: Select full restore to a specified Job date 13: CancelSelect item: (1-13): 5Automatically selected Client: bacula-fdThe defined FileSet resources are: 1: Catalogo 2: Full SetSelect FileSet resource (1-2): 2+-------+-------+----------+------------+---------------------+------------+| jobid | level | jobfiles | jobbytes | starttime | volumename |+-------+-------+----------+------------+---------------------+------------+| 2 | F | 1,889 | 22,790,302 | 2013-04-12 13:29:53 | volume0001 |
2014/07/15 16:36 13/27 Instalação e Configuração do Bacula no Debian Squeeze
Douglas Quintiliano dos Santos - http://douglas.wiki.br/
+-------+-------+----------+------------+---------------------+------------+You have selected the following JobId: 2 Building directory tree for JobId(s) 2 ... +++++++++++++++++++++++++++++++++++++++++++++1,711 files inserted into the tree. You are now entering file selection mode where you add (mark) andremove (unmark) files to be restored. No files are initially added, unlessyou used the "all" keyword on the command line.Enter "done" to leave this mode. cwd is: /$ lsetc/home/root/usr/var/$ cd etc/cwd is: /etc/$ ls.pwd.lockMuttrcMuttrc.d/X11/acpi/adduser.conf[...]modulesmotdmotd.tailmtabnanorcnetwork/networksnsswitch.conf[...]vim/w3m/wgetrcxml/zsh/$ mark network13 files marked.$ doneBootstrap records written to /var/lib/bacula/bacula-dir.restore.1.bsr The job will require the following Volume(s) Storage(s) SD Device(s)=========================================================================== volume0001 File FileStorage Volumes marked with "*" are online. 14 files selected to be restored. Run Restore jobJobName: RestoreFilesBootstrap: /var/lib/bacula/bacula-dir.restore.1.bsrWhere: /tmp/bacula-restoresReplace: alwaysFileSet: Full SetBackup Client: bacula-fdRestore Client: bacula-fdStorage: FileWhen: 2013-04-12 13:33:41Catalog: CatalogoPriority: 10
http://douglas.wiki.br/Printed on 2014/07/15 16:36
notepad c:\Windows\System32\Drivers\etc\hosts[...]#No final do arquivo insira a seguinte linha192.168.0.80 bacula.douglas.wiki.br
Agora vamos deixar o backup-fd.conf da seguinte forma
notepad "c:\Windows\Arquivos de Programas\Bacula\bacula-fd.conf"# Default Bacula File Daemon Configuration file## For Bacula release 5.2.6 (02/21/12) -- Windows MinGW32## There is not much to change here except perhaps the# File daemon Name# ## "Global" File daemon configuration specifications#FileDaemon { Name = win2008-fd # Nome do cliente-fd FDport = 9102 # Porta de Comunicacao WorkingDirectory = "C:\\Program Files\\Bacula\\working" # Diretorio de Trabalho Pid Directory = "C:\\Program Files\\Bacula\\working" # Diretorio de PID# Plugin Directory = "C:\\Program Files\\Bacula\\plugins" # Diretorio de Plugins Maximum Concurrent Jobs = 10 # Numero Maximo de Jobs emexecucao} ## List Directors who are permitted to contact this File daemon#Director { Name = bacula-dir # ALTERAR PARA O NOME DO 'DIRECTOR' DO BACULA Password = "a0wDKVckyaTacqItfkCxddJxyBLwAXFn7" # SENHA PARA COMUNICACAO COM ARQUIVOCLIENTS-AND-JOBS.CONF} ## Restricted Director, used by tray-monitor to get the# status of the file daemon# UTILIZADO PELO BACULA MONITORDirector { Name = bacula-mon Password = "yQevDJfJg7fBgp8PfOxWTKqTqhUUTvAMn" Monitor = yes} # Send all messages except skipped files back to DirectorMessages { Name = Standard director = bacula-dir = all, !skipped, !restored}
Agora para podermos efetuar backup do c: do Windows precisamos importar a seguinte chave do resgistro
notepad bacula.regWindows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\wbengine] [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\wbengine\SystemStateBackup]"ALlowSSBToAny"=dword:00000001
Agora precisamos mandar iniciar o serviço do bacula e o serviço Detecção de Serviços Interativos (Interactive
2014/07/15 16:36 17/27 Instalação e Configuração do Bacula no Debian Squeeze
Douglas Quintiliano dos Santos - http://douglas.wiki.br/
Services Detection)
Agora para o bacula conseguir chegar no cliente precisamos liberar a porta 9102 no servidor Windows(Liberar aporta 9102 no Firewall).
Agora no servidor bacula vamos criar um novo cliente
vim /etc/bacula/bacula-dir-clients-and-jobs.conf[...]#Inserir no final do arquivoJob { Name = "BackupWin2008" # Nome do Job para Backup do Director (ProprioServidor Bacula) JobDefs = "DefaultWindows" # JObDefs Definido Client = win2008-fd # Cliente fd} Client { Name = win2008-fd # Cliente fd Address = win2008.douglas.wiki.br # Ajustado no /etc/hosts Password = "a0wDKVckyaTacqItfkCxddJxyBLwAXFn7" # Senha do Director do Bacula que foidefinida no cliente @/etc/bacula/clientes/basic-client # Arquivo onde contem informacoes sobre o cliente.}
Aqui nos definimos o job de backup do windows e depois a sua configuração.
Agora vamos inserir no /etc/hosts a entrada para o win2012
vim /etc/hosts127.0.0.1 localhost192.168.0.80 bacula.douglas.wiki.br bacula192.168.0.92 win2008.douglas.wiki.br win2008[...]
Agora vamos chamar o bconsole para testarmos a conexão com o cliente
bconsoleConnecting to Director bacula:91011000 OK: bacula-dir Version: 5.2.13 (19 February 2013)Enter a period to cancel a command.*status client=win2008-fdConnecting to Client win2008-fd at win2008.douglas.wiki.br:9102 win2008-fd Version: 5.2.10 (28 June 2012) VSS Linux Cross-compile Win64Daemon started 12-Apr-13 15:19. Jobs: run=0 running=0.Microsoft Windows Server 2008 R2 Enterprise Edition Service Pack 1 (build 7601), 64-bit Heap: heap=0 smbytes=16,962 max_bytes=17,109 bufs=53 max_bufs=54 Sizeof: boffset_t=8 size_t=8 debug=0 trace=1Running Jobs:Director connected at: 12-Apr-13 15:23No Jobs running.==== Terminated Jobs:====*
http://douglas.wiki.br/Printed on 2014/07/15 16:36
Como pode ser notado estamos chegando no cliente com sucesso.
Agora vamos mandar efetuar um backup do cliente
*runAutomatically selected Catalog: CatalogoUsing Catalog "Catalogo"A job name must be specified.The defined Job resources are: 1: BackupCatalogo 2: RestoreFiles 3: BackupDirector 4: BackupWin2008Select Job resource (1-4): 4Run Backup jobJobName: BackupWin2008Level: IncrementalClient: win2008-fdFileSet: WindowsFSPool: File (From Job resource)Storage: File (From Job resource)When: 2013-04-12 15:29:11Priority: 10OK to run? (yes/mod/no): yesJob queued. JobId=3*
A mesma história, run para rodar o backup, depois selecionamos a opção de backup no caso 4 para o win2008 edepois um yes para confirmar.
As vezes podemos ter uma mensagem, podemos visualizar ela da seguinte forma no bconsole
*mes12-Abr 14:15 bacula-dir JobId 5: No prior Full backup Job record found.12-Abr 14:15 bacula-dir JobId 5: No prior or suitable Full backup found in catalog. Doing FULL backup.12-Abr 14:15 bacula-dir JobId 5: Start Backup JobId 5, Job=BackupWin2012.2013-04-12_14.15.10_0312-Abr 14:15 bacula-dir JobId 5: Using Device "FileStorage" to write.12-Abr 14:15 bacula-sd JobId 5: Volume "volume0001" previously written, moving to end of data.12-Abr 14:15 bacula-sd JobId 5: Ready to append to end of Volume "volume0001" size=2312057412-Abr 14:15 Win2012-fd JobId 5: Generate VSS snapshots. Driver="Win64 VSS", Drive(s)="CF"
Agora vamos consultar os jobs
*list jobs+-------+----------------+---------------------+------+-------+----------+-----------+-----------+| jobid | name | starttime | type | level | jobfiles | jobbytes | jobstatus |+-------+----------------+---------------------+------+-------+----------+-----------+-----------+| 1 | BackupCatalogo | 2013-04-12 15:13:50 | B | F | 1 | 43,545 | T || 2 | BackupDirector | 2013-04-12 15:14:03 | B | F | 1,891 | 8,068,884 | T || 3 | BackupWin2008 | 2013-04-12 15:29:26 | B | F | 0 | 0 | R |+-------+----------------+---------------------+------+-------+----------+-----------+-----------+*
Ainda está executando, agora vamos verificar o status do cliente windows 2012
*status client=win2008-fdConnecting to Client win2008-fd at win2008.douglas.wiki.br:9102 win2008-fd Version: 5.2.10 (28 June 2012) VSS Linux Cross-compile Win64Daemon started 12-Apr-13 15:19. Jobs: run=0 running=0.Microsoft Windows Server 2008 R2 Enterprise Edition Service Pack 1 (build 7601), 64-bit Heap: heap=0 smbytes=195,578 max_bytes=212,575 bufs=136 max_bufs=158 Sizeof: boffset_t=8 size_t=8 debug=0 trace=1
2014/07/15 16:36 19/27 Instalação e Configuração do Bacula no Debian Squeeze
Douglas Quintiliano dos Santos - http://douglas.wiki.br/
Como podemos ver em Processing file: é o que o bacula está copiando no momento, aqui temos que esperar eleterminar o backup.
Configuração do cliente Windows 2012
Agora vamos instalar um cliente Windows eu vou utilizar um Windows Server 2012 Stardard
Podemos obter o cliente em http://www.douglas.wiki.br/Downloads/misc/bacula-win64-5.2.10.exe
Agora vamos instalar ele
Mande executar o bacula-win64-5.2.10.exe com direito administrativos■
Agora selecione Next■
Agora selecione I Agree■
Agora selecione Automatic■
Agora selecione Next■
Agora vamos informar os dados do bacula-dir:■
Em DIR Name informe: bacula-dir■
Em DIR Password informe: Cv70F6pf1t6pBopT4vQOnigDrR0v3L que é a senha do bacula-dir■
Em DIR Address informe: bacula.douglas.wiki.br■
Agora selecione Install■
Agora selecione Next■
Agora selecione Finish■
Agora vamos ajustar o c:\Windows\System32\Drivers\etc\hosts
notepad c:\Windows\System32\Drivers\etc\hosts[...]#No final do arquivo insira a seguinte linha192.168.0.80 bacula.douglas.wiki.br
Agora vamos deixar o backup-fd.conf da seguinte forma
notepad "c:\Windows\Arquivos de Programas\Bacula\bacula-fd.conf"# Default Bacula File Daemon Configuration file## For Bacula release 5.2.6 (02/21/12) -- Windows MinGW32## There is not much to change here except perhaps the# File daemon Name# #
http://douglas.wiki.br/Printed on 2014/07/15 16:36
# "Global" File daemon configuration specifications#FileDaemon { Name = Win2012-fd # Nome do cliente-fd FDport = 9102 # Porta de Comunicacao WorkingDirectory = "C:\\Program Files\\Bacula\\working" # Diretorio de Trabalho Pid Directory = "C:\\Program Files\\Bacula\\working" # Diretorio de PID# Plugin Directory = "C:\\Program Files\\Bacula\\plugins" # Diretorio de Plugins Maximum Concurrent Jobs = 10 # Numero Maximo de Jobs emexecucao} ## List Directors who are permitted to contact this File daemon#Director { Name = bacula-dir # ALTERAR PARA O NOME DO 'DIRECTOR' DO BACULA Password = "a0wDKVckyaTacqItfkCxddJxyBLwAXFn7" # SENHA PARA COMUNICACAO COM ARQUIVOCLIENTS-AND-JOBS.CONF} ## Restricted Director, used by tray-monitor to get the# status of the file daemon# UTILIZADO PELO BACULA MONITORDirector { Name = bacula-mon Password = "yQevDJfJg7fBgp8PfOxWTKqTqhUUTvAMn" Monitor = yes} # Send all messages except skipped files back to DirectorMessages { Name = Standard director = bacula-dir = all, !skipped, !restored}
Agora para podermos efetuar backup do c: do Windows precisamos importar a seguinte chave do resgistro
notepad bacula.regWindows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\wbengine] [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\wbengine\SystemStateBackup]"ALlowSSBToAny"=dword:00000001
Como estamos utilizando o Windows 2012 como cliente precisamos habilitar a descoberta de serviçosinterativos no registro do Windows:
Agora precisamos mandar iniciar o serviço do bacula e o serviço Detecção de Serviços Interativos.
Agora para o bacula conseguir chegar no cliente precisamos liberar a porta 9102 no servidor Windows.
Agora no servidor bacula vamos criar um novo cliente
vim /etc/bacula/bacula-dir-clients-and-jobs.conf[...]#Inserir no final do arquivoJob {
2014/07/15 16:36 21/27 Instalação e Configuração do Bacula no Debian Squeeze
Douglas Quintiliano dos Santos - http://douglas.wiki.br/
Name = "BackupWin2012" # Nome do Job para Backup do Director (ProprioServidor Bacula) JobDefs = "DefaultWindows" # JObDefs Definido Client = win2012-fd # Cliente fd} Client { Name = win2012-fd # Cliente fd Address = win2012.douglas.wiki.br # Ajustado no /etc/hosts Password = "a0wDKVckyaTacqItfkCxddJxyBLwAXFn7" # Senha do Director do Bacula que foidefinida no cliente @/etc/bacula/clientes/basic-client # Arquivo onde contem informacoes sobre o cliente.}
Aqui nos definimos o job de backup do windows e depois a sua configuração.
Agora vamos inserir no /etc/hosts a entrada para o win2012
vim /etc/hosts127.0.0.1 localhost192.168.0.80 bacula.douglas.wiki.br bacula192.168.0.85 win2012.douglas.wiki.br win2012[...]
Agora vamos pingar no win2012 para verificarmos a conectividade
ping win2012.douglas.wiki.br -c 2PING win2012.douglas.wiki.br (192.168.0.85) 56(84) bytes of data.64 bytes from win2012.douglas.wiki.br (192.168.0.85): icmp_req=1 ttl=128 time=0.438 ms64 bytes from win2012.douglas.wiki.br (192.168.0.85): icmp_req=2 ttl=128 time=0.610 ms --- win2012.douglas.wiki.br ping statistics ---2 packets transmitted, 2 received, 0% packet loss, time 999msrtt min/avg/max/mdev = 0.438/0.524/0.610/0.086 ms
Agora vamos chamar o bconsole para testarmos a conexão com o cliente
bconsoleConnecting to Director bacula:91011000 OK: bacula-dir Version: 5.2.13 (19 February 2013)Enter a period to cancel a command.*status client=win2012-fdConnecting to Client win2012-fd at win2012.douglas.wiki.br:9102 Win2012-fd Version: 5.2.10 (28 June 2012) VSS Linux Cross-compile Win64Daemon started 12-Apr-13 14:06. Jobs: run=0 running=0.Microsoft Standard Edition (build 9200), 64-bit Heap: heap=0 smbytes=18,754 max_bytes=18,901 bufs=53 max_bufs=54 Sizeof: boffset_t=8 size_t=8 debug=0 trace=1Running Jobs:Director connected at: 12-Apr-13 14:08No Jobs running.==== Terminated Jobs:====*
http://douglas.wiki.br/Printed on 2014/07/15 16:36
Como pode ser notado estamos chegando no cliente com sucesso.
Agora vamos mandar efetuar um backup do cliente
*runAutomatically selected Catalog: CatalogoUsing Catalog "Catalogo"A job name must be specified.The defined Job resources are: 1: BackupCatalogo 2: RestoreFiles 3: BackupDirector 4: BackupWin2012Select Job resource (1-4): 4Run Backup jobJobName: BackupWin2012Level: IncrementalClient: win2012-fdFileSet: WindowsFSPool: File (From Job resource)Storage: File (From Job resource)When: 2013-04-12 14:15:08Priority: 10OK to run? (yes/mod/no): yesJob queued. JobId=5You have messages.
A mesma história, run para rodar o backup, depois selecionamos a opção de backup no caso 4 para o win2012 edepois um yes para confirmar.
Note que agora temos uma mensagem, podemos visualizar ela da seguinte forma no bconsole
*mes12-Abr 14:15 bacula-dir JobId 5: No prior Full backup Job record found.12-Abr 14:15 bacula-dir JobId 5: No prior or suitable Full backup found in catalog. Doing FULL backup.12-Abr 14:15 bacula-dir JobId 5: Start Backup JobId 5, Job=BackupWin2012.2013-04-12_14.15.10_0312-Abr 14:15 bacula-dir JobId 5: Using Device "FileStorage" to write.12-Abr 14:15 bacula-sd JobId 5: Volume "volume0001" previously written, moving to end of data.12-Abr 14:15 bacula-sd JobId 5: Ready to append to end of Volume "volume0001" size=2312057412-Abr 14:15 Win2012-fd JobId 5: Generate VSS snapshots. Driver="Win64 VSS", Drive(s)="CF"
Agora vamos consultar os jobs
*list jobs+-------+----------------+---------------------+------+-------+----------+------------+-----------+| jobid | name | starttime | type | level | jobfiles | jobbytes | jobstatus |+-------+----------------+---------------------+------+-------+----------+------------+-----------+| 1 | BackupCatalogo | 2013-04-12 13:27:05 | B | F | 1 | 43,545 | T || 2 | BackupDirector | 2013-04-12 13:29:53 | B | F | 1,889 | 22,790,302 | T || 3 | RestoreFiles | 2013-04-12 13:33:45 | R | F | 14 | 8,975 | T || 4 | BackupWin2012 | 2013-04-12 14:15:22 | B | F | 0 | 0 | R |+-------+----------------+---------------------+------+-------+----------+------------+-----------+*
Ainda está executando, agora vamos verificar o status do cliente windows 2012
*status client=win2012-fdConnecting to Client win2012-fd at win2012.douglas.wiki.br:9102 Win2012-fd Version: 5.2.10 (28 June 2012) VSS Linux Cross-compile Win64Daemon started 12-Apr-13 14:06. Jobs: run=1 running=0.Microsoft Standard Edition (build 9200), 64-bit Heap: heap=0 smbytes=183,408 max_bytes=189,680 bufs=120 max_bufs=127
2014/07/15 16:36 23/27 Instalação e Configuração do Bacula no Debian Squeeze
Douglas Quintiliano dos Santos - http://douglas.wiki.br/
vim /etc/bacula/bacula-fd.conf############################################################### ARQUIVO DE CONFIGURACAO DO FILE DAEMON DO BACULA ############################################################### ## List Directors who are permitted to contact this File daemon#Director { Name = bacula-dir # Nome do Director Password = "a5GGjJ4D7tRnm3C1TSLzU4glxdflLJ56OG77hjtT9zUF" # ESTA SENHA ESTA DEFINIDA NO ARQUIVODE CLIENTE EM /ETC/BACULA/BACULA-DIR-CLIENTS-AND-JOBS.CONF} ## Restricted Director, used by tray-monitor to get the# status of the file daemon#
2014/07/15 16:36 25/27 Instalação e Configuração do Bacula no Debian Squeeze
Douglas Quintiliano dos Santos - http://douglas.wiki.br/
Director { Name = bacula-mon Password = "dBYlH/Q+inv85CGu7TCHpYTW2EtpUwwqHuEmjoRgl/l/" # ESTA SENHA E UTILIZADO PELOBACULA-MONITOR Monitor = yes} ## "Global" File daemon configuration specifications#FileDaemon { Name = debian-fd # Nome do Bacula-fd FDport = 9102 # Porta de Comunicacao do bacula-fd WorkingDirectory = /var/lib/bacula # Diretorio de trabalho Pid Directory = /var/run/bacula # Diretorio de Pid Maximum Concurrent Jobs = 20 # Numero maximo de jobs executados no bacula FDAddress = 0.0.0.0 # COMENTAR OU REMOVER ESSA LINHA PARA QUE ELE POSSA 'OUVIR'CONEXOES EM TODAS AS INTERFACES} # Send all messages except skipped files back to DirectorMessages { Name = Standard director = bacula-dir = all, !skipped, !restored # AS MENSAGEM SAO ENCAMINHADAS PARA O'BACULA-DIR' DEFINIDO NESSA LINHA}
Agora vamos ajustar o arquivo do bconsole que é como vamos conectar no bacula para fazer backup pela linhade comando
vim /etc/bacula/bconsole.conf## Bacula User Agent (or Console) Configuration File# Director { Name = bacula-dir DIRport = 9101 address = bacula.douglas.wiki.br Password = "Cv70F6pf1t6pBopT4vQOnigDrR0v3L"}
Agora vamos reiniciar o serviço do bacula-fd
/etc/init.d/bacula-fd restart
Agora vamos listar verificar se o bacula está escutando
Agora no servidor bacula vamos ajustar a configuração do novo cliente
vim /etc/bacula/bacula-dir-clients-and-jobs.conf[...]#Inserir no final do arquivoJob { Name = "BackupDebian" # Nome do Job para Backup do Director (ProprioServidor Bacula) JobDefs = "DefaultJobs" # JObDefs Definido Client = debian-fd # Cliente fd} Client { Name = debian-fd # Cliente fd
http://douglas.wiki.br/Printed on 2014/07/15 16:36
Address = debian.douglas.wiki.br # Ajustado no /etc/hosts Password = "a5GGjJ4D7tRnm3C1TSLzU4glxdflLJ56OG77hjtT9zUF" # Senha do Director do Bacula @/etc/bacula/clientes/basic-client # Arquivo onde contem informacoes sobre o cliente.}
bconsoleConnecting to Director bacula:91011000 OK: bacula-dir Version: 5.2.13 (19 February 2013)Enter a period to cancel a command.*status client=debian-fdConnecting to Client debian-fd at debian.douglas.wiki.br:9102 debian-fd Version: 5.2.13 (19 February 2013) x86_64-unknown-linux-gnu debian 6.0.7Daemon started 12-Abr-13 15:50. Jobs: run=0 running=0. Heap: heap=135,168 smbytes=21,896 max_bytes=22,043 bufs=52 max_bufs=53 Sizeof: boffset_t=8 size_t=8 debug=0 trace=0Running Jobs:Director connected at: 12-Abr-13 15:51No Jobs running.==== Terminated Jobs:====*
Vamos fazer um backup dele para teste
*runAutomatically selected Catalog: CatalogoUsing Catalog "Catalogo"A job name must be specified.The defined Job resources are: 1: BackupCatalogo 2: RestoreFiles 3: BackupDirector 4: BackupWin2008 5: BackupDebianSelect Job resource (1-5): 5Run Backup jobJobName: BackupDebianLevel: IncrementalClient: debian-fdFileSet: Full SetPool: File (From Job resource)Storage: File (From Job resource)When: 2013-04-12 15:51:52Priority: 10
2014/07/15 16:36 27/27 Instalação e Configuração do Bacula no Debian Squeeze
Douglas Quintiliano dos Santos - http://douglas.wiki.br/
OK to run? (yes/mod/no): yesJob queued. JobId=4
Mesma historia run para fazer o backup 5 para selecionar o meu cliente debian e yes para confirmar
Agora vamos consultar os jobs do cliente
*list jobs+-------+----------------+---------------------+------+-------+----------+---------------+-----------+| jobid | name | starttime | type | level | jobfiles | jobbytes | jobstatus |+-------+----------------+---------------------+------+-------+----------+---------------+-----------+| 1 | BackupCatalogo | 2013-04-12 15:13:50 | B | F | 1 | 43,545 | T || 2 | BackupDirector | 2013-04-12 15:14:03 | B | F | 1,891 | 8,068,884 | T || 3 | BackupWin2008 | 2013-04-12 15:29:26 | B | F | 72,791 | 4,444,285,065 | T || 4 | BackupDebian | 2013-04-12 15:54:20 | B | F | 1,655 | 22,404,559 | T |+-------+----------------+---------------------+------+-------+----------+---------------+-----------+*