Director {                            # define myself
  Name = asteroid-dir
  DIRport = 9101                # where we listen for UA connections
  QueryFile = "/etc/bacula/scripts/query.sql"
  WorkingDirectory = "/var/lib/bacula"
  PidDirectory = "/var/run/bacula"
  Maximum Concurrent Jobs = 1
  Password = "something-here"
  Messages = Daemon
 }

JobDefs {
  Name = "DefaultJob"
  Type = Backup
  Level = Incremental
  Client = asteroid-fd
  FileSet = "Full Set"
#  Schedule = "WeeklyCycle"
  Storage = AsteroidFileStorage
  Messages = Standard
  Pool = File
  Priority = 10
  Write Bootstrap = "/var/lib/bacula/%c.bsr"
}


Job {
  Name = "BackupOrbitalHomes"
  Client = orbital-fd
  Storage = AsteroidSATADock
  JobDefs = "DefaultJob"
  FileSet = "Orbital Homedirs"
  Schedule = "WeeklyCycle"
  Pool = RemovableDiskFile
}

Job {
  Name = "OrbitalSystem"
  Client = orbital-fd
  Storage = AsteroidSATADock
  JobDefs = "DefaultJob"
  FileSet = "Orbital System"
  Schedule = "WeeklyCycle"
  Pool = RemovableDiskFile
  Accurate = yes
}

Job {
  Name = "gsv"
  Client = gsv-fd
  Storage = AsteroidSATADock
  JobDefs = "DefaultJob"
  Schedule = "WeeklyCycle"
  Pool = RemovableDiskFile
  Accurate = yes
}

Job {
  Name = "microlith"
  Client = microlith-fd
  Storage = AsteroidSATADock
  JobDefs = "DefaultJob"
  Schedule = "WeeklyCycle"
  Pool = RemovableDiskFile
  Accurate = yes
}


# 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
#  # Arguments to make_catalog_backup.pl are:
#  #  make_catalog_backup.pl <catalog-name>
  RunBeforeJob = "/etc/bacula/scripts/make_catalog_backup.pl MyCatalog"
#  # This deletes the copy of the catalog
  RunAfterJob  = "/etc/bacula/scripts/delete_catalog_backup"
  Write Bootstrap = "/var/lib/bacula/%n.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=asteroid-fd
  FileSet="Full Set"                  
  Storage = AsteroidFileStorage
  Pool = Default
  Messages = Standard
  Where = /srv/backup/bacula-storage
}


# List of files to be backed up
FileSet {
  Name = "Full Set"
  Include {
    Options {
      signature = MD5
    }
    File = /
  }

  Exclude {
    File = /var/lib/bacula
    File = /srv/backup
    File = /proc
    File = /tmp
    File = /.journal
    File = /.fsck
  }
}

FileSet {
  Name = "Orbital Homedirs"
  Include {
    Options  {
       signature = MD5
    }
    File = /home
  }
  Exclude {
    File = /home/james/media
  }
}

FileSet {
  Name = "Orbital System"
  Include {
    Options {
      signature = MD5
      compression = GZIP 
    }
    File = /
  }

  Exclude {
    File = /var/lib/bacula
    File = /srv/backup
    File = /proc
    File = /tmp
    File = /.journal
    File = /.fsck
    File = /home
    File = /nas
    File = /mnt
    File = /backup
  }
}


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
}

# 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/lib/bacula/bacula.sql"
  }
}

# Client (File Services) to backup
Client {
  Name = asteroid-fd
  Address = localhost
  FDPort = 9102
  Catalog = MyCatalog
  Password = "quite-secret"
  File Retention = 30 days            # 30 days
  Job Retention = 6 months            # six months
  AutoPrune = yes                     # Prune expired Jobs/Files
}

Client {
  Name = orbital-fd
  Address = orbital.spiral-arm.org
  FDPort = 9102
  Catalog = MyCatalog
  Password = "do-not-post-this-to-a-public-mailing-list"
  File Retention = 30 days            # 30 days
  Job Retention = 6 months            # six months
  AutoPrune = yes                     # Prune expired Jobs/Files
}


# Client (File Services) to backup
Client {
  Name = gsv-fd
  Address = gsv-internal.spiral-arm.org
  FDPort = 9102
  Catalog = MyCatalog
  Password = "another-here"
  File Retention = 30 days            # 30 days
  Job Retention = 6 months            # six months
  AutoPrune = yes                     # Prune expired Jobs/Files
}

# Client (File Services) to backup
Client {
  Name = microlith-fd
  Address = microlith.spiral-arm.org
  FDPort = 9102
  Catalog = MyCatalog
  Password = "blablabla"
  File Retention = 30 days            # 30 days
  Job Retention = 6 months            # six months
  AutoPrune = yes                     # Prune expired Jobs/Files
}

Storage {
  Name = AsteroidFileStorage
  Address = asteroid.spiral-arm.org 
  SDPort = 9103
  Password = "1."
  Device = AsteroidFileStorage
  Media Type = File
}

Storage {
  Name = AsteroidSATADock
  Address = asteroid.spiral-arm.org 
  SDPort = 9103
  Password = "2."
  Device = sata-dock-1
  Media Type = RemovableDiskFile
}

Storage {
  Name = orbital-sd
  Address = orbital.spiral-arm.org
  SDPort = 9103
  Password = "(null)"
  Device = sata-dock
  Media Type = RemovableDiskFile
}

# 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 =  
  dbname = "bacula"; DB Address = ""; dbuser = "bacula"; dbpassword = "tmegihjm"
}

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 = all, !skipped            
  operator = root = mount
  console = all, !skipped, !saved
  append = "/var/log/bacula/bacula.log" = all, !skipped
  catalog = all
}


#
# 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 = all, !skipped            
  console = all, !skipped, !saved
  append = "/var/log/bacula/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
}

# File Pool definition
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 Volume Jobs = 1
  Maximum Volumes = 100               # Limit number of Volumes in Pool
}


# RemovableFile Pool definition
Pool {
  Name = RemovableDiskFile
  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 = asteroid-mon
  Password = "UNICODE SNOWMAN"
  CommandACL = status, .status
}
