#
# 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.0.2 (01/28/07) -- Windows MVS
#
#  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 = winserv2-dir
  DIRport = 9101                # where we listen for UA connections
  QueryFile = "C:\\Program Files\\Bacula\\bin\\query.sql"
  WorkingDirectory = "C:\\Documents and Settings\\All Users\\Application Data\\Bacula\\Work"
  PidDirectory = "C:\\Documents and Settings\\All Users\\Application Data\\Bacula\\Work"
  Maximum Concurrent Jobs = 5
  Password = "..."
  Messages = Daemon
}

JobDefs {
  Name = "DefaultJob"
  Type = Backup
  FileSet = "Windows C and D"
  Level = Differential
  Schedule = "DefaultCycle"
  Messages = Standard
  Pool = DailyPool
  Priority = 10
}

Job {
  Name = "winserv2"
  Client = winserv2-fd
  JobDefs = "DefaultJob"
  Full Backup Pool = winserv2FullPool
  Differential Backup Pool = winserv2DailyPool
  Incremental Backup Pool = winserv2DailyPool
  Write Bootstrap = "C:\\Documents and Settings\\All Users\\Application Data\\Bacula\\Work\\winserv2.bsr"
  RunBeforeJob = "ntbackup.exe backup systemstate /F c:\\systemstate.bkf"
  RunAfterJob  = "del c:\\systemstate.bkf"
}

Job {
  Name = "winserv3"
  Client = winserv3-fd
  JobDefs = "DefaultJob"
  Full Backup Pool = winserv3FullPool
  Differential Backup Pool = winserv3DailyPool
  Incremental Backup Pool = winserv3DailyPool
  Write Bootstrap = "C:\\Documents and Settings\\All Users\\Application Data\\Bacula\\Work\\winserv3.bsr"
  RunBeforeJob = "ntbackup.exe backup systemstate /F c:\\systemstate.bkf"
  RunAfterJob  = "del c:\\systemstate.bkf"
}

Job {
  Name = "termserv1"
  Client = termserv1-fd
  JobDefs = "DefaultJob"
  Full Backup Pool = termserv1FullPool
  Differential Backup Pool = termserv1DailyPool
  Incremental Backup Pool = termserv1DailyPool
  Write Bootstrap = "C:\\Documents and Settings\\All Users\\Application Data\\Bacula\\Work\\termserv1.bsr"
  RunBeforeJob = "ntbackup.exe backup systemstate /F c:\\systemstate.bkf"
  RunAfterJob  = "del c:\\systemstate.bkf"
}

# Backup the catalog database (after the nightly save)
Job {
  Name = "BackupCatalog"
  JobDefs = "DefaultJob"
  Level = Full
  Client = winserv2-fd
  FileSet = "Catalog"
  Schedule = "WeeklyCycleAfterBackup"
  RunBeforeJob = "\"C:\\Program Files\\Bacula\\bin\\make_catalog_backup\" bacula bacula"
  RunAfterJob  = "\"C:\\Program Files\\Bacula\\bin\\delete_catalog_backup\""
  Write Bootstrap = "C:\\Documents and Settings\\All Users\\Application Data\\Bacula\\Work\\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 = winserv3-fd
  Storage = FullStorage
  FileSet = "Windows C and D"
  Pool = DailyPool
  Messages = Standard
  Where = "C:\\tmp\\bacula-restores"
}

