Defined Type: bacula::jobdefs

Defined in:
manifests/jobdefs.pp

Summary

Define a Bacula Jobdefs

Overview

This define adds a jobdefs entry on the bacula director for reference by the client configurations.

Parameters:

  • jobtype (Bacula::JobType) (defaults to: 'Backup')

    The Type directive specifies the Job type

  • sched (String[1]) (defaults to: 'Default')

    The Schedule directive defines what schedule is to be used for the Job

  • messages (String[1]) (defaults to: 'Standard')

    The Messages directive defines what Messages resource should be used for this job, and thus how and where the various messages are to be delivered

  • priority (Integer) (defaults to: 10)

    This directive permits you to control the order in which your jobs will be run by specifying a positive non-zero number

  • pool (String[1]) (defaults to: 'Default')

    The Pool directive defines the pool of Volumes where your data can be backed up

  • full_backup_pool (Optional[String[1]]) (defaults to: undef)

    The Full Backup Pool specifies a Pool to be used for Full backups

  • differential_backup_pool (Optional[String[1]]) (defaults to: undef)

    The Differential Backup Pool specifies a Pool to be used for Differential backups

  • level (Optional[String[1]]) (defaults to: undef)

    The Level directive specifies the default Job level to be run

  • accurate (Bacula::Yesno) (defaults to: false)

    In accurate mode, the File daemon knowns exactly which files were present after the last backup

  • reschedule_on_error (Bacula::Yesno) (defaults to: false)

    If this directive is enabled, and the job terminates in error, the job will be rescheduled as determined by the Reschedule Interval and Reschedule Times directives

  • reschedule_interval (Bacula::Time) (defaults to: '1 hour')

    If you have specified Reschedule On Error = yes and the job terminates in error, it will be rescheduled after the interval of time specified by time-specification

  • reschedule_times (Integer) (defaults to: 10)

    This directive specifies the maximum number of times to reschedule the job

  • max_concurrent_jobs (Integer[1]) (defaults to: 1)

    Maximum number of Jobs from the current Job resource that can run concurrently

  • write_bootstrap (Optional[String[1]]) (defaults to: undef)

    The writebootstrap directive specifies a file name where Bacula will write a bootstrap file for each Backup job run

  • max_full_interval (Optional[Bacula::Time]) (defaults to: undef)

    The time specifies the maximum allowed age (counting from start time) of the most recent successful Full backup that is required in order to run Incremental or Differential backup jobs. f the most recent Full backup is older than this interval, Incremental and Differential backups will be upgraded to Full backups automatically.



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'manifests/jobdefs.pp', line 21

define bacula::jobdefs (
  Bacula::JobType        $jobtype                  = 'Backup',
  String[1]              $sched                    = 'Default',
  String[1]              $messages                 = 'Standard',
  Integer                $priority                 = 10,
  String[1]              $pool                     = 'Default',
  Optional[String[1]]    $full_backup_pool         = undef,
  Optional[String[1]]    $differential_backup_pool = undef,
  Optional[String[1]]    $level                    = undef,
  Bacula::Yesno          $accurate                 = false,
  Bacula::Yesno          $reschedule_on_error      = false,
  Bacula::Time           $reschedule_interval      = '1 hour',
  Integer                $reschedule_times         = 10,
  Integer[1]             $max_concurrent_jobs      = 1,
  Optional[String[1]]    $write_bootstrap          = undef,
  Optional[Bacula::Time] $max_full_interval        = undef,
) {
  include bacula
  $conf_dir = $bacula::conf_dir

  $epp_jobdef_variables = {
    name                      => $name,
    jobtype                   => $jobtype,
    pool                      => $pool,
    full_backup_pool          => $full_backup_pool,
    differential_backup_pool  => $differential_backup_pool,
    sched                     => $sched,
    messages                  => $messages,
    priority                  => $priority,
    accurate                  => $accurate,
    level                     => $level,
    max_concurrent_jobs       => $max_concurrent_jobs,
    reschedule_on_error       => $reschedule_on_error,
    reschedule_interval       => $reschedule_interval,
    reschedule_times          => $reschedule_times,
    write_bootstrap           => $write_bootstrap,
    max_full_interval         => $max_full_interval,
  }

  concat::fragment { "bacula-jobdefs-${name}":
    target  => "${conf_dir}/conf.d/jobdefs.conf",
    content => epp('bacula/jobdefs.conf.epp', $epp_jobdef_variables),
  }
}