Forge Home

backuppc

Module to manage BackupPC 4

430 downloads

193 latest version

5.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.1 (latest)
  • 0.1.0
released Mar 8th 2023
This version is compatible with:
  • Puppet Enterprise 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, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x
  • Puppet >= 6.0.0 < 8.0.0
  • , , , , ,

Start using this module

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

Add this module to your Puppetfile:

mod 'treydock-backuppc', '0.1.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add treydock-backuppc
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install treydock-backuppc --version 0.1.1

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

treydock/backuppc — version 0.1.1 Mar 8th 2023

backuppc

Puppet Forge CI Status

Table of Contents

  1. Overview
  2. Usage - Configuration options and additional functionality
  3. Limitations - OS compatibility, etc.

Overview

Manage BackupPC 4 server and clients.

This module uses PuppetDB exported resources to allow a BackupPC client to define its own client configuration that is then collected by the BackupPC server.

This module does not support BackupPC 3.x for the server class

Usage

BackupPC Server

It's sufficient to just include the backuppc::server class.

include backuppc::server

Below are some examples for Hiera to setup BackupPC to be served directly via a FQDN or alias:

backuppc::server::server_host: "%{facts.networking.fqdn}"
backuppc::server::cgi_url: "https://%{lookup('backuppc::server::server_host')}"

Example of creating an Apache VirtualHost for BackupPC

include backuppc::server

apache::vhost { $backuppc::server::server_host:
  servername     => $backuppc::server::server_host,
  port           => '443',
  ssl            => true,
  manage_docroot => false,
  ssl_cert       => "/etc/letsencrypt/live/${backuppc::server::server_host}/cert.pem",
  ssl_key        => "/etc/letsencrypt/live/${backuppc::server::server_host}/privkey.pem",
  ssl_chain      => "/etc/letsencrypt/live/${backuppc::server::server_host}/chain.pem",
  aliases        => [
    {
      'alias'       => $backuppc::server::cgi_image_dir_url,
      'path'        => $backuppc::server::cgi_image_dir,
    },
    {
      'scriptalias' => '/',
      'path'        => "${backuppc::server::cgi_dir}/BackupPC_Admin",
    },
  ],
  directories    => [
    {
      'provider'      => 'location',
      'path'          => '/',
      'auth_type      => 'ldap',
      'auth_ldap_url' => 'CHANGEME',
      ...more auth items...
      'require'       => 'valid-user',
    }
  ]
}

BackupPC Client

For backup clients you must have PuppetDB to handle exported resources. Include the backuppc::client class:

include backuppc::client

Below is an example of setting baseline backups that could be added to common.yaml in Hiera

lookup_options:
  backuppc::client::rsync_share_name:
    merge: unique

backuppc::client::ensure: present
backuppc::client::config_name: "%{facts.networking.hostname}"
backuppc::client::client_name_alias: "%{facts.networking.fqdn}"
backuppc::client::backuppc_hostname: backuppc.example.com
backuppc::client::rsync_share_name:
  - /etc
  - /root

Reference

http://treydock.github.io/puppet-backuppc/

Limitations

The server class is only supported on EL8 (via EPEL), Debian 11 or Ubuntu 22.04