backuppc

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

treydock.github.io/puppet-backuppc/

Limitations

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