Director {                            # define myself
  Name = platone-dir
  DIRport = 9101                # where we listen for UA connections
  QueryFile = "/usr/local/bacula/etc/query.sql"
  WorkingDirectory = "/usr/local/bacula/var/bacula/working"
  PidDirectory = "/var/run"
  Maximum Concurrent Jobs = 1
  Password = "/f8UA1x0FP0s2bNnWBoM8xKhYQwej14OgJcvPFE7CaLl"         # Console password
  Messages = Daemon
}

JobDefs {
  Name = "DefaultJob"
  Type = Backup
  Level = Incremental
  Client = platone-fd
  FileSet = "Full Set"
  Schedule = "WeeklyCycle"
  Storage = File
  Messages = Standard
  Pool = Default
  Priority = 10
  Max Start Delay = 2h
  Max Wait Time = 1h
}


#
# Define the main nightly save backup job
#   By default, this job will back up to disk in /tmp
#Job {
#  Name = "Client1"
#  JobDefs = "DefaultJob"
#  Write Bootstrap = "/usr/local/bacula/var/bacula/working/Client1.bsr"
#}

#Job {
#  Name = "Client2"
#  Client = clust012-fd
#  JobDefs = "DefaultJob"
#  Write Bootstrap = "/usr/local/bacula/var/bacula/working/Client2.bsr"
#}

# 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
#  RunBeforeJob = "/usr/local/bacula/etc/make_catalog_backup bacula bacula"
#  # This deletes the copy of the catalog
#  RunAfterJob  = "/usr/local/bacula/etc/delete_catalog_backup"
#  Write Bootstrap = "/usr/local/bacula/var/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=platone-fd
  FileSet="Full Set"
  Storage = File
  Pool = Default
  Messages = Standard
  Where = /r1/BACULA_DATA/bacula-restores
#  Where = /tmp/bacula-restores
}

Job {
  Name = "platone"
  Client = platone-fd
  Type = Backup
  FileSet = "Full Set"
  Schedule = "Mensile"
  Storage = File
  Pool = Backup-PC-Edilsoft
  Write Bootstrap = "/usr/local/bacula/var/bacula/working/platone-fd.bsr"
  Max Start Delay = 10h
  Messages = Standard
}

Job {
  Name = "pc-201"
  Client = pc-201-fd
  Type = Backup
  FileSet = "pc-201 Set"
  Schedule = "Mensile"
  Storage = File
  Pool = Backup-PC-Edilsoft
  Write Bootstrap = "/usr/local/bacula/var/bacula/working/pc-201-fd.bsr"
  Max Start Delay = 10h
  Messages = Standard
}

Job {
  Name = "pc-203"
  Client = pc-203-fd
  Type = Backup
  FileSet = "pc-203 Set"
  Schedule = "Mensile"
  Storage = File
  Pool = Backup-PC-Edilsoft
  Write Bootstrap = "/usr/local/bacula/var/bacula/working/pc-203-fd.bsr"
  Max Start Delay = 10h
  Messages = Standard
}

Job {
  Name = "pc-204"
  Client = pc-204-fd
  Type = Backup
  FileSet = "pc-204 Set"
  Schedule = "Mensile"
  Storage = File
  Pool = Backup-PC-Edilsoft
  Write Bootstrap = "/usr/local/bacula/var/bacula/working/pc-204-fd.bsr"
  Max Start Delay = 10h
  Messages = Standard
}

Job {
  Name = "pc-205"
  Client = pc-205-fd
  Type = Backup
  FileSet = "pc-205 Set"
  Schedule = "Mensile"
  Storage = File
  Pool = Backup-PC-Edilsoft
  Write Bootstrap = "/usr/local/bacula/var/bacula/working/pc-205-fd.bsr"
  Max Start Delay = 10h
  Messages = Standard
}

Job {
  Name = "pc-208"
  Client = pc-208-fd
  Type = Backup
  FileSet = "pc-208 Set"
  Schedule = "Mensile"
  Storage = File
  Pool = Backup-PC-Edilsoft
  Write Bootstrap = "/usr/local/bacula/var/bacula/working/pc-208-fd.bsr"
  Max Start Delay = 10h
  Messages = Standard
}

Job {
  Name = "server"
  Client = server-fd
  Type = Backup
  FileSet = "server Set"
  Schedule = "Mensile"
  Storage = File
  Pool = Backup-PC-Edilsoft
  Write Bootstrap = "/usr/local/bacula/var/bacula/working/server-fd.bsr"
  Max Start Delay = 10h
  Messages = Standard
}

# List of files to be backed up
FileSet {
  Name = "Full Set"
  Include {
    Options {
      signature = MD5
    }
    File = /home/diego/bacula-1.38.11
  }
  Exclude {
    File = /proc
    File = /tmp
    File = /.journal
    File = /.fsck
  }
}


Fileset {
  Name = "pc-201 Set"
  Enable VSS = yes
  Include {
    Options {
      signature = MD5
      compression = GZIP
    }
    File = "C:/"
  }
# Exclude {
#    File = "C:/temp
#    }
}

FileSet {
  Name = "pc-203 Set"
  Enable VSS = yes
  Include {
    Options {
      signature = MD5
      compression = GZIP
    }
    File = "C:/"
  }
# Exclude {
#    File = "C:/temp
#    }
}

