rapport d’annexes - polytechnique · rapport d’annexes : solution de sauvegarde par le r eseau...

41
Rapport d’annexes : Solution de sauvegarde par le r´ eseau (bacula) Yann BELEMA eseaux et T´ el´ ecommunications 2 e ann´ ee A l’attention de : – Mme Danielle CABALLERO, tutrice p´ edagogique – M. James REGIS, maˆ ıtre de stage 2010/2011

Upload: phamthuan

Post on 12-Jan-2019

214 views

Category:

Documents


0 download

TRANSCRIPT

Rapport d’annexes :Solution de sauvegarde par le reseau

(bacula)

Yann BELEMAReseaux et Telecommunications 2e annee

A l’attention de :– Mme Danielle CABALLERO, tutrice pedagogique– M. James REGIS, maıtre de stage 2010/2011

Laboratoire LIX

Yann Belema 2 2010/2011

Table des matieres

A Diagramme de GANTT effectif 4

B Fichiers de configuration Bacula 6

B.1 Configuration du directeur . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

B.2 Configuration du service bacula-sd . . . . . . . . . . . . . . . . . . . . . . . . . . 31

B.3 Configuration du service bacula-fd . . . . . . . . . . . . . . . . . . . . . . . . . . 33

B.4 Configuration de la console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

C Sauvegarde sur machines Windows 36

3

A Diagramme de GANTT effectif

4

Laboratoire LIX

Figure A.1 – Tableau de Gantt

Yann Belema 5 2010/2011

B Fichiers de configuration Bacula

Cette partie contient les configurations finales des services Bacula ; elles sont valables pour

toutes les parties du rapport qui y font references. Ces configurations constituent aussi un

exemple valide d’une mise en œuvre du projet Bacula. On trouve les fichiers de configuration

dans le repertoire /etc/bacula/.

B.1 Configuration du directeur

# Default Bacula Director Configuration file

#

# The only thing that MUST be changed is to add one or more

# file or directory names in the Include directive of the

# FileSet resource.

#

# For Bacula release 5.0.0 (26 January 2010) -- redhat Enterprise release

#

# You might also want to change the default email address

# from root to your address. See the "mail" and "operator"

# directives in the Messages resource.

#

Director { # define myself

Name = svr0-dir

DIRport = 9101 # where we listen for UA connections

QueryFile = "/usr/libexec/bacula/query.sql"

WorkingDirectory = "/var/spool/bacula"

PidDirectory = "/var/run"

Maximum Concurrent Jobs = 1

Password = "V+dCsItoimH/sFkk6Fcx5jqjjlZHzsi9WW/z4RfFsjsS" # Console password

6

Laboratoire LIX

Messages = Daemon

}

JobDefs {

Name = "DefaultJob"

Type = Backup

Level = Incremental

Client = svr0-fd

FileSet = "Full Set"

Schedule = "WeeklyCycle"

Storage = LTO-4

Messages = Standard

Pool = Default

Priority = 10

Write Bootstrap = "/var/spool/bacula/%c.bsr"

}

JobDefs {

Name = "ArgosJob"

Type = Backup

Level = Incremental

Client = argos-fd

FileSet = "Argos Set"

Schedule = "WeeklyCycle"

Storage = LTO-4

Messages = Standard

Pool = Default

Priority = 10

Write Bootstrap = "/var/spool/bacula/%c.bsr"

}

JobDefs {

Name = "LdapJob"

Type = Backup

Level = Full

Client = ldap-fd

FileSet = "Ldap Set"

Schedule = "DailyCycle"

Storage = LTO-4

Messages = Standard

Yann Belema 7 2010/2011

Laboratoire LIX

Pool = Default

Priority = 10

Write Bootstrap = "/var/spool/bacula/%c.bsr"

}

JobDefs {

Name = "SambaJob"

Type = Backup

Level = Incremental

Client = samba-fd

FileSet = "Samba Set"

Schedule = "WeeklyCycle"

Storage = LTO-4

Messages = Standard

Pool = Default

Priority = 10

Write Bootstrap = "/var/spool/bacula/%c.bsr"

}

JobDefs {

Name = "GitJob"

Type = Backup

Level = Full

Client = git-fd

FileSet = "Git Set"

Schedule = "DailyCycle"

Storage = LTO-4

Messages = Standard

Pool = Default

Priority = 10

Write Bootstrap = "/var/spool/bacula/%c.bsr"

}

