#
# 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.4.4 (28 December 2008) -- debian 4.0
#
#  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 = SISCABK01-dir
  DIRport = 9101               			     			 # where we listen for UA connections
  QueryFile = "/opt/bacula/etc/query.sql"
  WorkingDirectory = "/opt/bacula/working"
  PidDirectory = "/opt/bacula/run"
  Maximum Concurrent Jobs = 1
  Password = "iPg+Zrr+dCdQAG5uS+TSi1JWComyVIABmmweGQ3gOrRT"         # Console password
  Messages = Daemon
}

###################################################################################################
#					JobDefs							  #
###################################################################################################
JobDefs {
	Name = DefaultJob
	Type = Backup
	Level = Incremental
	Client = SISCABK01-fd
	FileSet = "Full Set"
	Schedule = WeeklyCycle
	Storage = Bandes
	Messages = Standard
	Pool = Default
	Priority = 10
}


JobDefs {
  Name = CommonDefs
  Type = Backup
  Schedule = "WeeklyCycle"
  Storage = Bandes
  Messages = Standard
  Priority = 10
  Pool= Default

}

 
###################################################################################################
#				Fin des JobDefs 					  #
###################################################################################################

###################################################################################################
#					Jobs     						  #
###################################################################################################
# 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
					# WARNING!!! Passing the password via the command line is insecure.
					# see comments in make_catalog_backup for details.
					# Arguments to make_catalog_backup are:
					#  make_catalog_backup <database-name> <user-name> <password> <host>
   
#   RunBeforeJob = "/opt/bacula/etc/make_catalog_backup bacula bacula"   # This creates the copy of the catalog
#   RunAfterJob  = "/opt/bacula/etc/delete_catalog_backup"				# This deletes the copy of the catalog
 
#  Write Bootstrap = "/opt/bacula/working/BackupCatalog.bsr"
#  Priority = 11                   # run after main backup
#}

#
# 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=SISCABK01-fd                 
  FileSet="Full Set"                  
  Storage = File                      
  Pool = Default
  Messages = Standard
  Where = /
  RunAfterJob = "/opt/bacula/etc/end_of_restore.sh"
}
#######SISCABK01#########
Job {
  Name =SISCABKO1-J01
  JobDefs="CommonDefs"
  Client=SISCABK01-fd
  FileSet= "SISCABK01-FS01"
  Write Bootstrap = "/opt/bacula/working/SISCABK01-J01.bsr"
  RunBeforeJob= "/opt/bacula/etc/make_catalog_backup bacula bacula" 
  RunAfterJob = "/opt/bacula/etc/end_of_backup.sh"
}
#######SISCADB01#########
Job {
  Name =SISCADBO1-J01
  JobDefs="CommonDefs"
  Client=SISCADB01-fd
  FileSet= "SISCADB01-FS01"
  Write Bootstrap = "/opt/bacula/working/SISCADB01-J01.bsr"
  RunBeforeJob= "/opt/bacula/etc/make_catalog_backup bacula bacula" 
  RunAfterJob = "/opt/bacula/etc/end_of_backup.sh"
}
#######SISCAFT01#########
Job {
  Name =SISCAFTO1-J01
  JobDefs="CommonDefs"
  Client=SISCAFT01-fd
  FileSet= "SISCAFT01-FS01"
  Write Bootstrap = "/opt/bacula/working/SISCAFT01-J01.bsr"
  RunBeforeJob= "/opt/bacula/etc/make_catalog_backup bacula bacula" 
  RunAfterJob = "/opt/bacula/etc/end_of_backup.sh"
}
#######SISCAPS01#########
Job {
  Name =SISCAPSO1-J01
  JobDefs="CommonDefs"
  Client=SISCAPS01-fd
  FileSet= "SISCAPS01-FS01"
  Write Bootstrap = "/opt/bacula/working/SISCAPS01-J01.bsr"
  RunBeforeJob= "/opt/bacula/etc/make_catalog_backup bacula bacula" 
  RunAfterJob = "/opt/bacula/etc/end_of_backup.sh"
}
#######SISCAASB01#########
Job {
  Name =SISCAASB01-J01
  JobDefs="CommonDefs"
  Client=SISCAASB01-fd
  FileSet= "SISCAASB01-FS01"
  Write Bootstrap = "/opt/bacula/working/SISCAASB01-J01.bsr"
  RunBeforeJob= "/opt/bacula/etc/make_catalog_backup bacula bacula" 
  RunAfterJob = "/opt/bacula/etc/end_of_backup.sh"
}
#######SISCAAS01#########
Job {
  Name =SISCAASO1-J01
  JobDefs="CommonDefs"
  Client=SISCAAS01-fd
  FileSet= "SISCAAS01-FS01"
  Write Bootstrap = "/opt/bacula/working/SISCAAS01-J01.bsr"
  RunBeforeJob= "/opt/bacula/etc/make_catalog_backup bacula bacula" 
  RunAfterJob = "/opt/bacula/etc/end_of_backup.sh"
}

