Puppet Class: backup

Defined in:
manifests/init.pp

Summary

Configure backup tools

Overview

Parameters:

  • frequency (String) (defaults to: '86400')

    defines how often to run restic

  • bootdelay (String) (defaults to: '600')

    defines how long to wait after boot for first run



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
# File 'manifests/init.pp', line 6

class backup (
  String $frequency = '86400',
  String $bootdelay = '600',
) {
  package { ['restic', 'rclone']: }

  file { '/etc/systemd/system/restic@.service':
    ensure => file,
    source => 'puppet:///modules/backup/restic@.service',
  }

  file { '/etc/systemd/system/restic@.timer':
    ensure  => file,
    content => template('backup/restic@.timer.erb'),
  }

  file { '/etc/systemd/system/prune-restic@.service':
    ensure => absent,
  }

  file { '/etc/systemd/system/prune-restic@.timer':
    ensure  => absent,
  }

  file { ['/etc/restic', '/etc/restic/environment/', '/etc/restic/rclone', '/var/lib/restic']:
    ensure => directory,
    mode   => '0700',
  }
}