borg
: Main class, includes all other classes.
borg::config
borg::install
: This class handles the installation. Avoid modifying private classes.borg::service
Main class, includes all other classes.
The following parameters are available in the borg
class:
package_name
create_prometheus_metrics
use_upstream_reporter
update_borg_restore_db_after_backuprun
manage_prune
keep_yearly
keep_monthly
keep_weekly
keep_daily
keep_within
compression
working_directory
source_paths
excludes
includes
backupserver
install_restore_script
restore_script_path
backupdestdir
backupdatadir
absolutebackupdestdir
manage_repository
exclude_pattern
additional_exclude_pattern
restore_dependencies
package_ensure
additional_excludes
additional_includes
username
ssh_port
borg_restore_version
install_fatpacked_cpanm
proxy_type
proxy_server
manage_package
ssh_key_type
backuptime
ssh_proxyjump
wants
requires
after
pre_backup_script
post_backup_script
restore_package
upload_ratelimit
Data type: Variant[String[1],Array[String[1]]]
Name of the borg package
Data type: Boolean
Enable a postrun command to create prometheus compatible metrics about all backups
Default value: true
Data type: Boolean
Enable to upstream reporter (see create_prometheus_metrics param) or our vendored version
Default value: false
Data type: Boolean
Enable the restore helper from Florian 'Bluewind' Pritz (https://metacpan.org/release/App-BorgRestore) as another postrun command (see also the install_restore_script parameter)
Default value: true
Data type: Boolean
Enable management of backup prunes. If this is set to false
all keep_*
parameters are ignored.
Default value: true
Data type: Integer[0]
For how many years should we keep our backups?
Default value: 3
Data type: Integer[0]
For how many months should we keep our backups?
Default value: 24
Data type: Integer[0]
For how many weeks should we keep our backups?
Default value: 36
Data type: Integer[0]
For how many days should we keep our backups?
Default value: 60
Data type: Integer[0]
For how many days should we keep all backups we have?
Default value: 30
Data type: String[1]
Compression method and level to use. See the output of borg help compression
for available options.
Default value: 'lz4'
Data type: Stdlib::Absolutepath
The working directory from where the backup should be created.
Default value: '/'
Data type: Array[String[1]]
A list of relative or absolute paths to backup.
Default value: ['/']
Data type: Array[Stdlib::Absolutepath]
list of default mountpoints that should be excluded from backups. Every mountpoint needs to be explicitly excluded or included. See also the additional_excludes parameter.
Default value: ['/tmp', '/sys', '/dev', '/proc', '/run', '/media', '/var/lib/nfs/rpc_pipefs']
Data type: Array[Stdlib::Absolutepath]
list of default mountpoints that should be included from backups. Every mountpoint needs to be explicitly excluded or included. See also the additional_includes parameter.
Default value: ['/', '/boot', '/boot/efi', '/boot/EFI', '/var/log']
Data type: String[1]
FQDN for the remote server. Will be written into the local ssh client configuration file.
Data type: Boolean
Install the restore helper via cpanm.
Data type: Stdlib::Absolutepath
The path to the restore helper.
Data type: String[1]
The path on the remote server where the backups should be written to. $username will be prepended
Default value: 'borg'
Data type: Stdlib::Absolutepath
The path where additional backup data should be stored.
Default value: '/root/backup-data/'
Data type: Optional[String[1]]
By defaults, backups will be written on the remote host to $username/$backupdestdir. if $absolutebackupdestdir is set this will be used instead
Default value: undef
Data type: Boolean
A Boolean that enables/disables repository management. Only true on Ubuntu 16.04 at the moment
Data type: Array[String[1]]
We currently support excludes/includes for mountpoints. borg supports also a list of shell glob/regex pattern to filter for files.
Default value: ['sh:/home/*/.cache/*', 'sh:/root/.cache/*', 'sh:/var/cache/pacman/pkg/*']
Data type: Array[String[1]]
Another array of patterns to extend the modules built-in list (exclude_pattern
parameter).
Default value: []
Data type: Array[String[1]]
A list of dependencies for the restore helper.
Default value: []
Data type: String[1]
Ensure state for the borg package.
Default value: present
Data type: Array[Stdlib::Absolutepath]
Another array of mountpoints to extend the modules built-in list (excludes
parameter).
Default value: []
Data type: Array[Stdlib::Absolutepath]
Another array of mountpoints to extend to modules built-in list (includes
parameter).
Default value: []
Data type: String[1]
The ssh username to connect to the remote borg service.
Default value: $facts['networking']['hostname']
Data type: Stdlib::Port
SSH port for the remote server (default: 22). Will be written into the local ssh client configuration file.
Default value: 22
Data type: Pattern[/^\d*\.\d*\.\d*$/]
Version for the perl script App::BorgRestore. change this version and the module will upgrade/downgrade it
Default value: '3.4.5'
Data type: Boolean
cpanm is required on systems where we want to have App::BorgRestore. Legacy systems ship a too old cpanm version. For those operating systems we can install the upstream version.
Data type: Optional[Enum['none', 'ftp','http','https']]
configue a network proxy type for the archive resources in this module. You also need to set proxy_server
if you need a proxy.
Default value: undef
Data type: Optional[String[1]]
Configurea network proxy for the archive resources in this module. By default no proxy will be used
Default value: undef
Data type: Boolean
Enable/Disable management of the actual borg package. People on legacy OS or isolated environments can disable this and manage the binary in their profile.
Default value: true
Data type: Enum['rsa', 'ed25519']
configure your most favourite ssh key type. This will be used to connect to the remote borg server.
Default value: 'ed25519'
Data type: Hash[String[1],String[1]]
Configure the name of each backupjob and the time of that job.
Default value: { 'default' => '18:30:00' }
Data type: Optional[String[1]]
Configure possible bastionhosts for the connection.
Default value: undef
Data type: Array[String[1]]
Array of units where the borg-backup service should depend on
Default value: ['network-online.target']
Data type: Array[String[1]]
Array of units which the borg-backup service should require
Default value: []
Data type: Array[String[1]]
Array of units that should be started before the borg-backup service
Default value: ['network-online.target']
Data type: Optional[String[1]]
BASH code to be executed before the backup job starts. If you wish to use snapshots, create them here.
Default value: undef
Data type: Optional[String[1]]
BASH code to be executed after the backup job has finished. If you need to perform any cleanup do so here.
Default value: undef
Data type: Optional[String[1]]
Optional package name for the perl based script
Default value: undef
Data type: Integer[0]
Upload ratelimit in kiByte/s. Default: 0=unlimited
Default value: 0