####################################################################################################
#					Fin des Jobs  SISCA					#
###################################################################################################

###################################################################################################
#					FileSets SISCA						  #
###################################################################################################

#List of files to be backed up
FileSet {
  Name = "Full Set"
  Include {
    Options {
      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 partitons such as /usr or /home
						#    you will probably want to add them too.
						#
						#  By default this is defined to point to the Bacula build
						#    directory to give a reasonable FileSet to backup to
						#    disk storage during initial testing.
						#
    File = /root/
  }

						#
						# If you backup the root directory, the following two excluded
						#   files can be useful
						#
Exclude {
    File = /proc
    File = /tmp
    File = /.journal
    File = /sys
    File = /.fsck
  }
}


#######SISCABK01#########
FileSet {
  Name = "SISCABK01-FS01"
  Include {
    Options {
      signature = MD5
      onefs = no
    }
    
    File = /
  }
  Exclude {
    File = /proc
    File = /tmp
    File = /.journal
    File = /.fsck
    File = /sys
  }
}

#######SISCADB01#########
FileSet {
  Name = "SISCADB01-FS01"
  Include {
    Options {
      signature = MD5
      onefs = no
    }
    
    File = /
  }
  Exclude {
    File = /proc
    File = /tmp
    File = /.journal
    File = /.fsck
    File = /sys
  }
}
#######SISCAFT01#########
FileSet {
  Name = "SISCAFT01-FS01"
  Include {
    Options {
      signature = MD5
      onefs = no
    }
    
    File = /
  }
  Exclude {
    File = /proc
    File = /tmp
    File = /.journal
    File = /.fsck
    File = /sys
  }
}
#######SISCAPS01#########
FileSet {
  Name = "SISCAPS01-FS01"
  Include {
    Options {
      signature = MD5
      onefs = no
    }
    
    File = /
  }
  Exclude {
    File = /proc
    File = /tmp
    File = /.journal
    File = /.fsck
    File = /sys
  }
}
#######SISCAASB01#######
FileSet {
  Name = SISCAASB01-FS01
  Include {
    File = /
    Options {
      signature = MD5
      onefs = no
    }
  }
  Exclude {
    File = /proc
    File = /tmp
    File = /.journal
    File = /.fsck
    File = /sys
  }
}
#######SISCAAS01#########
FileSet {
  Name = "SISCAAS01-FS01"
  Include {
    Options {
      signature = MD5
      onefs = no
    }
    
    File = /
  }
  Exclude {
    File = /proc
    File = /tmp
    File = /.journal
    File = /.fsck
    File = /sys
  }
}

#######SISCAVMRHEL#######

#######CATALOGUE#########
FileSet {
  Name = "Catalog"
  Include {
    Options {
      signature = MD5
    }
    File = /opt/bacula/working/bacula.sql
  }
}

###################################################################################################
#					Fin des fileSets SISCA					  #
###################################################################################################

###################################################################################################
#						Schedule					  #
###################################################################################################


# 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 = Level=Differential Pool=MondayPool Monday at 23:05
  Run = Level=Differential Pool=TuesdayPool Tuesday at 23:05
  Run = Level=Differential Pool=WednesdayPool Wednesday at 23:05
  Run = Level=Differential Pool=ThursdayPool Thursday at 23:05
  Run = Level=Differential Pool=FridayPool Friday at 23:05
  Run = Level=Differential Pool=SaturdayPool Saturday at 23:05
  Run = Level= Full Pool=SundayPool Sunday at 23:05
  # sauvegarde mensuelle, premier dimanche de chaque mois 
  Run = Level=Full Pool=MonthlyPool 1st Sunday at 22:05
}

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

