Pages : 1
#1 Le 07/11/2012, à 16:43
- PsyKoptiK
Serveur Bacula - Problème de connexion avec bconsole
Bonjour,
Je teste le fonctionnement de Bacula (gestionnaire de backup) mais je rencontre des problèmes lors de l'exécution de bconsole.
En effet, lors de son initialisation aucune connexion ne s'effectue sur le Director.
root@server:/etc/bacula# bconsole
Connecting to Director 127.0.0.1:9101
Après consultation des process en écoute j'obtiens le résultat suivant :
root@server:/etc/bacula# netstat -ntaupe |grep :910
tcp 0 0 0.0.0.0:9102 0.0.0.0:* LISTEN 0 103953 14201/bacula-fd
tcp 0 0 0.0.0.0:9103 0.0.0.0:* LISTEN 0 103948 14191/bacula-sd
On peut voir qu'aucun process bacula-dir n'est en écoute sur le port 9101 cependant je ne comprends pas pourquoi.
Je précise que la configuration de bacula est celle générée par défaut.
La seule modification que j'ai apportée est cette ligne dans bacula-dir.conf afin de forcer la définition d'une adresse IP pour bacula-dir:
DirAddress = localhost
Je vous poste tout de même la liste des fichiers de conf que j'utilise :
bacula-dir.conf
Director { # define myself
Name = server-dir
DIRport = 9101 # where we listen for UA connections
QueryFile = "/etc/bacula/query.sql"
WorkingDirectory = "/var/bacula/working"
PidDirectory = "/var/run"
Maximum Concurrent Jobs = 1
Password = "password" # Console password
Messages = Daemon
DirAddress = localhost
}
JobDefs {
Name = "DefaultJob"
Type = Backup
Level = Incremental
Client = server-fd
FileSet = "Full Set"
Schedule = "WeeklyCycle"
Storage = File
Messages = Standard
Pool = File
Priority = 10
Write Bootstrap = "/var/bacula/working/%c.bsr"
}
Job {
Name = "BackupClient1"
JobDefs = "DefaultJob"
}
Job {
Name = "BackupCatalog"
JobDefs = "DefaultJob"
Level = Full
FileSet="Catalog"
Schedule = "WeeklyCycleAfterBackup"
RunBeforeJob = "/etc/bacula/make_catalog_backup.pl MyCatalog"
RunAfterJob = "/etc/bacula/delete_catalog_backup"
Write Bootstrap = "/var/bacula/working/%n.bsr"
Priority = 11 # run after main backup
}
Job {
Name = "RestoreFiles"
Type = Restore
Client=server-fd
FileSet="Full Set"
Storage = File
Pool = Default
Messages = Standard
Where = /tmp/bacula-restores
}
FileSet {
Name = "Full Set"
Include {
Options {
signature = MD5
}
File = /sbin
}
Exclude {
File = /var/bacula/working
File = /tmp
File = /proc
File = /tmp
File = /.journal
File = /.fsck
}
}
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 = "WeeklyCycleAfterBackup"
Run = Full sun-sat at 23:10
}
FileSet {
Name = "Catalog"
Include {
Options {
signature = MD5
}
File = "/var/bacula/working/bacula.sql"
}
}
Client {
Name = server-fd
Address = server
FDPort = 9102
Catalog = MyCatalog
Password = "password" # password for FileDaemon
File Retention = 30 days # 30 days
Job Retention = 6 months # six months
AutoPrune = yes # Prune expired Jobs/Files
}
Storage {
Name = File
Address = server # N.B. Use a fully qualified name here
SDPort = 9103
Password = "password"
Device = FileStorage
Media Type = File
}
Catalog {
Name = MyCatalog
dbname = "bacula"; dbuser = "bacula"; dbpassword = ""
}
Messages {
Name = Standard
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 needed for %j\" %r"
mail = root@localhost = all, !skipped
operator = root@localhost = mount
console = all, !skipped, !saved
append = "/var/bacula/working/log" = all, !skipped
catalog = all
}
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/bacula/working/log" = all, !skipped
}
Pool {
Name = Default
Pool Type = Backup
Recycle = yes # Bacula can automatically recycle Volumes
AutoPrune = yes # Prune expired volumes
Volume Retention = 365 days # one year
}
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
}
Pool {
Name = Scratch
Pool Type = Backup
}
Console {
Name = server-mon
Password = "password"
CommandACL = status, .status
}
bconsole.conf
Director {
Name = server-dir
DIRport = 9101
address = 127.0.0.1
Password = "password"
}
bconsole.conf
bconsole.conf
Director {
Name = server-dir
DIRport = 9101
address = 127.0.0.1
Password = "password"
}
bacula-sd.conf
Storage { # definition of myself
Name = server-sd
SDPort = 9103 # Director's port
WorkingDirectory = "/var/bacula/working"
Pid Directory = "/var/run"
Maximum Concurrent Jobs = 20
}
Director {
Name = server-dir
Password = "password"
}
Director {
Name = server-mon
Password = "password"
Monitor = yes
}
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;
}
Messages {
Name = Standard
director = server-dir = all
}
bacula-fd.conf
Director {
Name = server-dir
Password = "password"
}
Director {
Name = server-mon
Password = "password"
Monitor = yes
}
FileDaemon { # this is me
Name = server-fd
FDport = 9102 # where we listen for the director
WorkingDirectory = /var/bacula/working
Pid Directory = /var/run
Maximum Concurrent Jobs = 20
}
Messages {
Name = Standard
director = server-dir = all, !skipped, !restored
}
Si vous avez des retours je suis preneur !
Merci.
ASUSTeK P5N-D, Intel Core 2 Duo E8500 @3.16GHz socket 775, Corsair 4*2Go (2*PC2 6400 + 2*PC2 5300), Crucial M4-CT064 M4SSD2 64Go Rev 0309, Maxtor 6L250R0 250Go IDE, Western Digital 2.0 To WD20EARS, nVidia GeForce 9800 GTX+, CDDVDW SH-S223Q, Fedora 16 Verne (natif), Windows XP SP3 (VirtualBoxisé 3.2.10) --- L'image du jour de la NASA
Hors ligne
#2 Le 07/11/2012, à 23:37
- xavier4811
Re : Serveur Bacula - Problème de connexion avec bconsole
une idée, ajoute les droits pour ta console.
### bacula-dir.conf
...
Console {
Name = server-mon
Password = "password"
JobACL = *all*
ClientACL = *all*
StorageACL = *all*
ScheduleACL = *all*
PoolACL = *all*
FileSetACL = *all*
CatalogACL = *all*
CommandACL = *all*
...
### bconsole.conf
Director {
Name = server-dir
DIRport = 9101
address = 192.168.1.10 ### exemple a modifier !!
Password = "XXXXXXXXXXXXXXXXXXXXXXXXX" ### Ne pas changer, laisser les XXX
}
Console {
Name = server-mon
Password = "password"
}
bacula accepte plusieurs consoles avec des droits/noms différents, celle par défaut c'est le tray-monitor, consultation uniquement.
Dernière modification par xavier4811 (Le 07/11/2012, à 23:38)
Hors ligne