JobDefs {

Name = "JabberJob"

Type = Backup

Level = Full

Client = jabber-fd

FileSet = "Jabber Set"

Schedule = "MonthlyCycle"

Yann Belema 8 2010/2011

Laboratoire LIX

Storage = LTO-4

Messages = Standard

Pool = Default

Priority = 10

Write Bootstrap = "/var/spool/bacula/%c.bsr"

}

JobDefs {

Name = "HydraJob"

Type = Backup

Level = Incremental

Client = hydra-fd

FileSet = "Hydra Set"

Schedule = "WeeklyCycle"

Storage = LTO-4

Messages = Standard

Pool = Default

Priority = 10

Write Bootstrap = "/var/spool/bacula/%c.bsr"

}

JobDefs {

Name = "CupsJob"

Type = Backup

Level = Full

Client = cups-fd

FileSet = "Cups Set"

Schedule = "MonthlyCycle"

Storage = LTO-4

Messages = Standard

Pool = Default

Priority = 10

Write Bootstrap = "/var/spool/bacula/%c.bsr"

}

JobDefs {

Name = "ProxyJob"

Type = Backup

Level = Full

Client = proxy-fd

Yann Belema 9 2010/2011

Laboratoire LIX

FileSet = "Proxy Set"

Schedule = "MonthlyCycle"

Storage = LTO-4

Messages = Standard

Pool = Default

Priority = 10

Write Bootstrap = "/var/spool/bacula/%c.bsr"

}

JobDefs {

Name = "VpnJob"

Type = Backup

Level = Full

Client = vpn-fd

FileSet = "Vpn Set"

Schedule = "DailyCycle"

Storage = LTO-4

Messages = Standard

Pool = Default

Priority = 10

Write Bootstrap = "/var/spool/bacula/%c.bsr"

}

JobDefs {

Name = "DbJob"

Type = Backup

Level = Incremental

Client = db-fd

FileSet = "Db Set"

Schedule = "WeeklyCycle"

Storage = LTO-4

Messages = Standard

Pool = Default

Priority = 10

Write Bootstrap = "/var/spool/bacula/%c.bsr"

}

JobDefs {

Name = "ClientJob"

Type = Backup

Yann Belema 10 2010/2011

Laboratoire LIX

Level = Incremental

Client = client-fd

FileSet = "Client Set"

Schedule = "WeeklyCycle"

Storage = File

Messages = Standard

Pool = File

Priority = 10

Write Bootstrap = "/var/spool/bacula/%c.bsr"

}

JobDefs {

Name = "BelemaJob"

Type = Backup

Level = Incremental

Client = belema-fd

FileSet = "Belema Set"

Schedule = "WeeklyCycle"

Storage = File

Messages = Standard

Pool = File

Priority = 10

Write Bootstrap = "/var/spool/bacula/%c.bsr"

}

#

# Define the main nightly save backup job

# By default, this job will back up to disk in /tmp

Job {

Name = "BackupClient1"

JobDefs = "DefaultJob"

}

Job {

Name = "Argos"

JobDefs = "ArgosJob"

}

Job {

Yann Belema 11 2010/2011

Laboratoire LIX

Name = "Ldap"

JobDefs = "LdapJob"

}

Job {

Name = "Samba"

JobDefs = "SambaJob"

}

Job {

Name = "Git"

JobDefs = "GitJob"

}

Job {

Name = "Jabber"

JobDefs = "JabberJob"

}

Job {

Name = "Hydra"

JobDefs = "HydraJob"

}

Job {

Name = "Cups"

JobDefs = "CupsJob"

}

Job {

Name = "Proxy"

JobDefs = "ProxyJob"

}

Job {

Name = "Vpn"

JobDefs = "VpnJob"

}

Job {

Yann Belema 12 2010/2011

Laboratoire LIX

Name = "Db"

JobDefs = "DbJob"

ClientRunBeforeJob = "/bin/bash /root/backup-databases.sh"

}

Job {

Name = "Client"

JobDefs = "ClientJob"

}

Job {

ClientRunBeforeJob = "\"C:/Program Files/Bacula/bacula-fd.exe\""

Name = "Belema"

JobDefs = "BelemaJob"

}