###################################################################################################
#						Schedule					  #
###################################################################################################

##################################################################################################
#					Clients SISCA						  #
###################################################################################################

# Client (File Services) to backup
#######SISCABK01#########
Client {
  Name = SISCABK01-fd
  Address = SISCABK01
  FDPort = 9102
  Catalog = MyCatalog
  Password = "YuHVeT1UyBbq+mOqOyaSdMWM6BGZm+DJ3++GifU1xq7v"          # password for FileDaemon
  File Retention = 30 days          
  Job Retention = 365 days           
  AutoPrune = yes                     # Prune expired Jobs/Files
}

#######SISCADB01#########
Client {
  Name = SISCADB01-fd                
  Address = SISCADB01-BK
  FDPort = 9102
  Catalog = MyCatalog
  Password = "YuHVeT1UyBbq+mOqOyaSdMWM6BGZm+DJ3++GifU1xq7v2"         # password for FileDaemon 2
   File Retention = 30 days          
  Job Retention = 365 days           
  AutoPrune = yes                     # Prune expired Jobs/Files
}

#######SISCAFT01#########
Client {
  Name = SISCAFT01-fd
  Address = SISCAFT01
  FDPort = 9102
  Catalog = MyCatalog
  Password = "feMatrA8Rup3amudef49cru3re-aKepheyathUCh+yec"         # password for FileDaemon 2
 File Retention = 30 days          
  Job Retention = 365 days           
  AutoPrune = yes                     # Prune expired Jobs/Files
}
#######SISCAPS01#########
Client {
  Name = SISCAPS01-fd
  Address = SISCAPS01
  FDPort = 9102
  Catalog = MyCatalog
  Password = "20c5MYniUrgJiZw2DnXWnMlKx5WMhFgqMvRdbdB1GTe0"         # password for FileDaemon 2
  File Retention = 30 days          
  Job Retention = 365 days           
  AutoPrune = yes                     # Prune expired Jobs/Files
}
######SISCAASB01########
Client {
  Name = SISCAASB01-fd
  Password = 20c5MYniUrgJiZw2DnXWnMlKx5WMhFgqMvRdbdB1GTe0
  Address = SISCAASB01-BK
  FDPort = 9102
  Catalog = MyCatalog
  AutoPrune = yes
  File Retention = 30 days
  Job Retention = 365 days
}
#######SISCAAS01#########
Client {
  Name = SISCAAS01-fd
  Address = SISCAAS01-BK
  FDPort = 9102
  Catalog = MyCatalog
  Password = XUn7f79d6D5@Th56ev
  File Retention = 30 days
  Job Retention = 365 days
  AutoPrune = yes
}

##################################################################################################
#					FIN des Clients						  #
###################################################################################################

 ##############################################################################################
 #					POOL						      #
 ##############################################################################################

# Default pool definition
Pool {
  Name = Default 
  Pool Type = Backup
}

# Scratch pool definition
Pool {
  Name = Scratch
  Pool Type = Backup
}

Pool {
  Name = MondayPool
  Pool Type = Backup
  Recycle = yes
  AutoPrune = yes
  Volume Retention = 20 days
  Maximum Volume Jobs = 10
}

Pool {
  Name = TuesdayPool
  Pool Type = Backup
  Recycle = yes
  AutoPrune = yes
  Volume Retention = 20 days
  Maximum Volume Jobs = 10
}

Pool {
  Name = WednesdayPool
  Pool Type = Backup
  Recycle = yes
  AutoPrune = yes
  Volume Retention = 20 days
  Maximum Volume Jobs = 10
}

Pool {
  Name = ThursdayPool
  Pool Type = Backup
  Recycle = yes
  AutoPrune = yes
  Volume Retention = 20 days
  Maximum Volume Jobs = 10
}

Pool {
  Name = FridayPool
  Pool Type = Backup
  Recycle = yes
  AutoPrune = yes
  Volume Retention = 20 days
  Maximum Volume Jobs = 10
}

