Skip to content

Latest commit

 

History

History
2274 lines (1325 loc) · 57 KB

REFERENCE.md

File metadata and controls

2274 lines (1325 loc) · 57 KB

Reference

Table of Contents

Classes

Defined types

Functions

  • bacula::escape: Return a quoted escaped string suitable for bacula configuration
  • bacula::yesno2str: Convert various representations of 'yes' and 'no' to 'yes' and 'no'.

Data types

Classes

bacula

This class is here to hold the data about a bacula instalation. The parameters in this class are intended to be configured through hiera. Other module classes will reference the values here.

  • TODO director_address is confusing, and is only used by the bconsole template; Document the use of storage_name; Document the use of director_name

Examples

include bacula

Parameters

The following parameters are available in the bacula class:

conf_dir

Data type: String

The path to the bacula configuration directory

bacula_user

Data type: String

The posix user for bacula

bacula_group

Data type: String

The posix group for bacula

homedir

Data type: String

The bacula user's home directory path

rundir

Data type: String

The run dir for the daemons

director_address

Data type: String

The default address of the director used by bconsole

director_name

Data type: String

The default director name

storage_name

Data type: String

The default storage name

db_type

Data type: String

The database provider used by Bacula

Default value: 'pgsql'

homedir_mode

Data type: String

The bacula user's home director mode

Default value: '0770'

monitor

Data type: Bacula::Yesno

Enable the Bacula Monitor option

Default value: true

device_seltype

Data type: String

SELinux type for the device

Default value: 'bacula_store_t'

tls_enable

Data type: Optional[Bacula::Yesno]

Enable TLS support

Default value: undef

tls_require

Data type: Optional[Bacula::Yesno]

Require TLS connections

Default value: undef

tls_certificate

Data type: Optional[String]

The full path and filename of a PEM encoded TLS certificate

Default value: undef

tls_key

Data type: Optional[String]

The full path and filename of a PEM encoded TLS private key

Default value: undef

tls_verify_peer

Data type: Optional[Bacula::Yesno]

Verify peer certificate

Default value: undef

tls_allowed_cn

Data type: Array[String]

Common name attribute of allowed peer certificates

Default value: []

tls_ca_certificate_file

Data type: Optional[String]

The full path and filename specifying a PEM encoded TLS CA certificate(s)

Default value: undef

tls_ca_certificate_dir

Data type: Optional[String]

Full path to TLS CA certificate directory

Default value: undef

tls_dh_file

Data type: Optional[String]

Path to PEM encoded Diffie-Hellman parameter file

Default value: undef

job_tag

Data type: Optional[String]

A tag to add to all job resources

Default value: undef

bacula::client

This class installs and configures the File Daemon to backup a client system.

Examples

class { 'bacula::client': director_name => 'mydirector.example.com' }

Parameters

The following parameters are available in the bacula::client class:

packages

Data type: Array[String]

A list of packages to install; loaded from hiera

services

Data type: String

A list of services to operate; loaded from hiera

default_pool

Data type: String

The name of the Pool for this FD to use by default

default_pool_full

Data type: Optional[String]

The name of the Pool to use for Full jobs

default_pool_inc

Data type: Optional[String]

The name of the Pool to use for Incremental jobs

default_pool_diff

Data type: Optional[String]

The name of the Pool to use for Differential jobs

port

Data type: Integer

The listening port for the File Daemon

Default value: 9102

listen_address

Data type: Array[String[1]]

The listening IP addresses for the File Daemon By default, Bacula listen an all IPv4 only, which is equivalent to

   listen_address => [
     '0.0.0.0',
   ],

Listening on both IPv6 and IPv4 depends on your system configuration of IPv4-mapped IPv6 (RFC 3493): when enabled, the following is enough to listen on both all IPv6 and all IPv4:

   listen_address => [
     '::',
   ],

If IPv4-mapped IPv6 is not used, each address must be indicated separately:

   listen_address => [
     '::',
     '0.0.0.0',
   ],

Indicating both addresses with IPv4-mapped IPv6 enabled will result in Bacula being unable to bind twice to the IPv4 address and fail to start.

Default value: []

password

Data type: String

A password to use for communication with this File Daemon

