Puppet Class: profile::mariadb::backup::snapshot

Defined in:
modules/profile/manifests/mariadb/backup/snapshot.pp

Overview

Postprocess xtrabackup/mariabackup snapshots so they are placed on the right place at the provisioning server



3
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
29
# File 'modules/profile/manifests/mariadb/backup/snapshot.pp', line 3

class profile::mariadb::backup::snapshot {
    require_package(
        'python3',  # also requires either mariabackup or wmf-mariadb*
        'python3-yaml',
        'python3-pymysql',
    )
    class { 'mariadb::packages_wmf': }  # needed for xbstream and --prepare

    file { '/srv/backups/snapshots':
        ensure  => directory,
        owner   => 'dump',
        group   => 'dump',
        mode    => '0600', # implicitly 0700 for dirs
        require => File['/srv/backups'],
    }

    file { ['/srv/backups/snapshots/ongoing',
            '/srv/backups/snapshots/latest',
            '/srv/backups/snapshots/archive',
        ]:
        ensure  => directory,
        owner   => 'dump',
        group   => 'dump',
        mode    => '0600', # implicitly 0700 for dirs
        require => File['/srv/backups/snapshots'],
    }
}