Puppet Class: pgprobackup

Inherited by:
pgprobackup::instance
Defined in:
manifests/init.pp

Summary

Manages PostgreSQL backups using pg_probackup

Overview

Examples:

include pgprobackup

Parameters:

  • package_ensure (String) (defaults to: 'present')

    Ensure package installation

  • package_name (String)

    Base package name, e.g. ‘pg_probackup`, `pg_probackup-std`, `pg_probackup-ent`

  • host_group (String) (defaults to: 'common')

    Allows grouping DB servers, each host_group should have just one backup catalog.

  • db_name (String) (defaults to: 'backup')

    Database created on DB instance

  • db_user (String) (defaults to: 'backup')

    PostgreSQL role used for connecting to DB instance/replication.

  • debug_symbols (Boolean) (defaults to: true)

    Whether to install package with debugging symbols

  • debug_suffix (Optional[String])

    Suffix for debug package

  • backup_dir (Stdlib::AbsolutePath) (defaults to: '/var/lib/pgbackup')

    Path to backup catalog (physical backups storage)

  • manage_ssh_keys (Boolean) (defaults to: true)

    When enabled public SSH key from backup catalog user will be added as authorized key on DB instance

  • manage_host_keys (Boolean) (defaults to: true)

    Adds host’s ssh fingerprint to known hosts (required to negotiate ssh connection)

  • manage_pgpass (Boolean) (defaults to: true)

    When true, configures password for database authentication (for backup role).

  • manage_hba (Boolean) (defaults to: true)

    When enabled, create rule for connection from backup catalog server to DB instance.

  • backup_user (String) (defaults to: 'pgbackup')
  • log_dir (Optional[Stdlib::AbsolutePath]) (defaults to: undef)
  • manage_cron (Boolean) (defaults to: true)
  • host_key_type (String) (defaults to: 'ecdsa-sha2-nistp256')


30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'manifests/init.pp', line 30

class pgprobackup(
  String                         $package_name,
  String                         $package_ensure   = 'present',
  String                         $host_group       = 'common',
  String                         $db_name          = 'backup',
  String                         $db_user          = 'backup',
  Boolean                        $debug_symbols    = true,
  Optional[String]               $debug_suffix,
  Stdlib::AbsolutePath           $backup_dir       = '/var/lib/pgbackup',
  String                         $backup_user      = 'pgbackup',
  Optional[Stdlib::AbsolutePath] $log_dir          = undef,
  Boolean                        $manage_ssh_keys  = true,
  Boolean                        $manage_host_keys = true,
  Boolean                        $manage_pgpass    = true,
  Boolean                        $manage_hba       = true,
  Boolean                        $manage_cron      = true,
  String                         $host_key_type    = 'ecdsa-sha2-nistp256',
) {

  contain pgprobackup::repo

}