Default value: 'secret'

max_concurrent_jobs

Data type: Integer

Bacula FD option for 'Maximum Concurrent Jobs'

Default value: 2

director_name

Data type: String

The hostname of the director for this FD

Default value: $bacula::director_name

autoprune

Data type: Bacula::Yesno

Bacula FD option for 'AutoPrune'

Default value: true

file_retention

Data type: Bacula::Time

Bacula FD option for 'File Retention'

Default value: '45 days'

job_retention

Data type: Bacula::Time

Bacula FD option for 'Job Retention'

Default value: '6 months'

client

Data type: String

The name or address by which to contact this FD

Default value: $trusted['certname']

address

Data type: String

The listening address for the File Daemon

Default value: $facts['networking']['fqdn']

pki_signatures

Data type: Optional[Bacula::Yesno]

Bacula FD option for 'PKI Signatures'

Default value: undef

pki_encryption

Data type: Optional[Bacula::Yesno]

Bacula FD option for 'PKI Encryption'

Default value: undef

pki_keypair

Data type: Optional[String]

Bacula FD option for 'PKI Keypair'

Default value: undef

pki_master_key

Data type: Optional[String]

Bacula FD option for 'PKI Master Key'

Default value: undef

plugin_dir

Data type: Optional[String]

Bacula FD option for the 'Plugin Directory'

Default value: undef

bacula::common

This class configures and installs the bacula client packages and enables the service, so that bacula jobs can be run on the client including this manifest.

bacula::director

This class installs and configures the Bacula Director

  • TODO director_address is only used by bconsole, and is confusing as director is likely the same

Examples

class { 'bacula::director':
  storage => 'mystorage.example.com'
}

Parameters

The following parameters are available in the bacula::director class:

messages

Data type: Hash[String, Bacula::Message]

Logging configuration; loaded from hiera

packages

Data type: Array[String]

A list of packages to install; loaded from hiera

services

Data type: String

A list of services to operate; loaded from hiera

manage_db

Data type: Bacula::Yesno

Whether the module should manage the director database

Default value: true

conf_dir

Data type: String

Path to bacula configuration directory

Default value: $bacula::conf_dir

db_name

Data type: String

The database name

Default value: 'bacula'

db_pw

Data type: String

The database user's password

Default value: 'notverysecret'

db_user

Data type: String

The database user

Default value: 'bacula'

db_address

Data type: Optional[String]

The database address

Default value: undef

db_port

Data type: Optional[String]

The database port

Default value: undef

director_address

Data type: String

The address of the director used by bconsole

Default value: $bacula::director_address

director

Data type: String

The name of the director

Default value: $trusted['certname']

group

Data type: String

The posix group for bacula

Default value: $bacula::bacula_group

homedir

Data type: String

The bacula director working directory

Default value: $bacula::homedir

job_tag

Data type: Optional[String]

A string to use when realizing jobs and filesets

Default value: $bacula::job_tag

listen_address

Data type: Array[String[1]]

The listening IP addresses for the director The notes for bacula::client::listen_address apply.

Default value: []

max_concurrent_jobs

Data type: Integer

Bacula Director option for 'Maximum Concurrent Jobs'

Default value: 20

manage_defaults

Data type: Boolean

Setup default jobdef, schedule, pool and restoration jobs

Default value: true

password

Data type: String

password to connect to the director

Default value: 'secret'

port

Data type: Integer

The listening port for the Director

Default value: 9101

rundir

Data type: String

Bacula Director option for 'Pid Directory'

Default value: $bacula::rundir

storage_name

Data type: String

The Name of the Storage daemon

Default value: $bacula::storage_name

make_bacula_tables

Data type: String

Path to the script that loads the database schema

bacula::director::defaults

Some default resources for the bacula director. These are referenced by defaults in other parts of this module, but need not be used. They are here to ensure that the simple case of deploying a director and storage on the same machine, allows clients to receive the correct configuration.

bacula::director::postgresql

Deploys a postgres database server for hosting the Bacula director database.

Parameters

The following parameters are available in the bacula::director::postgresql class:

make_bacula_tables

Data type: String

Path to the script that loads the database schema

Default value: $bacula::director::make_bacula_tables

db_name

