Puppet Class: profile::backup::storage::production

Defined in:
modules/profile/manifests/backup/storage/production.pp

Overview



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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
# File 'modules/profile/manifests/backup/storage/production.pp', line 6

class profile::backup::storage::production {
    include profile::backup::storage::common

    # Production setup:
    # 2 storage devices on the same mount point
    file { '/srv/bacula':
        ensure => directory,
        owner  => 'bacula',
        group  => 'bacula',
        mode   => '0660',
    }
    mount { '/srv/bacula' :
        ensure  => mounted,
        device  => '/dev/mapper/hwraid-backups',
        fstype  => 'ext4',
        require => File['/srv/bacula'],
    }
    file { [ '/srv/bacula/production',
          '/srv/bacula/archive' ]:
        ensure  => directory,
        owner   => 'bacula',
        group   => 'bacula',
        mode    => '0660',
        require => Class['bacula::storage'],
    }

    $upcase_site = capitalize($::site)
    bacula::storage::device { "FileStorageArchive${upcase_site}":
        device_type     => 'File',
        media_type      => 'File',
        archive_device  => '/srv/bacula/archive',
        max_concur_jobs => 2,
    }
    bacula::storage::device { "FileStorageProduction${upcase_site}":
        device_type     => 'File',
        media_type      => 'File',
        archive_device  => '/srv/bacula/production',
        max_concur_jobs => 2,
    }
}