#Job {

# Name = "BackupClient2"

# Client = bacula2-fd

# JobDefs = "DefaultJob"

#}

# Backup the catalog database (after the nightly save)

Job {

Name = "BackupCatalog"

JobDefs = "DefaultJob"

Level = Full

FileSet="Catalog"

Schedule = "WeeklyCycleAfterBackup"

# This creates an ASCII copy of the catalog

# Arguments to make_catalog_backup.pl are:

# make_catalog_backup.pl <catalog-name>

RunBeforeJob = "/usr/libexec/bacula/make_catalog_backup.pl MyCatalog"

# This deletes the copy of the catalog

RunAfterJob = "/usr/libexec/bacula/delete_catalog_backup"

Write Bootstrap = "/var/spool/bacula/%n.bsr"

Priority = 11 # run after main backup

}

Yann Belema 13 2010/2011

Laboratoire LIX

#

# Standard Restore template, to be changed by Console program

# Only one such job is needed for all Jobs/Clients/Storage ...

#

Job {

Name = "RestoreFiles"

Type = Restore

Client=svr0-fd

FileSet="Full Set"

Storage = File

Pool = Default

Messages = Standard

Where = /tmp/bacula-restores

Write Bootstrap = "/var/spool/bacula/RestoreFiles.bsr"

}

# List of files to be backed up

FileSet {

Name = "Full Set"

Include {

Options {

Sparse = yes

signature = MD5

}

#

# Put your list of files here, preceded by ’File =’, one per line

# or include an external list with:

#

# File = <file-name

#

# Note: / backs up everything on the root partition.

# if you have other partitions such as /usr or /home

# you will probably want to add them too.

#

# By default this is defined to point to the Bacula binary

# directory to give a reasonable FileSet to backup to

# disk storage during initial testing.

#

File = /usr/sbin

Yann Belema 14 2010/2011

Laboratoire LIX

}

#

# If you backup the root directory, the following two excluded

# files can be useful

#

Exclude {

File = /var/spool/bacula

File = /tmp

File = /proc

File = /tmp

File = /.journal

File = /.fsck

}

}

FileSet {

Name = "Argos Set"

Include {

Options {

Sparse = yes

signature = MD5

}

File = /var/spool/mail

File = /var/indexes

}

Exclude {

File = /var/spool/bacula

File = /tmp

File = /proc

File = /.journal

File = /.autofsck

File = /.fsck

}

}

FileSet {

Yann Belema 15 2010/2011

Laboratoire LIX

Name = "Ldap Set"

Include {

Options {

Sparse = yes

signature = MD5

}

File = /etc/dirsrv

File = /var/lib/dirsrv

}

Exclude {

File = /var/spool/bacula

File = /tmp

File = /proc

File = /.journal

File = /.autofsck

File = /.fsck

}

}

FileSet {

Name = "Samba Set"

Include {

Options {

Sparse = yes

signature = MD5

}

File = /etc/samba

}

Exclude {

File = /var/spool/bacula

File = /tmp

File = /proc

File = /.journal

File = /.autofsck

Yann Belema 16 2010/2011

Laboratoire LIX

File = /.fsck

}

}

FileSet {

Name = "Git Set"

Include {

Options {

Sparse = yes

signature = MD5

}

File = /gitorious

File = /etc/httpd/conf.d/gitorious.conf

}

Exclude {

File = /var/spool/bacula

File = /tmp

File = /proc

File = /.journal

File = /.autofsck

File = /.fsck

}

}

FileSet {

Name = "Jabber Set"

Include {

Options {

Sparse = yes

signature = MD5

}

File = /etc/ejabberd

}

Exclude {

Yann Belema 17 2010/2011

Laboratoire LIX

File = /var/spool/bacula

File = /tmp

File = /proc

File = /.journal

File = /.autofsck

File = /.fsck

}

}

FileSet {

Name = "Hydra Set"

Include {

Options {

Sparse = yes

signature = MD5

}

File = /export/users

File = /export/apps

}

Exclude {

File = /var/spool/bacula

File = /tmp

File = /proc

File = /.journal

File = /.autofsck

File = /.fsck

}

}

