Puppet Class: vios_backup

Inherits:
vios_backup::params
Defined in:
manifests/init.pp

Summary

Configures remote backups of VIOS servers to the specified local disk repository.

Overview

Performs config backups of a list of VIOS servers via passwordless SSH. This is accomplished using the viosbr command on each machine.

Examples:

Daily backup of two VIOS with 14 days retention

class { 'vios_backup':
  user           => 'backup',
  group          => 'backup',
  base_directory => '/srv/backup/vios',
  days_retention => 14,
  target_vios    => [ 'vio0.example.com', 'vio1.example.com' ],
  cron_job       => {
    hour         => '0',
    minute       => '30',
  },
}

Parameters:

  • user (String) (defaults to: undef)

    Name of the local user who will own the backup files and run the scheduled cron job.

  • group (String) (defaults to: undef)

    Name of the local group which will be set on the backup directories.

  • base_directory (Stdlib::Absolutepath) (defaults to: undef)

    The root directory in which each vios backup will be stored. Note that this must be an absolute path!

  • days_retention (Integer) (defaults to: undef)

    Number of days to retain backups both on each VIOS and on the backup server. Any backups older than this will be automatically deleted when the job executes.

  • target_vios (Array[Stdlib::Fqdn]) (defaults to: undef)

    Array of DNS names of VIOS which should be backed up. Currently all VIOS are processed on the same schedule. Each entry specified here will generate a subdirectory in $base_directory containing the backup files.

  • cron_job (Hash[String, Variant[String, Integer, Array]]) (defaults to: undef)

    Specification of a cron resource that excludes the command and user. The backup will be scheduled at the frequency specified in this structure.



43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'manifests/init.pp', line 43

class vios_backup (
  String $user                                            = undef,
  String $group                                           = undef,
  Stdlib::Absolutepath $base_directory                    = undef,
  Integer $days_retention                                 = undef,
  Array[Stdlib::Fqdn] $target_vios                        = undef,
  Hash[String, Variant[String, Integer, Array]] $cron_job = undef,
) inherits vios_backup::params {
  # Both internal classes must be contained
  contain vios_backup::install
  contain vios_backup::config

  # Ensure the ordering makes sense
  Class['vios_backup::install']
  -> Class['vios_backup::config']
}