>_Backup com Bacula – Atualizando da versão 5 para a versão 7 no CentOS – 1.15

Entendendo um pouco da estrutura de backup do Bacula.

logo

Para atualizar o Bacula da versão 5 para a versão 7, será necessário baixar os pacotes do Bacula no endereço: http://sourceforge.net/projects/bacula/files/bacula/.

Após o download, basta seguir os passos abaixo:

Instalando o comando wget para poder baixar o Bacula via linha de comando.

# yum install wget -y

Baixando o Bacula 7.

# wget -P /opt http://downloads.sourceforge.net/project/bacula/bacula/7.0.5/bacula-7.0.5.tar.gz
# cd /opt

Extraindo o Bacula com o comando tar.

# tar -xvf bacula-7.0.5.tar.gz

Entrando no diretório bacula-7-0.5.

# cd bacula-7.-0.5

Instalação dos pacotes necessários para compilação do Bacula 7.

# yum install gcc make gcc-c++ readline-devel mysql-devel -y

Compilando o Bacula 7 conforme os ajustes da instalação do Bacula 5.

# ./configure --with-mysql --with-readline=/usr/include/readline --disable-conio --bindir=/usr/bin --sbindir=/usr/sbin --with-scriptdir=/usr/libexec/bacula --with-working-dir=/var/spool/bacula
Configuration on Tue May  5 11:02:08 BRT 2015:

   Host:		    x86_64-unknown-linux-gnu -- redhat 
   Bacula version:	    Bacula 7.0.5 (28 July 2014)
   Source code location:    .
   Install binaries:	    /usr/sbin
   Install libraries:	    /usr/lib64
   Install config files:    /etc/bacula
   Scripts directory:	    /usr/libexec/bacula
   Archive directory:	    /tmp
   Working directory:	    /var/spool/bacula
   PID directory:	    /var/run
   Subsys directory:	    /var/lock/subsys
   Man directory:	    ${datarootdir}/man
   Data directory:	    /usr/share
   Plugin directory:	    /usr/lib64
   C Compiler:		    gcc 4.4.7
   C++ Compiler:	    /usr/bin/g++ 4.4.7
   Compiler flags:	     -g -O2 -Wall -fno-strict-aliasing -fno-exceptions -fno-rtti
   Linker flags:	     
   Libraries:		    -lpthread -ldl -ldl 
   Statically Linked Tools: no
   Statically Linked FD:    no
   Statically Linked SD:    no
   Statically Linked DIR:   no
   Statically Linked CONS:  no
   Database backends:	    MySQL
   Database port:	     
   Database name:	    bacula
   Database user:	    bacula

   Job Output Email:	    root@localhost
   Traceback Email:	    root@localhost
   SMTP Host Address:	    localhost

   Director Port:	    9101
   File daemon Port:	    9102
   Storage daemon Port:     9103

   Director User:	    
   Director Group:	    
   Storage Daemon User:     
   Storage DaemonGroup:     
   File Daemon User:	    
   File Daemon Group:	    

   Large file support:	    yes
   Bacula conio support:    no -lreadline -lhistory -ltinfo
   readline support:	    yes 
   TCP Wrappers support:    no 
   TLS support: 	    yes
   Encryption support:	    yes
   ZLIB support:	    yes
   LZO support: 	    no
   enable-smartalloc:	    yes
   enable-lockmgr:	    no
   bat support: 	    no
   client-only: 	    no
   build-dird:		    yes
   build-stored:	    yes
   Plugin support:	    yes
   AFS support: 	    no
   ACL support: 	    no
   XATTR support:	    yes
   systemd support:	    no 
   Batch insert enabled:    MySQL
# make && make install && make install-autostart

Ajustando o banco de dados do Bacula MySQL.

# cd /usr/libexec/bacula/
# ./update_bacula_tables.mysql 
Altering MySQL tables
 
This script will update a Bacula MySQL database from version 12 to 14
 which is needed to convert from Bacula Community version 5.0.x to 5.2.x
 
Update of Bacula MySQL tables succeeded.

Reiniciando os serviços do Bacula.

# /etc/init.d/bacula-dir restart
Stopping Bacula Director services:                         [  OK  ]
Starting Bacula Director services:                         [  OK  ]

# /etc/init.d/bacula-sd restart
Stopping Bacula Storage services:                          [  OK  ]
Starting Bacula Storage services:                          [  OK  ]

# /etc/init.d/bacula-fd restart
Stopping Bacula File services:                             [  OK  ]
Starting Bacula File services:                             [  OK  ]

Validando através do comando bconsole.

# bconsole 
Connecting to Director localhost:9101
1000 OK: 1 bacula-dir Version: 7.0.5 (28 July 2014)
Enter a period to cancel a command.
*list media
Pool: Default
No results to list.
Pool: File
No results to list.
Pool: Scratch
No results to list.
Pool: Diario
+---------+------------+-----------+---------+---------------+----------+--------------+---------+------+-----------+-----------+---------------------+
| MediaId | VolumeName | VolStatus | Enabled | VolBytes      | VolFiles | VolRetention | Recycle | Slot | InChanger | MediaType | LastWritten         |
+---------+------------+-----------+---------+---------------+----------+--------------+---------+------+-----------+-----------+---------------------+
|       3 | diario-0   | Used      |       1 | 8,113,496,928 |        1 |      518,400 |       1 |    0 |         0 | File      | 2015-05-01 23:10:03 |
|       4 | diario-1   | Used      |       1 | 7,122,772,883 |        1 |      518,400 |       1 |    0 |         0 | File      | 2015-05-02 23:10:03 |
|       5 | diario-2   | Used      |       1 | 7,709,724,707 |        1 |      518,400 |       1 |    0 |         0 | File      | 2015-05-04 22:00:05 |
|       6 | diario-3   | Append    |       1 |    36,582,468 |        0 |       86,400 |       1 |    0 |         0 | File      | 2015-05-05 11:07:31 |
+---------+------------+-----------+---------+---------------+----------+--------------+---------+------+-----------+-----------+---------------------+
Pool: Semanal
No results to list.
Pool: Mensal
No results to list.

Continua …
Fonte:
www.bacula.com.br

>_Backup com Bacula – Atualizando da versão 5 para a versão 7 no CentOS – 1.15
Tagged on:

2 thoughts on “>_Backup com Bacula – Atualizando da versão 5 para a versão 7 no CentOS – 1.15

  • 10 de março de 2016 at 10:18
    Permalink

    Olá, ao realizar os passos do tutorial me deparei com as seguintes mensagens ao reiniciar os serviços do bacula:

    [root@bacula bacula]# service bacula restart
    Stopping the Bacula File daemon
    Stopping the Bacula Storage daemon
    Stopping the Bacula Director daemon
    Starting the Bacula Storage daemon
    /sbin/bacula-sd: error while loading shared libraries: libbacpy-5.2.12.so: cannot open shared object file: No such file or directory
    Starting the Bacula File daemon
    /sbin/bacula-fd: error while loading shared libraries: libbacfind-5.2.12.so: cannot open shared object file: No such file or directory
    Starting the Bacula Director daemon
    /sbin/bacula-dir: error while loading shared libraries: libbacfind-5.2.12.so: cannot open shared object file: No such file or directory
    [root@bacula bacula]#

    Utilizo Centos 6
    Atualizei da versão 5.2.12 para 7.0.5

    Parece que ele ainda busca as “libraries” da versão antiga.

    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: