Forge Home

pe_backup

Module to manage minimalistic Puppet Enterprise backups

7,426 downloads

104 latest version

4.7 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

  • 2.0.0 (latest)
  • 1.0.2
  • 1.0.1
  • 1.0.0
released Apr 26th 2024
This version is compatible with:
  • Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x
  • Puppet >= 7.0.0 < 9.0.0
  • , , , , , ,

Start using this module

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

Add this module to your Puppetfile:

mod 'fvoges-pe_backup', '2.0.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add fvoges-pe_backup
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install fvoges-pe_backup --version 2.0.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

fvoges/pe_backup — version 2.0.0 Apr 26th 2024

Puppet pe_backup Module

Build status

Table of Contents

  1. Overview
  2. Module Description
  3. Setup
  4. Usage
  5. Reference
  6. Limitations
  7. Development

Overview

pe_backup is a wrapper around Puppet's puppet backup command, using a script that also backs up the keys not included in the built-in backups.

This module also configures a cron job to run the backup script every day at a specified time.

It can also encrypt backups using GPG. This is highly recommended for production environments.

Module Description

The module manages two resources, a backup script and a cron job to run the script.

This release doesn't include a restore script. To do a restore, just follow the instructions from the documentation. Make sure that you also restore the keys.

Setup

What pe_backup affects

Using the default settings, pe_backup will install a backup script /usr/local/bin/pe_backup.sh and add a cron job to run that script every day at 3:33am.

Beginning with pe_backup

The module should work without changing any of the default parameters and only requires specifying the destination for the backup using the destination parameter.

NOTE: the module expects the destination directory to exist. It will not try to create it. It's better to manage that from a profile instead of trying to work out all the possible cases inside this module.

Usage

Getting started

The basic use case requires passing the destination directory to the pe_backup class:

class { 'pe_backup':
  destination => '/vol/backups/pe_backups',
}

The first time that that code is applied to a node, it will create the backup script /urs/local/bin/pe_backup.sh and a cron job for the root user to run it every day at 3:33am.

The backups will be stored in the location specified with the destination parameter using the naming pe_backup-YYYY-MM-DD_HH.MM_Z.tar.bz2. Where pe_backup is the default prefix and YYYY-MM-DD_HH.MM_Z is the current time stamp at the time the script was executed.

Reference

See REFERENCE.md for the full reference.

Limitations

  • This release doesn't include a restore script. To do a restore, just follow the instructions from the documentation.
    • Make sure that you also restore the keys
  • No ability to set the backup retention policy. The script will remove backups older than 14 days
  • The script doesn't check to see if another backup is in progress
  • It can only accept a single GPG key

Development

Feel free to send bug reports and pull requests to the project page.