Forge Home

bs_backup

A puppet module which manage file backup, most useful when your config files are managed by inifile or augeas and so on.

9,006 downloads

9,006 latest version

3.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.1.0 (latest)
released Mar 23rd 2015
This version is compatible with:
  • Puppet Enterprise >= 3.0.0
  • Puppet >= 3.0.0
  • , , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'greatboy-bs_backup', '0.1.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add greatboy-bs_backup
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install greatboy-bs_backup --version 0.1.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

greatboy/bs_backup — version 0.1.0 Mar 23rd 2015

Backup Your config file

About

This module will help you backup config files which managed by inifile or augeas and so on.

Usage

For example, In config.pp:

class <module_name>::config {
  file_line { 'add-limits':
    path => '/etc/pam.d/login',
    line => 'session    required     pam_limits.so',
    after => '-session   optional     pam_ck_connector.so',
    multiple => false,
  }
}

Then, In you backup.pp

class <module_name>::backup {
  bs_backup { '/etc/pam.d/login':
    config_class => '<module_name>::config',
  }
}

In your init.pp

class <module_name> {
  contain <module_name>::install
  contain <module_name>::config
  contain <module_name>::service
  include <module_name>::backup
}

Now, File['/etc/pam.d/login'] will backup automaticly.