Version information
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
Add this module to your Puppetfile:
mod 'thias-f3backup', '0.4.2'
Learn more about managing modules with a PuppetfileDocumentation
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 filesystembackup_command
(default=false): if true will run a specific command after all backups have finishedpriority
(default=10) Priority to perform the backup.rdiff_keep
(default=4W): time to keep the rdiff-backupsrdiff_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.
2025-01-25 - 0.4.2
- Python 3 compatible (#7, @osgpcq).
- Update default excludes.
- Exclude ACLs from backup, expected to be restored separately.
2018-12-12 - 0.4.0
- Cosmetic changes.
- Add missing file ownerships and modes.
- Replace backup_command and command_to_execute with single post_command.
- Fixes for future parser compatibility.
- Add cron_mailto parameter.
- Get main class (client) ensure absent to work.
- Update default excludes.
- Major rework (#4, @forgodssake).
2012-12-06 - 0.3.0
- Clean up the module.
- Make backup_home configurable.
- Add support for fact-base configuration to force backup server and hostname.
Copyright (C) 2012-2025 Matthias Saou Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.