Data type: String

The database name

Default value: $bacula::director::db_name

db_pw

Data type: String

The database user's password

Default value: $bacula::director::db_pw

db_user

Data type: String

The database user

Default value: $bacula::director::db_user

bacula::storage

This class configures the Bacula storage daemon.

Parameters

The following parameters are available in the bacula::storage class:

services

Data type: String

A list of services to operate; loaded from hiera

packages

Data type: Array[String]

A list of packages to install; loaded from hiera

conf_dir

Data type: String

Path to bacula configuration directory

Default value: $bacula::conf_dir

device

Data type: String

The system file name of the storage device managed by this storage daemon

Default value: '/bacula'

device_mode

Data type: Stdlib::Filemode

The posix mode for device

Default value: '0770'

device_name

Data type: String

The Name that the Director will use when asking to backup or restore to or from to this device

Default value: "${trusted['certname']}-device"

device_owner

Data type: String

The posix user owning the device directory

Default value: $bacula::bacula_user

device_seltype

Data type: String

SELinux type for the device

Default value: $bacula::device_seltype

director_name

Data type: String

Specifies the Name of the Director allowed to connect to the Storage daemon

Default value: $bacula::director_name

group

Data type: String

The posix group for bacula

Default value: $bacula::bacula_group

homedir

Data type: String

The directory in which the Storage daemon may put its status files

Default value: $bacula::homedir

listen_address

Data type: Array[String[1]]

The listening IP addresses for the storage daemon The notes for bacula::client::listen_address apply.

Default value: []

maxconcurjobs

Data type: Integer

maximum number of Jobs that may run concurrently

Default value: 5

media_type

Data type: String

The type of media supported by this device

Default value: 'File'

password

Data type: String

Specifies the password that must be supplied by the named Director

Default value: 'secret'

port

Data type: Integer

The listening port for the Storage Daemon

Default value: 9103

rundir

Data type: String

The directory in which the Director may put its process Id file files

Default value: $bacula::rundir

storage

Data type: String

The address to be configured on the director to communicate with this storage server

Default value: $trusted['certname']

address

Data type: String

The listening address for the Storage Daemon

Default value: $facts['networking']['fqdn']

user

Data type: String

The posix user for bacula

Default value: $bacula::bacula_user

Defined types

bacula::director::client

This define handles informing the director about a client. This class should not be used directly, but only ever exported through the bacula::client define. This is the director's configuration for a given client.

Examples

Taken from the bacula::client define:
@@bacula::director::client { $client:
  port           => $port,
  password       => $password,
  autoprune      => $autoprune,
  file_retention => $file_retention,
  job_retention  => $job_retention,
  tag            => "bacula-${director_name}",
}

Parameters

The following parameters are available in the bacula::director::client defined type:

address

Data type: String

The address of the Bacula File server daemon

port

Data type: Variant[String,Integer]

The port of the Bacula File server daemon

password

Data type: String

The password to be used when establishing a connection with the File services

file_retention

Data type: Bacula::Time

The File Retention directive defines the length of time that Bacula will keep File records in the Catalog database after the End time of the Job corresponding to the File records

job_retention

Data type: Bacula::Time

The Job Retention directive defines the length of time that Bacula will keep Job records in the Catalog database after the Job End time

autoprune

Data type: Bacula::Yesno

If AutoPrune is set to yes, Bacula will automatically apply the File retention period and the Job retention period for the Client at the end of the Job

conf_dir

Data type: String

The path to the bacula configuration directory

Default value: $bacula::conf_dir

bacula::director::fileset

This class handles a Director's fileset.conf entry. Filesets are intended to be included on the Director catalog. Resources of this type may also be exported to be realized by the director.

Examples

bacula::director::fileset { 'Home':
  files => ['/home'],
}

Parameters

The following parameters are available in the bacula::director::fileset defined type:

files

Data type: Array[String]

The list of directories and/or files to be processed in the backup job

conf_dir

Data type: String

The bacula configuration director. Should not need adjusting

Default value: $bacula::conf_dir

director_name

Data type: String

The name of the director intended to receive this fileset

Default value: $bacula::director_name

excludes

Data type: Array[String]

A list of paths to exclude from the filest