Pool {
  Name = SaturdayPool
  Pool Type = Backup
  Recycle = yes
  AutoPrune = yes
  Volume Retention = 20 days
  Maximum Volume Jobs = 10
}

Pool {
  Name = SundayPool
  Pool Type = Backup
  Recycle = yes
  AutoPrune = yes
  Volume Retention = 20 days
  Maximum Volume Jobs = 10
}

Pool {
  Name = MonthlyPool
  Pool Type = Backup
  Recycle = yes
  AutoPrune = yes
  Volume Retention = 365 days
  Maximum Volume Jobs = 10
}
##############################################################################################
#					FIN DE POOL					      #
##############################################################################################

##################################################################################################
#					Storage							  #
###################################################################################################
# Definition of file storage device

Storage {
  Name = File
# Do not use "localhost" here    
  Address = SISCABK01                # N.B. Use a fully qualified name here
  SDPort = 9103
  Password = "Lp9K+aDQZyvpWO6U8Iz6gTq8rahnrQyjaXyBOp4llVHj"
  Device = FileStorage
  Media Type = File
}

####### AUTOLOADER A BANDES DELL POWERVAULT TL2000 #########
Storage {
  Name = Bandes
  Password = Lp9K+aDQZyvpWO6U8Iz6gTq8rahnrQyjaXyBOp4llVHj
  Address = SISCABK01
  SDPort = 9103
  Device = Drive-1
  Media Type = LTO3
  Autochanger = yes
}

# Definition of DDS tape storage device
#Storage {
#  Name = DDS-4    
#  Do not use "localhost" here
#  Address = SISCABK01                # N.B. Use a fully qualified name here
#  SDPort = 9103
#  Password = "Lp9K+aDQZyvpWO6U8Iz6gTq8rahnrQyjaXyBOp4llVHj"          # password for Storage daemon
#  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 = SISCABK01                # N.B. Use a fully qualified name here
#  SDPort = 9103
#  Password = "Lp9K+aDQZyvpWO6U8Iz6gTq8rahnrQyjaXyBOp4llVHj"
#  Device = "Exabyte 8mm"
#  MediaType = "8mm"
#}

# Definition of DVD storage device
#Storage {
#  Name = "DVD"
#  Do not use "localhost" here
#  Address = SISCABK01                # N.B. Use a fully qualified name here
#  SDPort = 9103
#  Password = "Lp9K+aDQZyvpWO6U8Iz6gTq8rahnrQyjaXyBOp4llVHj"
#  Device = "DVD Writer"
#  MediaType = "DVD"
#}


##################################################################################################
#					Fin des Storage						  #
###################################################################################################

##################################################################################################
#					Autres parametres					  #
###################################################################################################

# Generic catalog service

Catalog {
  Name = MyCatalog
  dbname = "bacula"; dbuser = "bacula"; dbpassword = ""
}

# 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 = "/opt/bacula/bin/bsmtp -h 10.31.5.45 -f \"\(Bacula@sisca.fr\) \<%r\>\" -s \"Bacula: %t %e of %c %l\" %r"
  operatorcommand = "/opt/bacula/bin/bsmtp -h 10.31.5.45 -f \"\(Bacula@sisca.fr\) \<%r\>\" -s \"Bacula: Intervention needed for %j\" %r"
  mail = siscadmin@ch-epernay.fr = all, !skipped            
  operator = siscadmin@ch-epernay.fr = 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 = "/opt/bacula/working/log" = all, !skipped
}



# Message delivery for daemon messages (no job).

Messages {
  Name = Daemon
  mailcommand = "/opt/bacula/bin/bsmtp -h 10.31.5.45 -f \"\(Bacula@sisca.fr\) \<%r\>\" -s \"Bacula daemon message\" %r"
  mail = siscadmin@ch-epernay.fr = all, !skipped            
  console = all, !skipped, !saved
  append = "/opt/bacula/working/log" = all, !skipped
}

#
# Restricted console used by tray-monitor to get the status of the director
#
Console {
  Name = SISCABK01-mon
  Password = "NOIcmRzZDm6o4H8YK7fmLzZ1fIBaocP8u4I3U4KQ8aPj"
  CommandACL = status, .status
}
##################################################################################################
#					Fin du Fichier						  #
###################################################################################################