FileSet {
  Name = "pc-204 Set"
  Enable VSS = yes
  Include {
    Options {
      signature = MD5
      compression = GZIP
    }
    File = "C:/"
  }
# Exclude {
#    File = "C:/temp
#    }
}

FileSet {
  Name = "pc-205 Set"
  Enable VSS = yes
  Include {
    Options {
      signature = MD5
      compression = GZIP
    }
    File = "C:/repository"
  }
# Exclude {
#    File = "C:/temp
#    }
}

FileSet {
  Name = "pc-208 Set"
  Enable VSS = yes
  Include {
    Options {
      signature = MD5
      compression = GZIP
    }
    File = "C:/"
  }
# Exclude {
#    File = "C:/temp
#    }
}

FileSet {
  Name = "server Set"
  Enable VSS = yes
  Include {
    Options {
      signature = MD5
      compression = GZIP
    }
    File = "C:/Dati/196_2003"
    File = "C:/Dati/Aziendale"
    File = "C:/Dati/PRODOTTI"
    File = "D:/Ambiente_prove"
    File = "D:/AppoggioClient"
    File = "D:/Lavoro"
  }
# Exclude {
#    File = "C:/temp
#    }
}

Schedule {
  Name = "Mensile"
  Run = Full 1st Friday at 00:01
  Run = Incremental 2nd-4th Friday at 00:01
}

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

# 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 = /usr/local/bacula/var/bacula/working/bacula.sql
  }
}

# Client (File Services) to backup
Client {
  Name = platone-fd
  Address = platone
  FDPort = 9102
  Catalog = MyCatalog
  Password = "sxyS2FeJIIANGLNESdqNeji9ADlUJ4E2AmyU62s6g9ZD"          # password for FileDaemon
  File Retention = 1h
  Job Retention = 1h
  AutoPrune = yes                     # Prune expired Jobs/Files
}

Client {
  Name = pc-201-fd
  Address = pc-201
  FDPort = 9102
  Catalog = MyCatalog
  Password = "uqxOyI+97MOQjk6hm6C0pOw9T57YRQwoN03b6bHwV7nd"
  File Retention = 30 days
  Job Retention = 30 days
  AutoPrune = yes
}

Client {
  Name = pc-203-fd
  Address = pc-203
  FDPort = 9102
  Catalog = MyCatalog
  Password = "uqxOyI+97MOQjk6hm6C0pOw9T57YRQwoN03b6bHwV7nd"
  File Retention = 30 days
  Job Retention = 30 days
  AutoPrune = yes
}

Client {
  Name = pc-204-fd
  Address = pc-204
  FDPort = 9102
  Catalog = MyCatalog
  Password = "uqxOyI+97MOQjk6hm6C0pOw9T57YRQwoN03b6bHwV7nd"
  File Retention = 30 days
  Job Retention = 30 days
  AutoPrune = yes
}

Client {
  Name = pc-205-fd
  Address = pc-205
  FDPort = 9102
  Catalog = MyCatalog
  Password = "uqxOyI+97MOQjk6hm6C0pOw9T57YRQwoN03b6bHwV7nd"
  File Retention = 30 days
  Job Retention = 30 days
  AutoPrune = yes
}

Client {
  Name = pc-208-fd
  Address = pc-208
  FDPort = 9102
  Catalog = MyCatalog
  Password = "uqxOyI+97MOQjk6hm6C0pOw9T57YRQwoN03b6bHwV7nd"
  File Retention = 30 days
  Job Retention = 30 days
  AutoPrune = yes
}

Client {
  Name = server-fd
  Address = server
  FDPort = 9102
  Catalog = MyCatalog
  Password = "uqxOyI+97MOQjk6hm6C0pOw9T57YRQwoN03b6bHwV7nd"
  File Retention = 30 days
  Job Retention = 30 days
  AutoPrune = yes
}

# Definition of file storage device
Storage {
  Name = File
  Address = platone                # N.B. Use a fully qualified name here
  SDPort = 9103
  Password = "mHtSeID45+5KFIErFKzIBIhvzMs8vam88pG7qQnfpeI3"
  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.
#
  mailcommand = "/usr/local/bacula/sbin/bsmtp -h localhost -f \"\(Bacula\) %r\" -s \"Bacula: %t %e of %c %l\" %r"
  operatorcommand = "/usr/local/bacula/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 = "/usr/local/bacula/var/bacula/working/log" = all, !skipped
}


#
# Message delivery for daemon messages (no job).
Messages {
  Name = Daemon
  mailcommand = "/usr/local/bacula/sbin/bsmtp -h localhost -f \"\(Bacula\) %r\" -s \"Bacula daemon message\" %r"
  mail = root@localhost = all, !skipped
  console = all, !skipped, !saved
  append = "/usr/local/bacula/var/bacula/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 = 365 days         # one year
  Accept Any Volume = yes             # write on any volume in the pool
}

Pool {
  Name = Backup-PC-Edilsoft
  Pool Type = Backup
  Recycle = yes                       # Bacula can automatically recycle Volumes
  AutoPrune = yes                     # Prune expired volumes
  Volume Retention = 30d
  Accept Any Volume = yes             # write on any volume in the pool
  Label Format = "PC-pool-"
}

#
# Restricted console used by tray-monitor to get the status of the director
#
Console {
  Name = platone-mon
  Password = "toPmNN/Ci3cySb6k3kTDZKPQAN2F+J54xrG5Gyft4DB/"
  CommandACL = status, .status
}