Default value: []

options

Data type: Hash[String, Variant[String, Array[String], Bacula::Yesno]]

A hash of options to include in the fileset

Default value:

{
    'signature'   => 'SHA1',
    'compression' => 'GZIP9',
  }

bacula::director::job

This define handles the director portion of a job. This define should not be used directly. It is intended to be used only from the bacula::job define.

This makes it simpler for the director to realize and override the conf_dir setting, so that the client conf_dir and the director conf_dir can differ, which is useful in a multi platform environment.

Examples

from bacula::job
@@bacula::director::job { $name:
  content => template($template),
  tag     => $real_tags,
}

Parameters

The following parameters are available in the bacula::director::job defined type:

content

Data type: String

The full content of the job definition

conf_dir

Data type: String

Overridden at realize, should not need adjusting

Default value: $bacula::conf_dir

bacula::director::pool

This define adds a pool to the bacula director configuration in the conf.d method. This resources is intended to be used from bacula::storage as a way to export the pool resources to the director.

Examples

bacula::director::pool {
  "PuppetLabsPool-Full":
    volret      => "2 months",
    maxvolbytes => 2000000000,
    maxvoljobs  => 10,
    maxvols     => 20,
    label       => "Full-";
}

Parameters

The following parameters are available in the bacula::director::pool defined type:

volret

Data type: Optional[String]

Bacula pool configuration option "Volume Retention"

Default value: undef

maxvoljobs

Data type: Optional[Variant[String,Integer]]

Bacula pool configuration option "Maximum Volume Jobs"

Default value: undef

maxvolbytes

Data type: Optional[Bacula::Size]

Bacula pool configuration option "Maximum Volume Bytes"

Default value: undef

maxvols

Data type: Optional[Variant[String,Integer]]

Bacula pool configuration option "Maximum Volumes"

Default value: undef

label

Data type: Optional[String]

Bacula pool configuration option "Label Format"

Default value: undef

voluseduration

Data type: Optional[String]

Bacula pool configuration option "Volume Use Duration"

Default value: undef

storage

Data type: String

Bacula pool configuration option "Storage"

Default value: $bacula::director::storage

pooltype

Data type: String

Bacula pool configuration option "Pool Type"

Default value: 'Backup'

recycle

Data type: Bacula::Yesno

Bacula pool configuration option "Recycle"

Default value: true

autoprune

Data type: Bacula::Yesno

Bacula pool configuration option "AutoPrune"

Default value: true

purgeaction

Data type: String

Bacula pool configuration option "Action On Purge"

Default value: 'Truncate'

next_pool

Data type: Optional[String]

Bacula pool configuration option "Next Pool"

Default value: undef

conf_dir

Data type: String

The path to the bacula configuration directory

Default value: $bacula::conf_dir

bacula::director::storage

This define creates a storage declaration for the director. This informs the director which storage servers are available to send client backups to.

This resource is intended to be used from bacula::storage as an exported resource, so that each storage server is available as a configuration on the director.

Parameters

The following parameters are available in the bacula::director::storage defined type:

address

Data type: String

Bacula director configuration for Storage option 'SDAddress'

Default value: $name

port

Data type: Integer

Bacula director configuration for Storage option 'SDPort'

Default value: 9103

password

Data type: String

Bacula director configuration for Storage option 'Password'

Default value: 'secret'

device_name

Data type: String

Bacula director configuration for Storage option 'Device'

Default value: "${facts['networking']['fqdn']}-device"

media_type

Data type: String

Bacula director configuration for Storage option 'Media Type'

Default value: 'File'

maxconcurjobs

Data type: Integer

Bacula director configuration for Storage option 'Maximum Concurrent Jobs'

Default value: 1

conf_dir

Data type: String

Bacula configuration directory

Default value: $bacula::conf_dir

bacula::job

This class installs a bacula job on the director. This can be used for specific applications as well as general host backups

Examples

bacula::job { "${fqdn}-common":
  fileset => "Root",
}
bacula::job { "${fqdn}-mywebapp":
  files    => ["/var/www/mywebapp","/etc/mywebapp"],
  excludes => ["/var/www/mywebapp/downloads"],
}

Parameters

