#
# 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 1.36.3 (22 April 2005) -- unknown unknown
#
#  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 = eagle-dir
  DIRport = 9101                # where we listen for UA connections
  QueryFile = "/root/bacula/bin/query.sql"
  WorkingDirectory = "/root/bacula/bin/working"
  PidDirectory = "/root/bacula/bin/working"
  Maximum Concurrent Jobs = 4
  Password = "y0HkaDbl"         # Console password
  Messages = Daemon
}

JobDefs {
  Name = "DefaultJob"
  Maximum Concurrent Jobs = 4
  Type = Backup
  Level = Incremental
  Client = eagle-fd 
  FileSet = "Full Set"
  Schedule = "WeeklyCycle"
  Storage = File
  Messages = Standard
  Pool = Default
  Priority = 10
}


#
# Define the main nightly save backup job
#   By default, this job will back up to disk in /tmp/bacula-backups
Job {
  Name = "Client1"
  Maximum Concurrent Jobs = 4
  JobDefs = "DefaultJob"
  Write Bootstrap = "/root/bacula/bin/working/Client1.bsr"
}

# Backup the catalog database (after the nightly save)
Job {
  Name = "BackupCatalog"
  Maximum Concurrent Jobs = 4
  JobDefs = "DefaultJob"
  Level = Full
  FileSet="Catalog"
  Schedule = "WeeklyCycleAfterBackup"
  # This creates an ASCII copy of the catalog
  RunBeforeJob = "/root/bacula/bin/make_catalog_backup bacula bacula"
  # This deletes the copy of the catalog
  RunAfterJob  = "/root/bacula/bin/delete_catalog_backup"
  Write Bootstrap = "/root/bacula/bin/working/BackupCatalog.bsr"
  Priority = 11                   # run after main backup
}

# Standard Restore template, to be changed by Console program
Job {
  Name = "RestoreFiles"
  Maximum Concurrent Jobs = 4
  Type = Restore
  Client=eagle-fd                 
  FileSet="Full Set"                  
  Storage = File                      
  Pool = Default
  Messages = Standard
  Where = /tmp/bacula-restores
}

Job {
  Name = "Eagle-Set-A"
  Maximum Concurrent Jobs = 4
  Priority = 12
  Type = Backup
  Level = Full
  Client = eagle-fd
  FileSet = Eagle-Full
  Schedule = Eagle-Set-A
  Storage = DDS-3-Drive0
  Pool = DDS-3-Drive0-Set-A
  Write Bootstrap = "/root/bacula/bin/working/Eagle-Set-A.bsr"
  Messages = Standard
}
 
Job {
  Name = "Eagle-Set-B"
  Maximum Concurrent Jobs = 4
  Priority = 12
  Type = Backup
  Level = Full
  Client = eagle-fd
  FileSet = Eagle-Full
  Schedule = Eagle-Set-B
  Storage = DDS-3-Drive0
  Pool = DDS-3-Drive0-Set-B
  Write Bootstrap = "/root/bacula/bin/working/Eagle-Set-B.bsr"
  Messages = Standard
}  
 
Job {
  Name = "Apollo-Set-A"
  Maximum Concurrent Jobs = 4
  Priority = 12
  Type = Backup
  Level = Full
  Client = apollo-fd
  FileSet = Apollo-Full
  Schedule = Apollo-Set-A
  Storage = Exabyte-Drive
  Pool = Exabyte-Drive-Set-A
  Write Bootstrap = "/root/bacula/bin/working/Apollo-Set-A.bsr"
  Messages = Standard
}
 
Job {
  Name = "Apollo-Set-B"
  Maximum Concurrent Jobs = 4
  Priority = 12
  Type = Backup
  Level = Full
  Client = apollo-fd
  FileSet = Apollo-Full
  Schedule = Apollo-Set-B
  Storage = Exabyte-Drive
  Pool = Exabyte-Drive-Set-B
  Write Bootstrap = "/root/bacula/bin/working/Apollo-Set-B.bsr"
  Messages = Standard
}

Job {
  Name = "Notebook-Set-A"
  Maximum Concurrent Jobs = 4
  Priority = 12
  Type = Backup
  Level = Full
  Client = notebook-fd
  FileSet = Notebook-Full
  Schedule = Notebook-Set-A
  Storage = DDS-3-Drive1
  Pool = DDS-3-Drive1-Set-A
  Write Bootstrap = "/root/bacula/bin/working/Notebook-Set-A.bsr"
  Messages = Standard
}

