Puppet Class: profile::dbbackups::bacula

Defined in:
modules/profile/manifests/dbbackups/bacula.pp

Overview

SPDX-License-Identifier: Apache-2.0 If active, send the backups generated on /srv/backup to long term storage Requires including ::profile::backup::host on the role that uses it

Parameters:

  • active (Boolean) (defaults to: lookup('profile::dbbackups::bacula::active'))


4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'modules/profile/manifests/dbbackups/bacula.pp', line 4

class profile::dbbackups::bacula (
    Boolean $active = lookup('profile::dbbackups::bacula::active'),
) {
    if $active {
        # Warning: because we do-cross dc backups, this can get confusing:
        if $::site == 'eqiad' {
            # dbprovs on eqiad store data on Codfw (cross-dc)
            $jobdefaults = 'Weekly-Wed-DatabasesCodfw'
        } elsif $::site == 'codfw' {
            # dbprovs on codfw store data on eqiad (cross-dc)
            $jobdefaults = 'Weekly-Wed-DatabasesEqiad'  # to be DatabasesEqiad
        } else {
            fail('Only eqiad or codfw pools are configured for database backups.')
        }
        backup::set { 'mysql-srv-backups-dumps-latest':
            jobdefaults => $jobdefaults,
        }
        # Disable snapshoting sending to long term storage.
        # It takes a lot of space and is rarely used beyond
        # the 1 week window.
        # backup::set { 'mysql-srv-backups-snapshots-latest':
        #     jobdefaults => $jobdefaults,
        # }
    }
}