The following parameters are available in the bacula::job defined type:

files

Data type: Array[String]

An array of files that you wish to get backed up on this job for this host. ie: ["/etc","/usr/local"]

Default value: []

excludes

Data type: Array[String]

An array of files to skip for the given job. ie: ["/usr/local/src"]

Default value: []

fileset

Data type: Optional[String]

If set to true, a fileset will be genereated based on the files and excludes paramaters specified above. If set to false, the job will attempt to use the fileset named "Common". If set to anything else, provided it's a String, that named fileset will be used. NOTE: the fileset Common or the defined fileset must be declared elsewhere for this to work. See Class::Bacula for details

Default value: undef

jobtype

Data type: Bacula::JobType

The type of job

Default value: 'Backup'

template

Data type: String

Template to use for generating the job configuration fragment

Default value: 'bacula/job.conf.epp'

pool

Data type: Optional[String]

Name of the pool to use by default for this job

Default value: undef

pool_full

Data type: Optional[String]

Name of the pool to use for Full jobs

Default value: undef

pool_inc

Data type: Optional[String]

Name of the pool to use for Incremental jobs

Default value: undef

pool_diff

Data type: Optional[String]

Name of the pool to use for Differential jobs

Default value: undef

storage

Data type: Optional[String]

Name of the storage service to use

Default value: undef

jobdef

Data type: Variant[Boolean, String]

If a JobDefs-Resource-Name is specified, all the values contained in the named JobDefs resource will be used as the defaults for the current Job

Default value: 'Default'

runscript

Data type: Array[Bacula::Runscript]

Array of hash(es) containing RunScript directives

Default value: []

level

Data type: Optional[String]

The Level directive specifies the default Job level to be run

Default value: undef

accurate

Data type: Bacula::Yesno

In accurate mode, the File daemon knowns exactly which files were present after the last backup. So it is able to handle deleted or renamed files

Default value: false

reschedule_on_error

Data type: Bacula::Yesno

boolean for enableing disabling job option "Reschedule On Error"

Default value: false

reschedule_interval

Data type: Bacula::Time

time-spec for job option "Reschedule Interval"

Default value: '1 hour'

reschedule_times

Data type: Integer

count for job option "Reschedule Times"

Default value: 10

messages

Data type: Optional[String]

containing the name of the message resource to use for this job set to false to disable this option

Default value: undef

restoredir

Data type: Stdlib::Absolutepath

containing the prefix for restore jobs

Default value: '/tmp/bacula-restores'

sched

Data type: Optional[String]

containing the name of the scheduler set to false to disable this option

Default value: undef

priority

Data type: Optional[Integer]

containing the priority number for the job set to false to disable this option

Default value: undef

job_tag

Data type: Optional[String]

that might be used for grouping of jobs. Pass this to bacula::director to only collect jobs that match this tag

Default value: undef

selection_type

Data type: Optional[String]

Determines how the migration job will go about selecting what JobIds to migrate

Default value: undef

selection_pattern

Data type: Optional[String]

Pattern to match against to filter items with selection_type

Default value: undef

max_concurrent_jobs

Data type: Integer

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

Default value: 1

write_bootstrap

Data type: Optional[String]

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

Default value: undef

max_full_interval

Data type: Optional[String]

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.

Default value: undef

bacula::jobdefs

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

Parameters

The following parameters are available in the bacula::jobdefs defined type:

jobtype

Data type: Bacula::JobType

The Type directive specifies the Job type

Default value: 'Backup'

sched

Data type: String

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

Default value: 'Default'

messages

Data type: String

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

Default value: 'Standard'

priority

Data type: Integer

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

Default value: 10

pool

Data type: String

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

Default value: 'Default'

full_backup_pool

Data type: Optional[String]

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

Default value: undef

differential_backup_pool

Data type: Optional[String]

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

Default value: undef

level

Data type: Optional[String]

The Level directive specifies the default Job level to be run

Default value: undef

accurate

Data type: Bacula::Yesno

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

Default value: false

reschedule_on_error

Data type: Bacula::Yesno

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

Default value: false

reschedule_interval

Data type: Bacula::Time

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

Default value: '1 hour'

reschedule_times

Data type: Integer

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

Default value: 10