Job {
  Name = "Notebook-Set-B"
  Maximum Concurrent Jobs = 4
  Priority = 12
  Type = Backup
  Level = Full
  Client = notebook-fd
  FileSet = Notebook-Full
  Schedule = Notebook-Set-B
  Storage = DDS-3-Drive1
  Pool = DDS-3-Drive1-Set-B
  Write Bootstrap = "/root/bacula/bin/working/Notebook-Set-B.bsr"
  Messages = Standard
}

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/bacula
  }

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

FileSet {
  Name = "Eagle-Full"
  Include {
    Options {
      Signature = MD5
    }
 File = /
 File = /boot
 File = /home
 File = /mnt/ide-2
 File = /home/ftp/pub
 File = /mnt/scsi-1
 }
   Exclude {
     File = /proc
     File = /tmp
     File = /.journal
     File = /.fsck
  }
}
 
FileSet {
  Name = "Apollo-Full"
  Include {
    Options {
      Signature = MD5
    }
 File = "C:/"
 File = "D:/"
 File = "E:/"
# File = "G:/"
 }
}

FileSet {
  Name = "Notebook-Full"
  Include {
    Options {
      Signature = MD5
    }
 File = "C:/"
 }
}

# This is the backup of the catalog
FileSet {
  Name = "Catalog"
  Include {
    Options {
      signature = MD5
    }
    File = /root/bacula/bin/working/bacula.sql
  }
}

#
# 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 00:05
  Run = Differential 2nd-5th sun at 00:05
  Run = Incremental mon-sat at 00:05
}

# This schedule does the catalog. It starts after the WeeklyCycle
Schedule {
  Name = "WeeklyCycleAfterBackup"
  Run = Full sun-sat at 00:10
}

Schedule {
  Name = Eagle-Set-A
  Run = Full 1st Monday at 01:00
#  Run = Incremental 1st Tuesday-Friday at 01:00
  Run = Full 3rd Monday at 01:00
#  Run = Incremental 3rd Tuesday-Friday at 01:00
  Run = Full 5th Monday at 01:00
#  Run = Incremental 5th Tuesday-Friday at 01:00
} 
 
Schedule { 
  Name = Eagle-Set-B
  Run = Full 2nd Monday at 01:00
#  Run = Incremental 2nd Tuesday-Friday at 01:00
  Run = Full 4th Monday at 01:00
#  Run = Incremental 4th Tuesday-Friday at 01:00
} 
 
Schedule { 
  Name = Apollo-Set-A
  Run = Full 1st Monday at 01:00
#  Run = Incremental 1st Tuesday-Friday at 01:00
  Run = Full 3rd Monday at 01:00
#  Run = Incremental 3rd Tuesday-Friday at 01:00
  Run = Full 5th Monday at 01:00
#  Run = Incremental 5th Tuesday-Friday at 01:00
} 
  
Schedule { 
  Name = Apollo-Set-B
  Run = Full 2nd Monday at 01:00
#  Run = Incremental 2nd Tuesday-Friday at 01:00
  Run = Full 4th Monday at 01:00
#  Run = Incremental 4th Tuesday-Friday at 01:00
} 

Schedule {
  Name = Notebook-Set-A
  Run = Full 1st Monday at 01:00
#  Run = Incremental 1st Tuesday-Friday at 01:00
  Run = Full 3rd Monday at 01:00
#  Run = Incremental 3rd Tuesday-Friday at 01:00
  Run = Full 5th Monday at 01:00
#  Run = Incremental 5th Tuesday-Friday at 01:00
}

Schedule {
  Name = Notebook-Set-B
  Run = Full 2nd Monday at 01:00
#  Run = Incremental 2nd Tuesday-Friday at 01:00
  Run = Full 4th Monday at 01:00
#  Run = Incremental 4th Tuesday-Friday at 01:00
}

# Client (File Services) to backup
Client {
  Name = eagle-fd
  Address = 192.168.1.1
  FDPort = 9102
  Catalog = MyCatalog
  Password = "y0HkaDbl"               # password for FileDaemon
  File Retention = 7 days             # 30 days
  Job Retention = 7 days              # six months
  AutoPrune = yes                     # Prune expired Jobs/Files
}

Client { 
  Name = apollo-fd
  Maximum Concurrent Jobs = 4
  Address = 192.168.1.2
  FDPort = 9102
  Catalog = MyCatalog
  Password = "y0HkaDbl"               # password for FileDaemon
  File Retention = 7 days             # 30 days
  Job Retention = 7 days              # six months
  AutoPrune = yes                     # Prune expired Jobs/Files
}

Client {
  Name = notebook-fd
  Maximum Concurrent Jobs = 4
  Address = 192.168.1.5
  FDPort = 9102
  Catalog = MyCatalog
  Password = "y0HkaDbl"               # password for FileDaemon
  File Retention = 7 days             # 30 days
  Job Retention = 7 days              # six months
  AutoPrune = yes                     # Prune expired Jobs/Files
}

