Dear users,

I'm using file-based backups and configurated Bacula[bacula-dir Version:
5.2.13 (19 February 2013)] to write one volume per job, with an
exclusive label containing the client name, data and time as shown
bellow in the config files attached.

The problems is: 

1º Why Bacula creates a volume for a job if the job has no data to be
backed up? That causes the created volume to stay open for writing, what
causes another problem:

2º Instead of creating a new volume for the next client to be backed-up,
Bacula writes in the empity volume created at problem 1.

I'm dealing with a situation where an client named Git has no
modifications, but a volume Git-{data}... was created.

Then, the next job starts, for the client Samba, and the data end-up
being recorded on the volume Git-{data}... because the empty volume
created on the previous job that has no modifications, was not closed.

What I've donne wrong? Suggestions?


Director {                            # define myself
  Name = bacula-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 = "XXXXX"         # Console password
  Messages = Daemon
}

# Definition of clients and jobs
@/etc/bacula/bacula-dir-clients-and-jobs.conf

# Definition of filesets
@/etc/bacula/bacula-dir-filesets.conf

# Definition of pools
@/etc/bacula/bacula-dir-pools.conf

# Backup schedules
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
}

# Catalog backup schedule
Schedule {
  Name = "WeeklyCycleAfterBackup"
  Run = Full sun-sat at 23:10
}

# Definition of file storage device

Storage {
  Name = Interno
  Address = 192.168.23.3
  SDPort = 9103
  Password = "XXXXX"
  Device = Interno
  Media Type = File
}

Storage {
  Name = Externo
  Address = 192.168.23.3
  SDPort = 9103
  Password = "XXXXX"
  Device = Externo
  Media Type = File
}




# Generic catalog service
Catalog {
  Name = "MyCatalog"
# Uncomment the following line if you want the dbi driver
# dbdriver = "dbi:postgresql"; dbaddress = 127.0.0.1; dbport =  
  dbdriver = "dbi:mysql"; dbname = "bacula"; dbuser = "bacula"; dbpassword = ""
}

Messages {
  Name = Standard
  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
  append = "/var/log/bacula/bacula.log" = all, !skipped
  catalog = all
}

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/bacula.log" = all, !skipped
}

#
# Restricted console used by tray-monitor to get the status of the director
#
Console {
  Name = bacula-mon
  Password = "XXXXX"
  CommandACL = status, .status
}
######################## Clients ##############################################

Client {
  Name = bacula-fd
  Address = localhost
  Password = "XXXXX"
  @/etc/bacula/basic-client.conf         
}

Client {
  Name = git-fd
  Address = 192.168.23.21
  Password = "XXXXX"          
  @/etc/bacula/basic-client.conf
}

Client {
  Name = NFS-fd
  Address = 192.168.23.23
  Password = "XXXXX"          
  @/etc/bacula/basic-client.conf
}

Client {
  Name = redmine-fd
  Address = 192.168.23.21
  Password = "XXXXX"        
  @/etc/bacula/basic-client.conf
}

Client {
  Name = samba-fd
  Address = 192.168.23.25
  Password = "XXXXX"         
  @/etc/bacula/basic-client.conf
}

#Client {
#  Name = teste-fd
#  Address = 192.168.23.34
#  Password = "XXXXX"          
#  @/etc/bacula/basic-client.conf
#}

Client {
  Name = tin-srv2-fd
  Address = 192.168.23.2
  Password = "XXXXX"
  @/etc/bacula/basic-client.conf
}


####################### JobDefs ###############################################

JobDefs {
  Name = "DefaultJob"
  Type = Backup
  Schedule = "WeeklyCycle"
  Messages = Standard
  Pool = Interna
  Priority = 10
  Write Bootstrap = "/var/spool/bacula/%c.bsr"
}

######################## Jobs #############################################
Job {
  Name = "Catalog"
  JobDefs = "DefaultJob"
  Client = bacula-fd
  Level = Full
  FileSet="Catalog"
  Schedule = "WeeklyCycleAfterBackup"
  ClientRunBeforeJob = "/usr/libexec/bacula/make_catalog_backup.pl MyCatalog"
  Write Bootstrap = "/var/spool/bacula/%n.bsr"
  Priority = 11
}

Job {
  Name = "Copia-externa"
  
  #Do TypeDef DefaultJob:
  Messages = Standard
  Pool = Interna
  Write Bootstrap = "/var/spool/bacula/%c.bsr"

  Client = bacula-fd
  FileSet = "Full Set"
  Type = Copy
  Selection Type = PoolUncopiedJobs
  Priority = 12
} 

Job {
  Name = "Director"
  JobDefs = "DefaultJob"
  Level = Incremental
  Client = bacula-fd
  FileSet = "Full Set"
}

Job {
  Name = "Git"
  JobDefs = "DefaultJob"
  Client = git-fd
  FileSet = "git"
}

Job {
  Name = "NFS"
  JobDefs = "DefaultJob"
  Client = NFS-fd
  FileSet = "NFS"
}

Job {
  Name = "Redmine"
  JobDefs = "DefaultJob"
  Client = redmine-fd
  FileSet = "Redmine"
  ClientRunBeforeJob = /usr/local/bin/backup-redmine-bacula.sh
}

Job {
  Name = "RestoreFiles"
  Type = Restore
  Client=bacula-fd                 
  FileSet="Full Set"                  
  Pool = Interna
  Messages = Standard
  Where = /opt/bacula/bacula-restores
}

Job {
  Name = "Samba"
  JobDefs = "DefaultJob"
  Client = samba-fd
  FileSet = "Samba"
  ClientRunBeforeJob = "pdbedit -e tdbsam:/root/samba-users-tdbsam.backup"
}

#Job {
#  Name = "Teste"
#  JobDefs = "DefaultJob"
#  Client = teste-fd
#  FileSet = "Teste"
#  ClientRunBeforeJob = /usr/local/bin/teste.sh
#}

Job {
  Name = "Viasoft"
  JobDefs = "DefaultJob"
  Client = tin-srv2-fd
  FileSet = "Viasoft"
}

Job {
  Name = "Cwork"
  JobDefs = "DefaultJob"
  Client = tin-srv2-fd
  FileSet = "Cwork"
}

Job {
  Name = "Correios"
  JobDefs = "DefaultJob"
  Client = tin-srv2-fd
  FileSet = "Correios"
}

Job {
  Name = "QC2012"
  JobDefs = "DefaultJob"
  Client = tin-srv2-fd
  FileSet = "QC2012"
}
FDPort = 9102
Catalog = MyCatalog
File Retention = 35 days
Job Retention = 35 days
AutoPrune = yes

Pool {
  Name = Interna
  Pool Type = Backup
  Storage = Interno
  AutoPrune = yes
  Maximum Volume Jobs = 1
  Volume Retention = 35 days
  Action On Purge = Truncate
  LabelFormat = 
"${Job}-${Year}-${Month}-${Day}-${Hour}-${Minute}-${Second}-${Level}"
  Next Pool = Externa
}

Pool {
  Name = Externa
  Pool Type = Backup
  Storage = Externo
  Recycle = no
  AutoPrune = yes
  Volume Retention = 35 days
  Maximum Volume Jobs = 1
  LabelFormat = "${JobName}-${Level}"
}

------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce.
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to