Bonjour, j'ai un problème avec Bacula 2.0.3. C'est la première fois que j'utilise ce logiciel.
J'essaye déjà de réussir une configuration simple.
Je veux faire un backup du répertoire /root
Je veux que la sauvegarde soit dans /home/serveur/Public
Tout ce passe sur la même machine donc le director, le monitor, le client, le storage sont tous sur la même machine.
Voici les fichiers de configuration :
bacula-dir.conf
#
# 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 2.0.3 (06 March 2007) -- redhat
#
# 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 = serveur-dir
DIRport = 9101 # where we listen for UA connections
QueryFile = "/etc/bacula/query.sql"
WorkingDirectory = "/var/spool/bacula"
PidDirectory = "/var/run"
Maximum Concurrent Jobs = 1
Password = "motdepasse" # Console password
Messages = Daemon
}
JobDefs {
Name = Serveur_etc
Type = Backup
Level = Incremental
Client = serveur-fd
FileSet = ETC
Schedule = DailyCycle
Storage = File
Messages = Standard
Pool = Default
}
#
# 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= serveur-fd
FileSet= "ETC"
Storage = File
Pool = Default
Messages = Standard
Where = /tmp/bacula-restores
}
# Configuration de Serveur
# Sauvegarder les fichiers de /etc pour Serveur
Job {
Name = Serveur_etc_job
FileSet = ETC
JobDefs = Serveur_etc
Write Bootstrap = "/var/lib/bacula/Serveur_etc.bsr"
Type = Backup
Level = Full
Client = serveur-fd
Schedule = DailyCycle
Storage = File
Pool = Default
Messages = Standard
}
# Fichiers de /etc
FileSet {
Name = ETC
Include { # Fichiers à inclure dans la sauvegarde
Options {
signature = MD5
compression = GZIP
}
File = /root
}
Exclude {
File = /root/Vidéos
}
}
#
# 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 = HourlyCycle
Run = Full 1st wed at 19:10
# Run = Differential 2nd-5th sun at 23:05
Run = Incremental Hourly
}
Schedule {
Name = DailyCycle
Run = Full 1st sun at 02:00
Run = Differential 2nd-5th sun at 04:00
Run = Incremental Daily at 23:00
}
# 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
}
}
# Client (File Services) to backup
Client {
Name = serveur-fd
Address = 192.168.0.254
FDPort = 9102
Catalog = MyCatalog
Password = "motdepasse" # password for FileDaemon
File Retention = 30 days # 30 days
Job Retention = 6 months # six months
AutoPrune = yes # Prune expired Jobs/Files
}
# Definition of file storage device
Storage {
Name = File
# Do not use "localhost" here
Address = 192.168.0.254 # N.B. Use a fully qualified name here
SDPort = 9103
Password = "motdepasse"
Device = FileStorage
Media Type = File
}
# Generic catalog service
Catalog {
Name = MyCatalog
dbname = bacula; user = bacula; password = ""
}
# Reasonable message delivery -- send most everything to email address
# and to the console
Messages {
Name = Standard
#
# 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 'no-reply@mydomain.com', is better since that tends to
# tell (most) people that its coming from an automated source.
#
mailcommand = "/usr/sbin/bsmtp -h localhost -f \"\(Bacula\) %r\" -s \"Bacula: %t %e of %c %l\" %r"
operatorcommand = "/usr/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
#
# 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
}
#
# Message delivery for daemon messages (no job).
Messages {
Name = Daemon
mailcommand = "/usr/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.log" = all, !skipped
}
# Default pool definition
Pool {
Name = Default
Pool Type = Backup
Recycle = yes # Bacula can automatically recycle Volumes
AutoPrune = yes # Prune expired volumes
Volume Retention = 365 days # one year
}
#
# Restricted console used by tray-monitor to get the status of the director
#
Console {
Name = serveur-mon
Password = "motdepasse"
CommandACL = status, .status
}
bacula-fd.conf
#
# Default Bacula File Daemon Configuration file
#
# For Bacula release 2.0.3 (06 March 2007) -- redhat
#
# 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 = serveur-dir
Password = "motdepasse"
}
#
# Restricted Director, used by tray-monitor to get the
# status of the file daemon
#
Director {
Name = serveur-mon
Password = "motdepasse"
Monitor = yes
}
#
# "Global" File daemon configuration specifications
#
FileDaemon { # this is me
Name = serveur-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 = serveur-dir = all, !skipped, !restored
}
et bacula-sd.conf
#
# Default Bacula Storage Daemon Configuration file
#
# For Bacula release 2.0.3 (06 March 2007) -- redhat
#
# 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 = serveur-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 = serveur-dir
Password = "motdepasse"
}
#
# Restricted Director, used by tray-monitor to get the
# status of the storage daemon
#
Director {
Name = serveur-mon
Password = "motdepasse"
Monitor = yes
}
#
# 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 = /home/serveur/Public
LabelMedia = yes; # lets Bacula label unlabeled media
Random Access = Yes;
AutomaticMount = yes; # when device opened, read it
RemovableMedia = no;
AlwaysOpen = no;
}
#
# Send all messages to the Director,
# mount messages also are sent to the email address
#
Messages {
Name = Standard
director = serveur-dir = all
}
Je lance, depuis Webmin, le job mais il tourne pendant des jours sans rien sauvegarder.
Le dernier en cours me marque "is waiting for an appendable Volume"
Voici le log que j'ai avec Webmin :
Starting backup job Serveur_etc_job ..
Automatically selected Catalog: MyCatalog
Using Catalog "MyCatalog"
A job name must be specified.
The defined Job resources are:
1: RestoreFiles
2: Serveur_etc_job
Select Job resource (1-2): 2
Run Backup job
JobName: Serveur_etc_job
Level: Full
Client: serveur-fd
FileSet: ETC
Pool: Default (From Job resource)
Storage: File (From Job resource)
When: 2008-01-27 18:46:44
Priority: 10
OK to run? (yes/mod/no):
.. the backup job is now running. When complete, the results will be shown below ..
27-jan 18:46 serveur-dir: Start Backup JobId 32, Job=Serveur_etc_job.2008-01-27_18.46.44
27-jan 18:46 serveur-sd: Job Serveur_etc_job.2008-01-27_18.46.44 waiting. Cannot find any appendable volumes.
Please use the "label" command to create a new Volume for:
Storage: "FileStorage" (/home/serveur/Public)
Media type: File
Pool: Default
Là, je bloque. C'est certainement une erreur dans les config. J'ai ouvert les ports 9101 à 9103 dans netfilter.
Merci de toute l'aide que vous pourrez m'apporter.