FileSet {
  Name = "Windows C and D"
  Enable VSS = yes
  Include {
    Options {
      Compression = gzip
      Signature = MD5
      Exclude = yes
      IgnoreCase = yes
      EnhancedWild = yes
      DriveType = fixed

	# Exclude local profiles
	WildDir = "C:/Documents and Settings"

      # Exclude directories full of lots and lots of useless little files
#      WildDir = "[A-Z]:/Documents and Settings/*/Cookies"
#      WildDir = "[A-Z]:/Documents and Settings/*/Recent"
#      WildDir = "[A-Z]:/Documents and Settings/*/{Local Settings,LOCALS~1}/History"
#      WildDir = "[A-Z]:/Documents and Settings/*/{Local Settings,LOCALS~1}/Temp"
#      WildDir = "[A-Z]:/Documents and Settings/*/{Local Settings,LOCALS~1}/Temporary Internet Files"

      # Exclude directories full of lots and lots of useless little files
      WildDir = "[A-Z]:/{WINNT,Windows}/Profiles/*/Cookies"
      WildDir = "[A-Z]:/{WINNT,Windows}/Profiles/*/Recent"
      WildDir = "[A-Z]:/{WINNT,Windows}/Profiles/*/{Local Settings,LOCALS~1}/History"
      WildDir = "[A-Z]:/{WINNT,Windows}/Profiles/*/{Local Settings,LOCALS~1}/Temp"
      WildDir = "[A-Z]:/{WINNT,Windows}/Profiles/*/{Local Settings,LOCALS~1}/Temporary Internet Files"

      # Exclude directories full of lots and lots of useless little files
      WildDir = "[A-Z]:/{WINNT,Windows}/system32/config/systemprofile/Cookies"
      WildDir = "[A-Z]:/{WINNT,Windows}/system32/config/systemprofile/Recent"
      WildDir = "[A-Z]:/{WINNT,Windows}/system32/config/systemprofile/{Local Settings,LOCALS~1}/History"
      WildDir = "[A-Z]:/{WINNT,Windows}/system32/config/systemprofile/{Local Settings,LOCALS~1}/Temp"
      WildDir = "[A-Z]:/{WINNT,Windows}/system32/config/systemprofile/{Local Settings,LOCALS~1}/Temporary Internet Files"

      # Some random bits of Windows we want to ignore
      WildDir = "[A-Z]:/{WINNT,Windows}/Prefetch"
      WildDir = "[A-Z]:/{WINNT,Windows}/msdownld.tmp"
      WildDir = "[A-Z]:/{WINNT,Windows}/Internet Logs"
      WildDir = "[A-Z]:/{WINNT,Windows}/$Nt*Uninstall*"
      WildDir = "[A-Z]:/{WINNT,Windows}/Downloaded Installations"

      # Temporary directories & files
      WildDir = "[A-Z]:/{WINNT,Windows}/Temp"
      WildDir = "[A-Z]:/Temp"
      WildFile = "*.tmp"
      WildDir = "[A-Z]:/tmp"

      # Fast Find
      WildFile = "[A-Z]:/ffastun*"

      # System Restore
      WildDir = "[A-Z]:/System Volume Information"

      # Windows Update
      WildDir = "[A-Z]:/WUTemp"

      # Recycle bins
      WildDir = "[A-Z]:/RECYCLE[DR]"

      # Swap files
      WildFile = "[A-Z]:/pagefile.sys"
      WildFile = "[A-Z]:/hiberfil.sys"

      # These are programs and are easier to reinstall than restore from
      # backup
      WildDir = "[A-Z]:/cygwin"
      WildDir = "[A-Z]:/{Program Files,PROGRA~1}/Java"
      WildDir = "[A-Z]:/{Program Files,PROGRA~1}/Java Web Start"
      WildDir = "[A-Z]:/{Program Files,PROGRA~1}/JavaSoft"
      WildDir = "[A-Z]:/{Program Files,PROGRA~1}/Microsoft Office"






	# Exclude backup directory on winserv3:
      WildDir = "D:/Backup"



    }

    File = "C:/"
    File = "D:/"
  }
}

# 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 = "DefaultCycle"
  Run = Full 1st sat at 20:00
  Run = Differential mon-fri at 20:00
}

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

# This is the backup of the catalog
FileSet {
  Name = "Catalog"
  Include {
    Options {
      signature = MD5
    }
    File = "C:\\Documents and Settings\\All Users\\Application Data\\Bacula\\Work\\bacula.sql"
  }
}

# Client (File Services) to backup
Client {
  Name = winserv2-fd
  Address = winserv2....
  FDPort = 9102
  Catalog = MyCatalog
  Password = "..."
  File Retention = 2 months
  Job Retention = 2 months
  AutoPrune = yes                     # Prune expired Jobs/Files
}

Client {
  Name = winserv3-fd
  Address = winserv3....
  FDPort = 9102
  Catalog = MyCatalog
  Password = "..."
  File Retention = 2 months
  Job Retention = 2 months
  AutoPrune = yes                     # Prune expired Jobs/Files
}

Client {
  Name = termserv1-fd
  Address = termserv1....
  FDPort = 9102
  Catalog = MyCatalog
  Password = "..."
  File Retention = 2 months
  Job Retention = 2 months
  AutoPrune = yes                     # Prune expired Jobs/Files
}

Storage
{
  Name = LocalStorage
# Do not use "localhost" here
  Address = winserv2....                # N.B. Use a fully qualified name here
  SDPort = 9103
  Password = "..."
  Device = LocalStorage
  Media Type = LocalFile
}

Storage
{
  Name = FullStorage
# Do not use "localhost" here
  Address = winserv2....                # N.B. Use a fully qualified name here
  SDPort = 9103
  Password = "..."
  Device = FullStorage
  Media Type = FullFile
}

Storage
{
  Name = DailyStorage
# Do not use "localhost" here
  Address = winserv2....                # N.B. Use a fully qualified name here
  SDPort = 9103
  Password = "..."
  Device = DailyStorage
  Media Type = DailyFile
}