max_concurrent_jobs

Data type: Integer

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

Default value: 1

write_bootstrap

Data type: Optional[String]

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

Default value: undef

max_full_interval

Data type: Optional[String]

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.

Default value: undef

bacula::messages

Create a Messages resource on the $daemon (director, storage or file).

Parameters

The following parameters are available in the bacula::messages defined type:

append

Data type: Optional[String]

Append the message to the filename given in the address field

Default value: undef

catalog

Data type: Optional[String]

Send the message to the Catalog database

Default value: undef

console

Data type: Optional[String]

Send the message to the Bacula console

Default value: undef

daemon

Data type: Enum['dir', 'fd', 'sd']

Daemon to add Messages resource to

Default value: 'dir'

director

Data type: Optional[String]

Send the message to the Director whose name is given in the address field

Default value: undef

mailcmd

Data type: Optional[String]

Specify exactly how to send the mail

Default value: undef

mail

Data type: Optional[String]

Send the message to the email addresses that are given as a comma separated list in the address field

Default value: undef

mailonerrorcmd

Data type: Optional[String]

Specify exactly how to send error mail

Default value: undef

mailonerror

Data type: Optional[String]

Send the error message to the email addresses that are given as a comma separated list in the address field

Default value: undef

mailonsuccesscmd

Data type: Optional[String]

Specify exactly how to send success mail

Default value: undef

mailonsuccess

Data type: Optional[String]

Send the success message to the email addresses that are given as a comma separated list in the address field

Default value: undef

mname

Data type: String

The name of the Messages resource. The name you specify here will be used to tie this Messages resource to a Job and/or to the daemon

Default value: 'Standard'

operatorcmd

Data type: Optional[String]

This resource specification is similar to the MailCommand except that it is used for Operator messages

Default value: undef

operator

Data type: Optional[String]

Send the message to the email addresses that are specified as a comma separated list in the address field

Default value: undef

syslog

Data type: Optional[String]

Send the message to the system log (syslog) using the facility specified in the address field

Default value: undef

bacula::schedule

Creates a schedule to which jobs and jobdefs can adhere.

Examples

bacula::schedule { 'Regularly':
  runs => [
    'Level=Incremental monday-saturday at 12:15',
    'Level=Incremental monday-saturday at 0:15',
    'Level=Full sunday at 0:05',
  ]
}

Parameters

The following parameters are available in the bacula::schedule defined type:

runs

Data type: Array[String]

A list of Bacula Run directives

conf_dir

Data type: String

Path to bacula configuration directory

Default value: $bacula::conf_dir

bacula::storage::device

This define creates a storage device declaration. This informs the storage daemon which storage devices are available to send client backups to.

Parameters

The following parameters are available in the bacula::storage::device defined type:

device_name

Data type: String

Bacula director configuration for Device option 'Name'

Default value: $name

media_type

Data type: String

Bacula director configuration for Device option 'Media Type'

Default value: 'File'

device

Data type: String

Bacula director configuration for Device option 'Archive Device'

Default value: '/bacula'

label_media

Data type: Bacula::Yesno

Bacula director configuration for Device option 'LabelMedia'

Default value: true

random_access

Data type: Bacula::Yesno

Bacula director configuration for Device option 'Random Access'

Default value: true

automatic_mount

Data type: Bacula::Yesno

Bacula director configuration for Device option 'AutomaticMount'

Default value: true

removable_media

Data type: Bacula::Yesno

Bacula director configuration for Device option 'RemovableMedia'

Default value: false

always_open

Data type: Bacula::Yesno

Bacula director configuration for Device option 'AlwaysOpen'

Default value: false

maxconcurjobs

Data type: Integer

Bacula director configuration for Device option 'Maximum Concurrent Jobs'

Default value: 1

conf_dir

Data type: String

Path to bacula configuration directory

Default value: $bacula::conf_dir

device_mode

Data type: Stdlib::Filemode

Unix mode of the Archive Device directory

Default value: '0770'

device_owner

Data type: String

Owner of the Archive Device directory

Default value: $bacula::bacula_user

device_seltype

Data type: String

SELinux type for the device

Default value: $bacula::device_seltype

director_name

Data type: String

