>_Backup com Bacula – Primeiro Cliente Windows – 1.10

Entendendo um pouco da estrutura de backup do Bacula.

logo

Cenário:
Bacula Servidor: IP: 192.168.0.218 FQDN: ba-vm-bkp-01
Bacula Cliente: IP: 192.168.1.41 FQDN: srvdom1

1 – No cliente Windows será preciso instalar o pacote bacula-fd.

Para realizar o download do bacula para Windows, basta acessar o link abaixo:
http://sourceforge.net/projects/bacula/files/Win32_64/5.2.10/

1
Após o download, execute o instalador como administrador e siga os passos como no exemplo abaixo:

1

2

2

3
Observação: O nome do nosso servidor Bacula Director é o bacula-dir.

3

4
Por padrão o instalar gera um template do cliente para ser adicionado no servidor Bacula Director.

4

5
Ajustando o arquivo do cliente (srvdom1) bacula-fd.conf.

5

6
PARA

6

7
Reiniciando o bacula-fd no cliente Windows.

7

2 – Ajustando o servidor Bacula Director.

# cd /etc/bacula/
# vim bacula-dir.conf 

3 – Criando o template do cliente Windows (srvdom1).

#
Client {
        Name = srvdom1-fd
        Address = 192.168.1.41                 # IP/FQDN DO CLIENTE
        FDPort = 9102
        Catalog = MyCatalog
        Password = "senha-windows"              # password for FileDaemon 2
        File Retention = 30 days                # 30 days
        Job Retention = 6 months                # six months
        AutoPrune = yes                         # Prune expired Jobs/Files
}

4 – Criando o Job do cliente Windows (srvdom1).

Job {
        Name    = "Backup do cliente Windows"
        Client  = srvdom1-fd
        JobDefs = "DefaultJob"
        FileSet = client_windows_set
}

5 – Criando o FileSet do cliente Windows (srvdom1).

FileSet {
  Name = "client_windows_set"
  Include {
    Options {
      signature = MD5
    }
    File = C:/
  }

  Exclude {
    File = .exe
  }
}

6 – Reiniciando o servidor Director.

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

7 – Validando a configuração do cliente Windows (srvdom1).

# bconsole 
Connecting to Director localhost:9101
1000 OK: bacula-dir Version: 5.0.0 (26 January 2010)
Enter a period to cancel a command.
*status
Status available for:
     1: Director
     2: Storage
     3: Client
     4: All
Select daemon type for status (1-4): 3
Select daemon type for status (1-4): 3
The defined Client resources are:
     1: bacula-fd
     2: debian-client-bacula-fd
     3: srvdom1-fd
Select Client (File daemon) resource (1-3): 3
Select Client (File daemon) resource (1-3): 3
Connecting to Client srvdom1-fd at 192.168.1.41:9102

srvdom1-fd Version: 5.2.10 (28 June 2012)  VSS Linux Cross-compile Win64
Daemon started 29-Apr-15 09:36. Jobs: run=0 running=0.
Microsoft Windows Server 2008 R2 Standard Edition Service Pack 1 (build 7601), 64-bit
 Heap: heap=0 smbytes=65,540 max_bytes=16,605,078 bufs=77 max_bufs=106,695
 Sizeof: boffset_t=8 size_t=8 debug=0 trace=1 
Running Jobs:
Director connected at: 29-Apr-15 10:15
No Jobs running.
====

Terminated Jobs:
====
You have messages.

Backup Windows Systemstate.

Ajustando o FileSet do cliente Windows no bacula-dir.conf.

FileSet {
  Name = "client_windows_set"
  Include {
    Options {
      signature = MD5
    }
    File = E:/WindowsImageBackup/ # Fará o backup somente desse diretório.
  }
}

Ajustando o Job do cliente Windows no bacula-dir.conf.

Job {
        Name    = "Backup do cliente Windows"
        Client  = srvdom1-fd
        JobDefs = "DefaultJob"
        FileSet = client_windows_set
        ClientRunBeforeJob = E:/backup.bat # Chama o script que esta localizado no cliente Windows.
}

Reiniciando o servidor Bacula Director.

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

Ajustando o cliente Windows.

No Windows Server será  preciso instalar a feature de Backup. Vejamos no exemplo abaixo:

10

Após a instalação, será executado o comando logo abaixo no prompt do Windows para validação.

Observação: Neste exemplo, o cliente Windows possui mais uma unidade chamada E:. Local onde será armazenado o backup do Windows Systemstate.

wbadmin start systemstatebackup -backupTarget:E: -quiet

11

Por fim será criado o arquivo backup.bat  dentro da na unidade E:. Este arquivo backup.bat contém  o comando acima.
Observação: No diretório WindowsImageBackup será armazenado o backup do SystemState por padrão.

12

Novamente no servido Bacula Director, o próximo passo será a validação de todas as alterações realizadas.

# bconsole 
Connecting to Director localhost:9101
1000 OK: bacula-dir Version: 5.0.0 (26 January 2010)
Enter a period to cancel a command.
*status
Status available for:
     1: Director
     2: Storage
     3: Client
     4: All
Select daemon type for status (1-4): 3

Verificando com o comando status.

Select Client (File daemon) resource (1-3): 3
Connecting to Client srvdom1-fd at 192.168.1.41:9102

srvdom1-fd Version: 5.2.10 (28 June 2012)  VSS Linux Cross-compile Win64
Daemon started 29-Apr-15 09:36. Jobs: run=0 running=0.
Microsoft Windows Server 2008 R2 Standard Edition Service Pack 1 (build 7601), 64-bit
 Heap: heap=0 smbytes=65,540 max_bytes=25,024,682 bufs=77 max_bufs=161,009
 Sizeof: boffset_t=8 size_t=8 debug=0 trace=1 
Running Jobs:
Director connected at: 29-Apr-15 12:23
No Jobs running.
====

Terminated Jobs:
====
*

Validando com o comando estimate listing.

*estimate listing
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): 3
Using Catalog "MyCatalog"
Connecting to Client srvdom1-fd at 192.168.1.41:9102
...
drwxrwxrwx 1 0 0 0 2015-04-29 11:58:22 E:/WindowsImageBackup/SRVDOM1/Backup 2015-04-29 145639
drwxrwxrwx 1 0 0 0 2015-04-29 11:58:22 E:/WindowsImageBackup/SRVDOM1
drwxrwxrwx 1 0 0 0 2015-04-29 11:58:22 E:/WindowsImageBackup/
2000 OK estimate files=23 bytes=8,424,362,662
*run
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): 3
Run Backup job
JobName:  Backup do cliente Windows
Level:    Incremental
Client:   srvdom1-fd
FileSet:  client_windows_set
Pool:     File (From Job resource)
Storage:  File (From Job resource)
When:     2015-04-29 12:23:43
Priority: 10
OK to run? (yes/mod/no): yes

Continua …
Fonte:
www.bacula.com.br
www.bacula.org

>_Backup com Bacula – Primeiro Cliente Windows – 1.10
Tagged on:

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: