Puppet Class: holland::mongodump

Defined in:
manifests/mongodump.pp

Summary

Manage the mongodump provider for the Holland Backup Manager

Overview

Manage the [mongodump](docs.hollandbackup.org/docs/provider_configs/mongodump.html) provider for the [Holland Backup Manager](hollandbackup.org/)

Note: This does not install the actual ‘mongodump` command since there are several different options for doing so. Especially with software collections.

Examples:

Basic

include holland::mongodump

Parameters:

  • ensure (Enum['absent', 'present']) (defaults to: present)

    Should the plugin be installed or not.

  • additional_options (Optional[String]) (defaults to: undef)

    Any additional options to the ‘mongodump` command-line utility these should show up exactly as they are on the command line. e.g.: `’–gzip’‘

  • after_backup_command (Optional[String]) (defaults to: undef)

    Command to run after successful backup.

  • authentication_database (String) (defaults to: '')

    The database the mongo user needs to authenticate against.

  • before_backup_command (Optional[String]) (defaults to: undef)

    Run a shell command before a backup starts.

  • compression_level (Integer[0]) (defaults to: 1)

    What compression level to use. Lower numbers mean faster compression, though also generally a worse compression ratio. Generally, levels 1-3 are considered fairly fast and still offer good compression for textual data. Levels above 7 can often cause a larger impact on the system due to needing much more CPU resources. Setting the level to 0 effectively disables compresion.

  • compression_method (Enum[ 'gzip', 'gzip-rsyncable', 'bzip2', 'pbzip2', 'lzop' ]) (defaults to: 'gzip')

    Which compression method to use. Note that lzop is not often installed by default on many Linux distributions and may need to be installed separately.

  • failed_backup_command (Optional[String]) (defaults to: undef)

    Command to run after failed backup.

  • host (String) (defaults to: 'localhost')

    Hostname for mongodump to connect with.

  • password (String) (defaults to: '')

    Password for mongodump to authenticate with.

  • username (String) (defaults to: '')

    Username for mongodump to authenticate with.



52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# File 'manifests/mongodump.pp', line 52

class holland::mongodump (
  Enum['absent', 'present'] $ensure                  = present,
  Optional[String]          $additional_options      = undef,
  Optional[String]          $after_backup_command    = undef,
  String                    $authentication_database = '',
  Optional[String]          $before_backup_command   = undef,
  Integer[0]                $compression_level       = 1,
  Enum[
    'gzip',
    'gzip-rsyncable',
    'bzip2',
    'pbzip2',
    'lzop'
  ]                         $compression_method      = 'gzip',
  Optional[String]          $failed_backup_command   = undef,
  String                    $host                    = 'localhost',
  String                    $password                = '',
  String                    $username                = '',
){
  contain ::holland::mongodump::install
  contain ::holland::mongodump::config

  if $ensure == 'present' {
    Class['holland::mongodump::install'] -> Class['holland::mongodump::config']
  } else {
    Class['holland::mongodump::config'] -> Class['holland::mongodump::install']
  }
}