Name of the Director allowed to connect to the Storage daemon

Default value: $bacula::director_name

group

Data type: String

The posix group for bacula

Default value: $bacula::bacula_group

Functions

bacula::escape

Type: Ruby 4.x API

Return a quoted escaped string suitable for bacula configuration

Examples

bacula::escape('sed -i "" -e s|a|b| /tmp/tmp.U6BF0NIS') #=> "\"sed -i \\\"\\\" -e s|a|b| /tmp/tmp.U6BF0NIS\""

bacula::escape(String $value)

Return a quoted escaped string suitable for bacula configuration

Returns: String The escaped string

Examples
bacula::escape('sed -i "" -e s|a|b| /tmp/tmp.U6BF0NIS') #=> "\"sed -i \\\"\\\" -e s|a|b| /tmp/tmp.U6BF0NIS\""
value

Data type: String

The string to escape

bacula::yesno2str

Type: Ruby 4.x API

Convert various representations of 'yes' and 'no' to 'yes' and 'no'.

Examples

bacula::yesno2str(true)    #=> 'yes'
bacula::yesno2str('true')  #=> 'yes'
bacula::yesno2str('yes')   #=> 'yes'
bacula::yesno2str(false)   #=> 'no'
bacula::yesno2str('false') #=> 'no'
bacula::yesno2str('no')    #=> 'no'

bacula::yesno2str(Variant[Boolean, Enum["yes", "true", "no", "false"]] $value)

Convert various representations of 'yes' and 'no' to 'yes' and 'no'.

Returns: String Either 'yes' or 'no'

Examples
bacula::yesno2str(true)    #=> 'yes'
bacula::yesno2str('true')  #=> 'yes'
bacula::yesno2str('yes')   #=> 'yes'
bacula::yesno2str(false)   #=> 'no'
bacula::yesno2str('false') #=> 'no'
bacula::yesno2str('no')    #=> 'no'
value

Data type: Variant[Boolean, Enum["yes", "true", "no", "false"]]

A boolean value

Data types

Bacula::JobType

The type of job

Alias of Pattern[/^Backup/, /^Restore/, /^Admin/, /^Verify/, /^Copy/, /^Migrate/]

Bacula::Message

A Bacula message specification

Alias of

Struct[{
  mname            => String,
  append           => Optional[String],
  catalog          => Optional[String],
  console          => Optional[String],
  daemon           => Optional[String],
  director         => Optional[String],
  mail             => Optional[String],
  mailcmd          => Optional[String],
  mailonsuccess    => Optional[String],
  mailonsuccesscmd => Optional[String],
  mailonerror      => Optional[String],
  mailonerrorcmd   => Optional[String],
  operator         => Optional[String],
  operatorcmd      => Optional[String],
  syslog           => Optional[String],
}]

Bacula::Runscript

A Bacula Runscript specification

Alias of

Struct[{
  runs_when         => Optional[Enum[
    'Before',
    'After',
    'Always',
    'AfterVSS',
    'Never',
  ]],
  fail_job_on_error => Optional[Bacula::Yesno],
  runs_on_success   => Optional[Bacula::Yesno],
  runs_on_failure   => Optional[Bacula::Yesno],
  runs_on_client    => Optional[Bacula::Yesno],
  command           => String,
}]

Bacula::Size

A size indication

Examples

12
"7MB"
"3 GB"

Alias of

Variant[Integer, Pattern[
    /(?i:\A\d+\s*[mg]b?\Z)/,
  ]]

Bacula::Time

A time indication

Examples

"12"
"12 hours 7 seconds"
"8d 2h 12m"

Alias of Pattern[/^\d+$/, /^\d+\s+(s|sec|seconds?|mins?|minutes?|h|hours?|d|days?|w|weeks?|m|months?|q|quarters?|y|years?)(\s+\d+\s+(s|sec|seconds?|mins?|minutes?|h|hours?|d|days?|w|weeks?|m|months?|q|quarters?|y|years?))*$/]

Bacula::Yesno

A Boolean value

Alias of

Variant[Boolean, Enum[
    'yes',
    'no',
    'true',  # lint:ignore:quoted_booleans
    'false', # lint:ignore:quoted_booleans
  ]]