Puppet Class: gitlab::restore

Defined in:
modules/gitlab/manifests/restore.pp

Overview

install restore script on secondary gitlab host

Parameters:

  • restore_ensure (Wmflib::Ensure) (defaults to: 'present')
  • restore_ensure_timer (Wmflib::Ensure) (defaults to: 'present')
  • restore_dir_data (Stdlib::Unixpath) (defaults to: '/srv/gitlab-backup')


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
27
28
29
30
31
# File 'modules/gitlab/manifests/restore.pp', line 2

class gitlab::restore(
    Wmflib::Ensure   $restore_ensure          = 'present',
    Wmflib::Ensure   $restore_ensure_timer    = 'present',
    Stdlib::Unixpath $restore_dir_data        = '/srv/gitlab-backup',
){

    file {"${restore_dir_data}/gitlab-restore.sh":
        ensure => $restore_ensure,
        mode   => '0744' ,
        owner  => 'root',
        group  => 'root',
        source => 'puppet:///modules/gitlab/gitlab-restore.sh';
    }

    file {"${restore_dir_data}/gitlab-restore-v2.sh":
        ensure => $restore_ensure,
        mode   => '0744' ,
        owner  => 'root',
        group  => 'root',
        source => 'puppet:///modules/gitlab/gitlab-restore-v2.sh';
    }

    systemd::timer::job { 'backup-restore':
        ensure      => $restore_ensure_timer,
        user        => 'root',
        description => 'GitLab Backup Restore',
        command     => "${restore_dir_data}/gitlab-restore.sh",
        interval    => {'start' => 'OnCalendar', 'interval' => '*-*-* 01:30:00'},
    }
}