restic
: Module to manage restic repositories via systemd service/timer.
restic::package
: Install restic packagesrestic::reload
: Reload systemd viasystemctl daemon-reload
restic::repository
: Configure a Restic service to backup/forget/restore data.restic::repository::post_command
: Define command(s) to be run after a restic commandrestic::repository::pre_command
: Define command(s) to be run before a restic command
restic::service
: Configure a restic service
Restic::Forget
: All valid forget parameterRestic::Path
: Valid path parameterRestic::Repositories
: A data hash with restic backup configurationRestic::Repository::Type
: All valid repository types
Module to manage restic repositories via systemd service/timer.
The following parameters are available in the restic
class:
package_ensure
package_manage
package_name
package_version
checksum
install_method
repositories
backup_flags
backup_path
backup_pre_cmd
backup_post_cmd
backup_timer
backup_exit3_success
binary
bucket
enable_backup
enable_forget
enable_restore
forget
forget_flags
forget_pre_cmd
forget_post_cmd
forget_timer
global_flags
group
host
id
init_repo
key
password
prune
restore_flags
restore_path
restore_pre_cmd
restore_post_cmd
restore_snapshot
restore_timer
type
user
Data type: String
Version for Restic to be installed
Default value: 'present'
Data type: Boolean
Enable Restic package management
Default value: true
Data type: String
Name for Restic package
Default value: 'restic'
Data type: Optional[String[1]]
Restic version when installing with the url
method.
Default value: undef
Data type: Optional[String[1]]
Checksum of the Restic archive. Only applicable when using install_method = 'url'
.
Default value: undef
Data type: Enum['package', 'url']
Install method to use.
Default value: 'package'
Data type: Restic::Repositories
Hash of repositoriries
Default value: {}
Data type: Variant[Array[String[1]],String[1]]
Default flags for restic backup <flags>
. See restic backup --help
Default value: []
Data type: Optional[Restic::Path]
Default directory to backed up
Default value: undef
Data type: Optional[Variant[Array[String[1]],String[1]]]
Default command to run before restic backup
Default value: undef
Data type: Optional[Variant[Array[String[1]],String[1]]]
Default command to run after restic backup
Default value: undef
Data type: Optional[String[1]]
Default systemd timer for backup see: https://wiki.archlinux.de/title/Systemd/Timers
Default value: undef
Data type: Boolean
Consider restic's exit code 3 as success. https://restic.readthedocs.io/en/latest/040_backup.html#exit-status-codes
Default value: false
Data type: Stdlib::Absolutepath
Default path to the Restic binary
Default value: '/usr/bin/restic'
Data type: Optional[String]
Default name for the Restic repository
Default value: undef
Data type: Boolean
Default enable the backup service
Default value: true
Data type: Boolean
Default enable the forget service
Default value: false
Data type: Boolean
Default enable the restore service
Default value: false
Data type: Restic::Forget
Default hash with keep-*
=> value
to configure forget flags
Default value: {}
Data type: Variant[Array[String[1]],String[1]]
Default flags for restic forget <flags>
. See restic forget --help
Default value: []
Data type: Optional[Variant[Array[String[1]],String[1]]]
Default command to run before restic forget
Default value: undef
Data type: Optional[Variant[Array[String[1]],String[1]]]
Default command to run after restic forget
Default value: undef
Data type: Optional[String[1]]
Default systemd timer for forget see: https://wiki.archlinux.de/title/Systemd/Timers
Default value: undef
Data type: Variant[Array[String[1]],String[1]]
Default global flags for restic <flags>
. See restic --help
Default value: []
Data type: String
Default group for systemd services
Default value: 'root'
Data type: Optional[Variant[Sensitive[String],String]]
Default hostname for the Restic repository
Default value: undef
Data type: Optional[Variant[Sensitive[String],String]]
Default S3 storage id for an S3 bucket
Default value: undef
Data type: Boolean
Default enable the initialization of the repository
Default value: true
Data type: Optional[Variant[Sensitive[String],String]]
Default S3 storage key for an S3 bucket
Default value: undef
Data type: Optional[Variant[Sensitive[String],String]]
Default encryption password for the Restic repository
Default value: undef
Data type: Boolean
Default enable --prune
flag for restic forget
Default value: false
Data type: Variant[Array[String[1]],String[1]]
Default flags for restic restore <flags>
. See restic restore --help
Default value: []
Data type: Optional[Stdlib::Absolutepath]
Default directory used to restore a backup
Default value: undef
Data type: Optional[Variant[Array[String[1]],String[1]]]
command to run before execute restore
Default command to run before restic restore
Default value: undef
Data type: Optional[Variant[Array[String[1]],String[1]]]
command to run after execute restore
Default command to run after restic restore
Default value: undef
Data type: String[1]
Default Restic snapshot id used by the restore
Default value: 'latest'
Data type: Optional[String[1]]
Default systemd timer for restore see: https://wiki.archlinux.de/title/Systemd/Timers
Default value: undef
Data type: Restic::Repository::Type
Default name for the Restic repository. Only S3 supported
Default value: 's3'
Data type: String[1]
Default user for systemd services
Default value: 'root'
Configure a Restic service to backup/forget/restore data.
The following parameters are available in the restic::repository
defined type:
backup_flags
backup_path
backup_pre_cmd
backup_post_cmd
backup_timer
backup_exit3_success
binary
bucket
enable_backup
enable_forget
enable_restore
forget
forget_flags
forget_pre_cmd
forget_post_cmd
forget_timer
global_flags
group
host
id
init_repo
key
password
prune
restore_flags
restore_path
restore_pre_cmd
restore_post_cmd
restore_snapshot
restore_timer
type
user
Data type: Optional[Variant[Array[String[1]],String[1]]]
Default flags for restic backup <flags>
. See restic backup --help
Default value: undef
Data type: Optional[Restic::Path]
Default directory to backed up
Default value: undef
Data type: Optional[Variant[Array[String[1]],String[1]]]
Default command to run before restic backup
Default value: undef
Data type: Optional[Variant[Array[String[1]],String[1]]]
Default command to run after restic backup
Default value: undef
Data type: Optional[String[1]]
Default systemd timer for backup see: https://wiki.archlinux.de/title/Systemd/Timers
Default value: undef
Data type: Optional[Boolean]
Consider restic's exit code 3 as success. https://restic.readthedocs.io/en/latest/040_backup.html#exit-status-codes
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
Default path to the Restic binary
Default value: undef
Data type: Optional[String]
Default name for the Restic repository
Default value: undef
Data type: Optional[Boolean]
Default enable the backup service
Default value: undef
Data type: Optional[Boolean]
Default enable the forget service
Default value: undef
Data type: Optional[Boolean]
Default enable the restore service
Default value: undef
Data type: Optional[Restic::Forget]
Default hash with keep-*
=> value
to configure forget flags
Default value: undef
Data type: Optional[Variant[Array[String[1]],String[1]]]
Default flags for restic forget <flags>
. See restic forget --help
Default value: undef
Data type: Optional[Variant[Array[String[1]],String[1]]]
Default command to run before restic forget
Default value: undef
Data type: Optional[Variant[Array[String[1]],String[1]]]
Default command to run after restic forget
Default value: undef
Data type: Optional[String[1]]
Default systemd timer for forget see: https://wiki.archlinux.de/title/Systemd/Timers
Default value: undef
Data type: Optional[Variant[Array[String[1]],String[1]]]
Default global flags for restic <flags>
. See restic --help
Default value: undef
Data type: Optional[String]
Default group for systemd services
Default value: undef
Data type: Optional[Variant[Sensitive[String],String]]
Default hostname for the Restic repository
Default value: undef
Data type: Optional[Variant[Sensitive[String],String]]
Default S3 storage id for an S3 bucket
Default value: undef
Data type: Optional[Boolean]
Default enable the initialization of the repository
Default value: undef
Data type: Optional[Variant[Sensitive[String],String]]
Default S3 storage key for an S3 bucket
Default value: undef
Data type: Optional[Variant[Sensitive[String],String]]
Default encryption password for the Restic repository
Default value: undef
Data type: Optional[Boolean]
Default enable --prune
flag for restic forget
Default value: undef
Data type: Optional[Variant[Array[String[1]],String[1]]]
Default flags for restic restore <flags>
. See restic restore --help
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
Default directory used to restore a backup
Default value: undef
Data type: Optional[Variant[Array[String[1]],String[1]]]
command to run before execute restore
Default command to run before restic restore
Default value: undef
Data type: Optional[Variant[Array[String[1]],String[1]]]
command to run after execute restore
Default command to run after restic restore
Default value: undef
Data type: Optional[String[1]]
Default Restic snapshot id used by the restore
Default value: undef
Data type: Optional[String[1]]
Default systemd timer for restore see: https://wiki.archlinux.de/title/Systemd/Timers
Default value: undef
Data type: Optional[Restic::Repository::Type]
Default name for the Restic repository. Only S3 supported
Default value: undef
Data type: Optional[String[1]]
Default user for systemd services
Default value: undef
Define command(s) to be run after a restic command
restic::repository::pre_command { 'mysql':
command => 'rm -rf /opt/xtrabackup',
}
The following parameters are available in the restic::repository::post_command
defined type:
Data type: Variant[Array[String[1]],String[1]]
Command to run.
Data type: String[1]
restic::repository title where this command should be add to.
Default value: $title
Data type: Enum['backup', 'forget', 'restore']
After which restic command this command should be run.
Default value: 'backup'
Data type: Boolean
If an error of this commands should be allowed.
Default value: false
Data type: Integer[26]
Order of Commands. Helpful if you have multiple.
Default value: 26
Define command(s) to be run before a restic command
restic::repository::pre_command { 'mysql':
command => 'xtrabackup --backup --target-dir=/opt/xtrabackup',
}
The following parameters are available in the restic::repository::pre_command
defined type:
Data type: Variant[Array[String[1]],String[1]]
Command to run.
Data type: String[1]
restic::repository title where this command should be add to.
Default value: $title
Data type: Enum['backup', 'forget', 'restore']
Before which restic command this command should be run.
Default value: 'backup'
Data type: Boolean
If an error of this commands should be allowed.
Default value: false
Data type: Integer[11,24]
Order of Commands. Helpful if you have multiple.
Default value: 11
All valid forget parameter
Alias of Hash[Enum['keep-last','keep-hourly','keep-daily','keep-weekly','keep-monthly','keep-yearly','keep-within','keep-within-hourly','keep-within-daily','keep-within-weekly','keep-within-monthly','keep-within-yearly','keep-tag'], Variant[Integer[1],String[1]]]
Valid path parameter
Alias of Variant[Stdlib::Absolutepath, Array[Stdlib::Absolutepath]]
A data hash with restic backup configuration
Alias of
Hash[String[1], Struct[
{
backup_exit3_success => Optional[Boolean],
backup_flags => Optional[Variant[Array[String[1]],String[1]]],
backup_path => Optional[Restic::Path],
backup_post_cmd => Optional[Variant[Array[String[1]],String[1]]],
backup_pre_cmd => Optional[Variant[Array[String[1]],String[1]]],
backup_timer => Optional[String[1]],
binary => Optional[Stdlib::Absolutepath],
bucket => Optional[String],
enable_backup => Optional[Boolean],
enable_forget => Optional[Boolean],
enable_restore => Optional[Boolean],
forget => Optional[Restic::Forget],
forget_flags => Optional[Variant[Array[String[1]],String[1]]],
forget_post_cmd => Optional[Variant[Array[String[1]],String[1]]],
forget_pre_cmd => Optional[Variant[Array[String[1]],String[1]]],
forget_timer => Optional[String[1]],
global_flags => Optional[Variant[Array[String[1]],String[1]]],
group => Optional[String],
host => Optional[Variant[Sensitive[String],String]],
id => Optional[Variant[Sensitive[String],String]],
init_repo => Optional[Boolean],
key => Optional[Variant[Sensitive[String],String]],
password => Optional[Variant[Sensitive[String],String]],
prune => Optional[Boolean],
restore_flags => Optional[Variant[Array[String[1]],String[1]]],
restore_path => Optional[Stdlib::Absolutepath],
restore_post_cmd => Optional[Variant[Array[String[1]],String[1]]],
restore_pre_cmd => Optional[Variant[Array[String[1]],String[1]]],
restore_snapshot => Optional[String[1]],
restore_timer => Optional[String[1]],
type => Optional[Restic::Repository::Type],
user => Optional[String[1]],
}
]]
All valid repository types
Alias of Enum['rest', 's3']