Storage
{
  Name = winserv2FullStorage
# Do not use "localhost" here
  Address = winserv2....                # N.B. Use a fully qualified name here
  SDPort = 9103
  Password = "..."
  Device = winserv2FullStorage
  Media Type = winserv2FullFile
}

Storage
{
  Name = winserv2DailyStorage
# Do not use "localhost" here
  Address = winserv2....                # N.B. Use a fully qualified name here
  SDPort = 9103
  Password = "..."
  Device = winserv2DailyStorage
  Media Type = winserv2DailyFile
}

Storage
{
  Name = winserv3FullStorage
# Do not use "localhost" here
  Address = winserv2....                # N.B. Use a fully qualified name here
  SDPort = 9103
  Password = "..."
  Device = winserv3FullStorage
  Media Type = winserv3FullFile
}

Storage
{
  Name = winserv3DailyStorage
# Do not use "localhost" here
  Address = winserv2....                # N.B. Use a fully qualified name here
  SDPort = 9103
  Password = "..."
  Device = winserv3DailyStorage
  Media Type = winserv3DailyFile
}

Storage
{
  Name = termserv1FullStorage
# Do not use "localhost" here
  Address = winserv2....                # N.B. Use a fully qualified name here
  SDPort = 9103
  Password = "..."
  Device = termserv1FullStorage
  Media Type = termserv1FullFile
}

Storage
{
  Name = termserv1DailyStorage
# Do not use "localhost" here
  Address = winserv2....                # N.B. Use a fully qualified name here
  SDPort = 9103
  Password = "..."
  Device = termserv1DailyStorage
  Media Type = termserv1DailyFile
}

# 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 = "\"C:\\Program Files\\Bacula\\bin\\bsmtp\" -h winserv2 -f \" %r\" -s \"Bacula: %t %e of %c %l\" %r"
  operatorcommand = "\"C:\\Program Files\\Bacula\\bin\\bsmtp\" -h winserv2 -f \"%r\" -s \"Bacula: Intervention needed for %j\" %r"
  mail = ... = all, !skipped            
  operator = ... = 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 = "C:\\Documents and Settings\\All Users\\Application Data\\Bacula\\Work\\log" = all, !skipped
}

# Message delivery for daemon messages (no job).
Messages {
  Name = Daemon
  mailcommand = "\"C:\\Program Files\\Bacula\\bin\\bsmtp\" -h winserv2 -f \"%r\" -s \"Bacula daemon message\" %r"
  mail = ... = all, !skipped            
  console = all, !skipped, !saved
  append = "C:\\Documents and Settings\\All Users\\Application Data\\Bacula\\Work\\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 = 2 months
}

Pool
{
  Name = FullPool
  Pool Type = Backup
  Recycle = yes
  AutoPrune = yes
  Volume Retention = 2 months
  Maximum Volume Jobs = 1
  Storage = FullStorage
  Label Format = Full-
}

Pool
{
  Name = DailyPool
  Pool Type = Backup
  Recycle = yes
  AutoPrune = yes
  Volume Retention = 1 month
  Maximum Volume Jobs = 1
  Storage = DailyStorage
  Label Format = Daily-
}

Pool
{
  Name = winserv2FullPool
  Pool Type = Backup
  Recycle = yes
  AutoPrune = yes
  Volume Retention = 2 months
  Maximum Volume Jobs = 1
  Storage = winserv2FullStorage
  Label Format = Full-winserv2-
}

Pool
{
  Name = winserv2DailyPool
  Pool Type = Backup
  Recycle = yes
  AutoPrune = yes
  Volume Retention = 1 month
  Maximum Volume Jobs = 1
  Storage = winserv2DailyStorage
  Label Format = Daily-winserv2-
}

Pool
{
  Name = winserv3FullPool
  Pool Type = Backup
  Recycle = yes
  AutoPrune = yes
  Volume Retention = 2 months
  Maximum Volume Jobs = 1
  Storage = winserv3FullStorage
  Label Format = Full-winserv3-
}

Pool
{
  Name = winserv3DailyPool
  Pool Type = Backup
  Recycle = yes
  AutoPrune = yes
  Volume Retention = 1 month
  Maximum Volume Jobs = 1
  Storage = winserv3DailyStorage
  Label Format = Daily-winserv3-
}

Pool
{
  Name = termserv1FullPool
  Pool Type = Backup
  Recycle = yes
  AutoPrune = yes
  Volume Retention = 2 months
  Maximum Volume Jobs = 1
  Storage = termserv1FullStorage
  Label Format = Full-termserv1-
}

Pool
{
  Name = termserv1DailyPool
  Pool Type = Backup
  Recycle = yes
  AutoPrune = yes
  Volume Retention = 1 month
  Maximum Volume Jobs = 1
  Storage = termserv1DailyStorage
  Label Format = Daily-termserv1-
}

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