Defined Type: backup::set

Defined in:
modules/backup/manifests/set.pp

Overview

backup::set is probably what you want.

Parameters:

  • extras (Any) (defaults to: undef)
  • jobdefaults (Any) (defaults to: undef)


2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'modules/backup/manifests/set.pp', line 2

define backup::set(
    $extras=undef,
    $jobdefaults=undef,
) {
    if defined(Class['profile::backup::host']) {
        if $jobdefaults {
            $real_jobdefaults = $jobdefaults
        } else {
            $real_jobdefaults = $profile::backup::host::jobdefaults
        }
        @bacula::client::job { "${name}-${real_jobdefaults}":
            fileset     => $name,
            jobdefaults => $real_jobdefaults,
            extras      => $extras,
        }

        $motd_content = "#!/bin/sh\necho \"Backed up on this host: ${name}\""
        @motd::script { "backups-${name}":
            ensure   => present,
            priority => 6,
            content  => $motd_content,
            tag      => 'backup-motd',
        }
    }
}