Forge Home

f3backup

F3 (Fr3nd) Backup Module.

59 downloads

59 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.4.2 (latest)
released Jan 27th 2025
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, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >=4.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 'thias-f3backup', '0.4.2'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add thias-f3backup
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install thias-f3backup --version 0.4.2

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
Tags: backup

Documentation

thias/f3backup — version 0.4.2 Jan 27th 2025

F3 Backup

Overview

Simple filesystem-level backup solution based on rdiff-backup over ssh.

Examples

Server example:

# The main backup server
class { 'f3backup::server': }

More complex example:

class { '::f3backup::server':
  backup_home               => '/srv/backup',
  rdiff_global_exclude_file => '/etc/f3backup-exclude.txt, /srv/backup/f3backup/%server%/exclude.txt',
  cron_mailto               => 'jdoe@example.com',
  ssh_config_hosts          => {
    'server1.example.com' => [
      'Port 1234',
    ],
  },
}

Client examples from hieradata:

Enable full filesystem backup, typically enabled for all nodes:

classes:
  - '::f3backup'

Disable backup for a node, required on the backup server as rdiff-backup thinks it's already running, and it doesn't make much sense anyway:

f3backup::ensure: 'absent'

Lower retention period to 1 week:

f3backup::rdiff_keep: '1W'

Force backups over IPv4:

f3backup::server::ssh_config:
  - 'AddressFamily inet'

Client examples from Puppet manifests:

f3backup::exclude { '/var/lib/mysql/**': }

SSH keys are automatically exported on the server(s) and realized on client nodes.

Testing / Forcing

To test or force a backup run for a specific node, on the server:

# su - backup
$ f3backup -r node1.example.com -vvv /etc/f3backup.ini

Parameters

Configurable options:

  • backup_home (default='/backup') Base folder to put the f3backup folder containing all backups.
  • backup_server (default='default') Backup server that should perform backups on this client.
  • myname (default=$::fqdn) Name of the server, by default it's full qualified domain name.
  • ensure (default=present) Ensure backup is present or absent.
  • backup_rdiff (default=true): if true will run an rdiff-backup for the full filesystem
  • backup_command (default=false): if true will run a specific command after all backups have finished
  • priority (default=10) Priority to perform the backup.
  • rdiff_keep (default=4W): time to keep the rdiff-backups
  • rdiff_global_exclude_file (default=""): array with the directories to be excluded. Each specified directory will be added to the local exclude file. The format should be the same as in rdiff-backup.
  • rdiff_user (default='backup') User to use when performing the rdiff backups.
  • rdiff_path (default='/') Base path for the rdiff backup.
  • rdiff_extra_parameters (default=""): extra parameters to be passed to rdiff-backup.
  • post_command (default=undef) Command to execute after performing the backup.