FileSet {

Name = "Cups Set"

Include {

Options {

Sparse = yes

signature = MD5

}

Yann Belema 18 2010/2011

Laboratoire LIX

File = /etc/cups.d

}

Exclude {

File = /var/spool/bacula

File = /tmp

File = /proc

File = /.journal

File = /.autofsck

File = /.fsck

}

}

FileSet {

Name = "Proxy Set"

Include {

Options {

Sparse = yes

signature = MD5

}

File = /etc/httpd/conf

File = /etc/httpd/conf.d

File = /var/www/html/lix

}

Exclude {

File = /var/spool/bacula

File = /tmp

File = /proc

File = /.journal

File = /.autofsck

File = /.fsck

}

}

FileSet {

Name = "Vpn Set"

Yann Belema 19 2010/2011

Laboratoire LIX

Include {

Options {

Sparse = yes

signature = MD5

}

File = /etc/openvpn

}

Exclude {

File = /var/spool/bacula

File = /tmp

File = /proc

File = /.journal

File = /.autofsck

File = /.fsck

}

}

FileSet {

Name = "Db Set"

Include {

Options {

Sparse = yes

signature = MD5

}

File = /var/lib/pgsql

File = /var/lib/mysql

File = /root/DataBasesDump

}

Exclude {

File = /var/spool/bacula

File = /tmp

File = /proc

File = /.journal

File = /.autofsck

Yann Belema 20 2010/2011

Laboratoire LIX

File = /.fsck

}

}

FileSet {

Name = "Client Set"

Include {

Options {

Sparse = yes

signature = MD5

}

File = /tests

}

Exclude {

File = /var/spool/bacula

File = /tmp

File = /proc

File = /.journal

File = /.autofsck

File = /.fsck

}

}

FileSet {

Name = "Belema Set"

Include {

Options {

Sparse = yes

signature = MD5

}

File = "C:/joomla"

}

Exclude {

}

Yann Belema 21 2010/2011

Laboratoire LIX

}

#

# When to do the backups, full backup on first sunday of the month,

# differential (i.e. incremental since full) every other sunday,

# and incremental backups other days

Schedule {

Name = "WeeklyCycle"

Run = Full 1st sun at 23:05

Run = Differential 2nd-5th sun at 23:05

Run = Incremental mon-sat at 23:05

}

Schedule {

Name = "MonthlyCycle"

Run = Full 1st sun at 23:05

}

Schedule {

Name = "DailyCycle"

Run = Full mon-sun at 23:05

}

# This schedule does the catalog. It starts after the WeeklyCycle

Schedule {

Name = "WeeklyCycleAfterBackup"

Run = Full sun-sat at 23:10

}

# This is the backup of the catalog

FileSet {

Name = "Catalog"

Include {

Options {

signature = MD5

}

File = "/var/spool/bacula/bacula.sql"

}

}

Yann Belema 22 2010/2011

Laboratoire LIX

# Client (File Services) to backup

Client {

Name = svr0-fd

Address = 129.104.11.180

FDPort = 9102

Catalog = MyCatalog

Password = "U4/q01zp9ByCgHMCnwMvdvUeqstXA13wcD7KzSd5I6lz" # password for FileDaemon

File Retention = 90 days # 90 days

Job Retention = 6 months # six months

AutoPrune = yes # Prune expired Jobs/Files

}

Client {

Name = argos-fd

Address = 129.104.11.2

FDPort = 9102

Catalog = MyCatalog

Password = "U4/q01zp9ByCgHMCnwMvdvUeqstXA13wcD7KzSd5I6lz" # password for FileDaemon

File Retention = 90 days # 90 days

Job Retention = 6 months # six months

AutoPrune = yes # Prune expired Jobs/Files

}

Client {

Name = ldap-fd

Address = 129.104.11.70

FDPort = 9102

Catalog = MyCatalog

Password = "U4/q01zp9ByCgHMCnwMvdvUeqstXA13wcD7KzSd5I6lz" # password for FileDaemon

File Retention = 90 days # 90 days

Job Retention = 6 months # six months

AutoPrune = yes # Prune expired Jobs/Files

}

Client {

Name = samba-fd

Address = 129.104.11.75

FDPort = 9102

Catalog = MyCatalog

Password = "U4/q01zp9ByCgHMCnwMvdvUeqstXA13wcD7KzSd5I6lz" # password for FileDaemon

Yann Belema 23 2010/2011

Laboratoire LIX

File Retention = 90 days # 90 days

Job Retention = 6 months # six months

AutoPrune = yes # Prune expired Jobs/Files

}