# Definiton of file storage device
Storage {
  Name = File
  Maximum Concurrent Jobs = 4
# Do not use "localhost" here    
  Address = 192.168.1.1          # N.B. Use a fully qualified name here
  SDPort = 9103
  Password = "y0HkaDbl"
  Device = FileStorage
  Media Type = File
}

# Definition of DDS tape storage device
#Storage {
#  Name = DDS-4    
#  Do not use "localhost" here
#  Address = 192.168.1.1          # N.B. Use a fully qualified name here
#  SDPort = 9103
#  Password = "y0HkaDbl"          # 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
#}

# Definition of 8mm tape storage device
#Storage {
#  Name = "8mmDrive"
#  Do not use "localhost" here
#  Address = 192.168.1.1          # N.B. Use a fully qualified name here
#  SDPort = 9103
#  Password = "y0HkaDbl"
#  Device = "Exabyte 8mm"
#  MediaType = "8mm"
#}

Storage {
  Name = DDS-3-Drive0   
  Maximum Concurrent Jobs = 4
# Do not use "localhost" here
  Address = 192.168.1.1
  SDPort = 9103
  Password = "y0HkaDbl"
  Device = DDS-3-Drive0
  Media Type = DDS-3                  # must be same as MediaType in Storage daemon
}
 
Storage {
  Name = DDS-3-Drive1  
  Maximum Concurrent Jobs = 4
# Do not use "localhost" here
  Address = 192.168.1.1               # N.B. Use a fully qualified name here
  SDPort = 9103
  Password = "y0HkaDbl"
  Device = DDS-3-Drive1
  Media Type = DDS-3                  # must be same as MediaType in Storage daemon
}
 
Storage {
  Name = Exabyte-Drive 
  Maximum Concurrent Jobs = 4
# Do not use "localhost" here
  Address = 192.168.1.1               # N.B. Use a fully qualified name here
  SDPort = 9103
  Password = "y0HkaDbl"
  Device = Exabyte-Drive
  Media Type = AIT                  # must be same as MediaType in Storage daemon
}
 
# 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.
#
  mailcommand = "/root/bacula/bin/bsmtp -h eagle.netwrx1.com -f \"\(Bacula\) %r\" -s \"Bacula: %t %e of %c %l\" %r"
  operatorcommand = "/root/bacula/bin/bsmtp -h eagle.netwrx1.com -f \"\(Bacula\) %r\" -s \"Bacula: Intervention needed for %j\" %r"
  mail = gkasica@netwrx1.com = all, !skipped            
  operator = gkasica@netwrx1.com = 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 = "/root/bacula/bin/working/log" = all, !skipped
}


#
# Message delivery for daemon messages (no job).
Messages {
  Name = Daemon
  mailcommand = "/root/bacula/bin/bsmtp -h eagle.netwrx1.com -f \"\(Bacula\) %r\" -s \"Bacula daemon message\" %r"
  mail = gkasica@netwrx1.com = all, !skipped            
  console = all, !skipped, !saved
  append = "/root/bacula/bin/working/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 = 7 days           # 7 days
  Accept Any Volume = yes             # write on any volume in the pool
  Maximum Volumes = 10                # 10 Disk File Volumes
}

Pool {
  Name = DDS-3-Drive0-Set-A
  Pool Type = Backup
  Recycle = yes
  AutoPrune = yes
  Volume Retention = 7 days 
  Accept Any Volume = yes
  Maximum Volumes = 6
}
 
Pool {
  Name = DDS-3-Drive0-Set-B
  Pool Type = Backup
  Recycle = yes
  AutoPrune = yes
  Volume Retention = 7 days 
  Accept Any Volume = yes
  Maximum Volumes = 6
}
 
Pool {
  Name = DDS-3-Drive1-Set-A
  Pool Type = Backup
  Recycle = yes
  AutoPrune = yes
  Volume Retention = 7 days 
  Accept Any Volume = yes
  Maximum Volumes = 6
}
 
Pool {
  Name = DDS-3-Drive1-Set-B
  Pool Type = Backup
  Recycle = yes
  AutoPrune = yes
  Volume Retention = 7 days 
  Accept Any Volume = yes
  Maximum Volumes = 6
}
 
Pool {
  Name = Exabyte-Drive-Set-A
  Pool Type = Backup
  Recycle = yes
  AutoPrune = yes
  Volume Retention = 7 days 
  Accept Any Volume = yes
  Maximum Volumes = 7
}
 
Pool {
  Name = Exabyte-Drive-Set-B
  Pool Type = Backup
  Recycle = yes
  AutoPrune = yes
  Volume Retention = 7 days 
  Accept Any Volume = yes
  Maximum Volumes = 7
}

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