Client {

Name = git-fd

Address = 129.104.11.7

FDPort = 9102

Catalog = MyCatalog

Password = "U4/q01zp9ByCgHMCnwMvdvUeqstXA13wcD7KzSd5I6lz" # password for FileDaemon

File Retention = 90 days # 90 days

Job Retention = 6 months # six months

AutoPrune = yes # Prune expired Jobs/Files

}

Client {

Name = jabber-fd

Address = 129.104.11.73

FDPort = 9102

Catalog = MyCatalog

Password = "U4/q01zp9ByCgHMCnwMvdvUeqstXA13wcD7KzSd5I6lz" # password for FileDaemon

File Retention = 90 days # 90 days

Job Retention = 6 months # six months

AutoPrune = yes # Prune expired Jobs/Files

}

Client {

Name = hydra-fd

Address = 129.104.11.220

FDPort = 9102

Catalog = MyCatalog

Password = "U4/q01zp9ByCgHMCnwMvdvUeqstXA13wcD7KzSd5I6lz" # password for FileDaemon

File Retention = 90 days # 90 days

Job Retention = 6 months # six months

AutoPrune = yes # Prune expired Jobs/Files

}

Client {

Name = cups-fd

Yann Belema 24 2010/2011

Laboratoire LIX

Address = 129.104.11.66

FDPort = 9102

Catalog = MyCatalog

Password = "U4/q01zp9ByCgHMCnwMvdvUeqstXA13wcD7KzSd5I6lz" # password for FileDaemon

File Retention = 90 days # 90 days

Job Retention = 6 months # six months

AutoPrune = yes # Prune expired Jobs/Files

}

Client {

Name = proxy-fd

Address = 129.104.11.29

FDPort = 9102

Catalog = MyCatalog

Password = "U4/q01zp9ByCgHMCnwMvdvUeqstXA13wcD7KzSd5I6lz" # password for FileDaemon

File Retention = 90 days # 90 days

Job Retention = 6 months # six months

AutoPrune = yes # Prune expired Jobs/Files

}

Client {

Name = vpn-fd

Address = 129.104.11.8

FDPort = 9102

Catalog = MyCatalog

Password = "U4/q01zp9ByCgHMCnwMvdvUeqstXA13wcD7KzSd5I6lz" # password for FileDaemon

File Retention = 90 days # 90 days

Job Retention = 1 month # one months

AutoPrune = yes # Prune expired Jobs/Files

}

Client {

Name = db-fd

Address = db

FDPort = 9102

Catalog = MyCatalog

Password = "U4/q01zp9ByCgHMCnwMvdvUeqstXA13wcD7KzSd5I6lz" # password for FileDaemon

File Retention = 90 days # 90 days

Job Retention = 1 month # one month

Yann Belema 25 2010/2011

Laboratoire LIX

AutoPrune = yes # Prune expired Jobs/Files

}

Client {

Name = client-fd

Address = 192.168.112.53

FDPort = 9102

Catalog = MyCatalog

Password = "U4/q01zp9ByCgHMCnwMvdvUeqstXA13wcD7KzSd5I6lz" # password for FileDaemon

File Retention = 90 days # 90 days

Job Retention = 6 months # six months

AutoPrune = yes # Prune expired Jobs/Files

}

Client {

Name = belema-fd

Address = 192.168.112.139

FDPort = 9102

Catalog = MyCatalog

Password = "PvkPSJVCCO3qdVz+800mw0P69LdcJZde/yjhPgXigWxS"

File Retention = 30 days # 30 days

Job Retention = 6 months # six months

AutoPrune = yes # Prune expired Jobs/Files

}

#

# Second Client (File Services) to backup

# You should change Name, Address, and Password before using

#

#Client {

# Name = bacula2-fd

# Address = client2.example.com

# FDPort = 9102

# Catalog = MyCatalog

# Password = "@@FD_PASSWORD@@2" # password for FileDaemon 2

# File Retention = 30 days # 30 days

# Job Retention = 6 months # six months

# AutoPrune = yes # Prune expired Jobs/Files

#}

Yann Belema 26 2010/2011

Laboratoire LIX

# Definition of file storage device

Storage {

Name = File

# Do not use "localhost" here

Address = 129.104.11.184 # N.B. Use a fully qualified name here

SDPort = 9103

Password = "KHKdBEhfn5r8owxQakpSS1jRbdOE/2wjRQbCzScKxIz4"

Device = FileStorage

Media Type = File

}

Storage {

Name = Autochanger

Address = 129.104.11.184

SDPort = 9103

Password = "KHKdBEhfn5r8owxQakpSS1jRbdOE/2wjRQbCzScKxIz4"

Media Type = LTO-4

Device = autochanger

}

Storage {

Name = LTO-4

# Do not use "localhost" here

Address = 129.104.11.184 # N.B. Use a fully qualified name here

SDPort = 9103

Password = "KHKdBEhfn5r8owxQakpSS1jRbdOE/2wjRQbCzScKxIz4"

Device = TL2000

Media Type = LTO-4

Autochanger = yes

}

# Definition of DDS tape storage device

#Storage {

# Name = DDS-4

# Do not use "localhost" here

# Address = storage.example.com # N.B. Use a fully qualified name here

# SDPort = 9103

# Password = "@@SD_PASSWORD@@" # password for Storage daemon

Yann Belema 27 2010/2011

Laboratoire LIX

# Device = DDS-4 # must be same as Device in Storage daemon

# Media Type = DDS-4 # must be same as MediaType in Storage daemon

# Autochanger = yes # enable for autochanger device

#}

# Definition of 8mm tape storage device

#Storage {

# Name = "8mmDrive"

# Do not use "localhost" here

# Address = storage.example.com # N.B. Use a fully qualified name here

# SDPort = 9103

# Password = "@@SD_PASSWORD@@"

# Device = "Exabyte 8mm"

# MediaType = "8mm"

#}

# Definition of DVD storage device

#Storage {

# Name = "DVD"

# Do not use "localhost" here

# Address = storage.example.com # N.B. Use a fully qualified name here

# SDPort = 9103

# Password = "@@SD_PASSWORD@@"

# Device = "DVD Writer"

# MediaType = "DVD"

#}

# Generic catalog service

Catalog {

Name = MyCatalog

# Uncomment the following line if you want the dbi driver

# dbdriver = "dbi:sqlite3"; dbaddress = 127.0.0.1; dbport =

dbname = bacula; dbuser = root; dbpassword = "database" DB Address = 129.104.11.180;

}

# Reasonable message delivery -- send most everything to email address

# and to the console

Messages {

Name = Standard

Yann Belema 28 2010/2011

Laboratoire LIX

#

# NOTE! If you send to two email or more email addresses, you will need

# to replace the %r in the from field (-f part) with a single valid

# email address in both the mailcommand and the operatorcommand.

# What this does is, it sets the email address that emails would display

# in the FROM field, which is by default the same email as they’re being

# sent to. However, if you send email to more than one address, then

# you’ll have to set the FROM address manually, to a single address.

# for example, a ’[email protected]’, is better since that tends to

# tell (most) people that its coming from an automated source.

#

mailcommand = "/usr/sbin/bsmtp -h lix.polytechnique.fr -f \"\(Bacula\)

\<%r\>\" -s \"Bacula: %t %e of %c %l\" %r"

operatorcommand = "/usr/sbin/bsmtp -h lix.polytechnique.fr -f \"\(Bacula\)

\<%r\>\" -s \"Bacula: Intervention needed for %j\" %r"

mail = [email protected] = all, !skipped

operator = [email protected] = mount

console = all, !skipped, !saved

#

# WARNING! the following will create a file that you must cycle from

# time to time as it will grow indefinitely. However, it will

# also keep all your messages if they scroll off the console.

#

append = "/var/spool/bacula/log" = all, !skipped

catalog = all

}

#

# Message delivery for daemon messages (no job).

Messages {

Name = Daemon

mailcommand = "/usr/sbin/bsmtp -h lix.polytechnique.fr -f \"\(Bacula\)

\<%r\>\" -s \"Bacula daemon message\" %r"

mail = [email protected] = all, !skipped

console = all, !skipped, !saved

append = "/var/log/bacula.log" = all, !skipped

}

Yann Belema 29 2010/2011

Laboratoire LIX

# Default pool definition

Pool {

Name = Default

Pool Type = Backup

Recycle = yes # Bacula can automatically recycle Volumes

AutoPrune = yes # Prune expired volumes

Volume Retention = 90 days # three months

Maximum Volume Bytes = 1600G

Maximum Volumes = 24

}

# 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

}

# Scratch pool definition

Pool {

Name = Scratch

Pool Type = Backup

}

#

# Restricted console used by tray-monitor to get the status of the director

#

Console {

Name = svr0-mon

Password = "P7ElW+C9DRvBmnhlp38GfYBTtlaxF8TRvxhEoAV4Bi7g"

CommandACL = status, .status

}

Yann Belema 30 2010/2011

Laboratoire LIX

B.2 Configuration du service bacula-sd

#

# Default Bacula Storage Daemon Configuration file

#

# For Bacula release 5.0.0 (26 January 2010) -- redhat Enterprise release

#

# You may need to change the name of your tape drive

# on the "Archive Device" directive in the Device

# resource. If you change the Name and/or the

# "Media Type" in the Device resource, please ensure

# that dird.conf has corresponding changes.

#

Storage { # definition of myself

Name = svr4.lix.polytechnique.fr-sd

SDPort = 9103 # Director’s port

WorkingDirectory = "/var/spool/bacula"

Pid Directory = "/var/run"

Maximum Concurrent Jobs = 20

}

#

# List Directors who are permitted to contact Storage daemon

#

Director {

Name = svr0.lix.polytechnique.fr-dir

Password = "KHKdBEhfn5r8owxQakpSS1jRbdOE/2wjRQbCzScKxIz4"

}

#

# Restricted Director, used by tray-monitor to get the

# status of the storage daemon

#

Director {

Name = svr0.lix.polytechnique.fr-mon

Password = "P7ElW+C9DRvBmnhlp38GfYBTtlaxF8TRvxhEoAV4Bi7g"

Monitor = yes

}

Yann Belema 31 2010/2011

Laboratoire LIX

#

# Note, for a list of additional Device templates please

# see the directory <bacula-source>/examples/devices

# Or follow the following link:

# http://bacula.svn.sourceforge.net/viewvc/bacula/trunk/bacula/examples/devices/

#

#

# Devices supported by this Storage daemon

# To connect, the Director’s bacula-dir.conf must have the

# same Name and MediaType.

#

Device {

Name = FileStorage

Media Type = File

Archive Device = /tmp

LabelMedia = yes; # lets Bacula label unlabeled media

Random Access = Yes;

AutomaticMount = yes; # when device opened, read it

RemovableMedia = no;

AlwaysOpen = no;

}

Autochanger {

Name = autochanger

Device = TL2000

Changer Command = "/usr/libexec/bacula/mtx-changer %c %o %S %a %d"

Changer Device = /dev/changer-sg4

}

Device {

Name = TL2000

Media Type = LTO-4

#Archive Device = /dev/tape/by-id/scsi-1IBM_3573-TL_00X2U78F5382_LL0

Archive Device = /dev/nst0

AutomaticMount = yes; # when device opened, read it

Autoselect = yes

AlwaysOpen = yes;

Yann Belema 32 2010/2011

Laboratoire LIX

RemovableMedia = yes;

RandomAccess = no;

AutoChanger = yes

## # Enable the Alert command only if you have the mtx package loaded

Alert Command = "sh -c ’tapeinfo -f %c |grep TapeAlert|cat’"

### If you have smartctl, enable this, it has more info than tapeinfo

### Alert Command = "sh -c ’smartctl -H -l error %c’"

}

#

# Send all messages to the Director,

# mount messages also are sent to the email address

#

Messages {

Name = Standard

director = svr0.lix.polytechnique.fr-dir = all

}

B.3 Configuration du service bacula-fd

#

# Default Bacula File Daemon Configuration file

#

# For Bacula release 5.0.0 (26 January 2010) -- redhat Enterprise release

#

# There is not much to change here except perhaps the

# File daemon Name to

#

#

# List Directors who are permitted to contact this File daemon

#

Director {

Name = svr0.lix.polytechnique.fr-dir

Password = "U4/q01zp9ByCgHMCnwMvdvUeqstXA13wcD7KzSd5I6lz"

}

#

Yann Belema 33 2010/2011

Laboratoire LIX

# Restricted Director, used by tray-monitor to get the

# status of the file daemon

#

Director {

Name = svr0.lix.polytechnique.fr-mon

Password = "P7ElW+C9DRvBmnhlp38GfYBTtlaxF8TRvxhEoAV4Bi7g"

Monitor = yes

}

#

# "Global" File daemon configuration specifications

#

FileDaemon { # this is me

Name = svr0.lix.polytechnique.fr-fd

FDport = 9102 # where we listen for the director

WorkingDirectory = /var/spool/bacula

Pid Directory = /var/run

Maximum Concurrent Jobs = 20

}

# Send all messages except skipped files back to Director

Messages {

Name = Standard

director = svr0.lix.polytechnique.fr-dir = all, !skipped, !restored

}

B.4 Configuration de la console

Permet d’indiquer les parametres de connexion au directeur dans un terminal (shell). Ce sont

les memes parametres pour le fichier /bat.conf.

#

# Bacula User Agent (or Console) Configuration File

#

Director {

Name = svr0.lix.polytechnique.fr-dir

DIRport = 9101

address = 129.104.11.180

Yann Belema 34 2010/2011

Laboratoire LIX

Password = "V+dCsItoimH/sFkk6Fcx5jqjjlZHzsi9WW/z4RfFsjsS"

}

Yann Belema 35 2010/2011

C Sauvegarde sur machines Windows

Bacula permet de sauvegarder plusieurs machines clientes disposant de systemes d’exploi-

tation differents. Dans le cas des systemes Windows, il y a sur le site officiel de Bacula

(www.bacula.org) des fichiers sources executables pour les clients windows, les fichiers de

configuration du client sont les memes que sous un systeme Linux.

Apres le telechargement du fichier win32bacula-1.XX.0.exe, executer en tant qu’administrateur

avec un click droit sur l’icone :

Figure C.1 – Icone win32bacula-1.XX.0.exe.

Un fois lance, le logiciel de suivi d’installation wizard demande si vous voulez installer Bacula.

36

Laboratoire LIX

Si vous continuer l’installation, choisissez le deuxieme type d’installation afin d’editer manuel-

lement le fichier de configuration bacula-fd.conf.

Ensuite choisir les composants a installer ; ce sont le service Bacula File Service et/ou la docu-

mentation...

Yann Belema 37 2010/2011

Laboratoire LIX

...Puis l’emplacement d’installation du logiciel.

Quand on installe pour la premiere fois Bacula, on doit configurer le client avant de terminer

l’installation et il faut toujours installer Bacula comme un service,comme indique dans le suivi

de l’installation :

Yann Belema 38 2010/2011

Laboratoire LIX

Ensuite entrer les parametres du directeur et cliquer sur install :

On doit ensuite accepter de generer un fichier qui contiendra la configuration ”modele” du

client a inclure dans le fichier de configuration du directeur.

Yann Belema 39 2010/2011

Laboratoire LIX

Enfin cette fenetre de dialogue s’affiche et cliquer sur finish :

Quand le service Bacula File est pret a fournir les fichiers a sauvegarder, une icone

representant une cassette apparaıt dans la barre d’etat.

Un click droit sur cette cassette fait appraıtre un menu.

On peut voir l’etat du client en sctionnant Status :

Yann Belema 40 2010/2011

Laboratoire LIX

Lorsqu’une sauvegarde est en cours, la couleur des trous de la cassette dans la barre d’etat

passent de blanc au vert , et en cas d’erreur, la couleur devient rouge .

En lancant une sauvegarde sur un client Windows, le service VSS Snapshot 1 permet de creer

une copie instantannee du volume ou des fichiers qu’on souhaite sauver et de les mettre en

reseau afin que le service Bacula Storage puisse les sauvegarder sur un autre volume.

1. VSS est la fonction de cliche instantanee de volume sous Microsoft Windows. Le principe est lesuivant : realiser a n’importe quel moment une copie en lecture seule d’un volume reseau et d’appliquer cettecopie sur un volume different. Le principal avantage des cliches de volume est qu’il rend possible la sauvegardedes fichiers ouverts et supporte l’extraction de copies de fichiers. Ainsi on peut acceder immediatement auxvolumes reseaux en cours d’utilisation.

Yann Belema 41 2010/2011