Skip to content

Latest commit

 

History

History
441 lines (262 loc) · 9.7 KB

REFERENCE.md

File metadata and controls

441 lines (262 loc) · 9.7 KB

Reference

Table of Contents

Classes

Public Classes

  • restic: Module to manage restic repositories via systemd service/timer.

Private Classes

  • restic::package: Install restic packages
  • restic::reload: Reload systemd via systemctl daemon-reload

Defined types

Public Defined types

Private Defined types

  • restic::repository: Configure a Restic service to backup/forget/restore data.
  • restic::service: Configure a restic service

Data types

Classes

restic

Module to manage restic repositories via systemd service/timer.

Parameters

The following parameters are available in the restic class:

package_ensure

Data type: String

Version for Restic to be installed

Default value: 'present'

package_manage

Data type: Boolean

Enable Restic package management

Default value: true

package_name

Data type: String

Name for Restic package

Default value: 'restic'

repositories

Data type: Restic::Repositories

Hash of repositoriries

Default value: {}

backup_flags

Data type: Variant[Array[String[1]],String[1]]

Default flags for restic backup <flags>. See restic backup --help

Default value: []

backup_path

Data type: Optional[Restic::Path]

Default directory to backed up

Default value: undef

backup_pre_cmd

Data type: Optional[String[1]]

Default command to run before restic backup

Default value: undef

backup_post_cmd

Data type: Optional[String[1]]

Default command to run after restic backup

Default value: undef

backup_timer

Data type: Optional[String[1]]

Default systemd timer for backup see: https://wiki.archlinux.de/title/Systemd/Timers

Default value: undef

binary

Data type: Stdlib::Absolutepath

Default path to the Restic binary

Default value: '/usr/bin/restic'

bucket

Data type: Optional[String]

Default name for the Restic repository

Default value: undef

enable_backup

Data type: Boolean

Default enable the backup service

Default value: false

enable_forget

Data type: Boolean

Default enable the forget service

Default value: false

enable_restore

Data type: Boolean

Default enable the restore service

Default value: false

forget

Data type: Restic::Forget

Default hash with keep-* => value to configure forget flags

Default value: {}

forget_flags

Data type: Variant[Array[String[1]],String[1]]

Default flags for restic forget <flags>. See restic forget --help

Default value: []

forget_pre_cmd

Data type: Optional[String[1]]

Default command to run before restic forget

Default value: undef

forget_post_cmd

Data type: Optional[String[1]]

Default command to run after restic forget

Default value: undef

forget_timer

Data type: Optional[String[1]]

Default systemd timer for forget see: https://wiki.archlinux.de/title/Systemd/Timers

Default value: undef

global_flags

Data type: Variant[Array[String[1]],String[1]]

Default global flags for restic <flags>. See restic --help

Default value: []

group

Data type: String

Default group for systemd services

Default value: 'root'

host

Data type: Optional[String]

Default hostname for the Restic repository

Default value: undef

id

Data type: Optional[String]

Default S3 storage id for an S3 bucket

Default value: undef

init_repo

Data type: Boolean

Default enable the initialization of the repository

Default value: true

key

Data type: Optional[String]

Default S3 storage key for an S3 bucket

Default value: undef

password

Data type: Optional[String]

Default encryption password for the Restic repository

Default value: undef

prune

Data type: Boolean

Default enable --prune flag for restic forget

Default value: false

restore_flags

Data type: Variant[Array[String[1]],String[1]]

Default flags for restic restore <flags>. See restic restore --help

Default value: []

restore_path

Data type: Optional[Stdlib::Absolutepath]

Default directory used to restore a backup

Default value: undef

restore_pre_cmd

Data type: Optional[String[1]]

command to run before execute restore Default command to run before restic restore

Default value: undef

restore_post_cmd

Data type: Optional[String[1]]

command to run after execute restore Default command to run after restic restore

Default value: undef

restore_snapshot

Data type: String[1]

Default Restic snapshot id used by the restore

Default value: 'latest'

restore_timer

Data type: Optional[String[1]]

Default systemd timer for restore see: https://wiki.archlinux.de/title/Systemd/Timers

Default value: undef

type

Data type: Restic::Repository::Type

Default name for the Restic repository. Only S3 supported

Default value: 's3'

user

Data type: String[1]

Default user for systemd services

Default value: 'root'

Defined types

Data types

Restic::Forget

All valid forget parameter

Alias of

Hash[Enum['keep-last','keep-hourly','keep-daily','keep-weekly','keep-monthly','keep-yearly','keep-within','keep-tag'], Integer[1]]

Restic::Path

Valid path parameter

Alias of

Variant[Stdlib::Absolutepath, Array[Stdlib::Absolutepath]]

Restic::Repositories

A data hash with restic backup configuration

Alias of

Hash[String[1], Struct[
    {
      backup_flags     => Optional[Variant[Array[String[1]],String[1]]],
      backup_path      => Optional[Restic::Path],
      backup_post_cmd  => Optional[String[1]],
      backup_pre_cmd   => Optional[String[1]],
      backup_timer     => Optional[String[1]],
      binary           => Optional[Stdlib::Absolutepath],
      bucket           => Optional[String[1]],
      check            => Optional[Boolean],
      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[String[1]],
      forget_pre_cmd   => Optional[String[1]],
      forget_timer     => Optional[String[1]],
      global_flags     => Optional[Variant[Array[String[1]],String[1]]],
      group            => Optional[String[1]],
      host             => Optional[String[1]],
      id               => Optional[String[1]],
      init_repo        => Optional[Boolean],
      key              => Optional[String[1]],
      password         => Optional[String[1]],
      prune            => Optional[Boolean],
      restore_flags    => Optional[Variant[Array[String[1]],String[1]]],
      restore_path     => Optional[Stdlib::Absolutepath],
      restore_post_cmd => Optional[String[1]],
      restore_pre_cmd  => Optional[String[1]],
      restore_snapshot => Optional[String[1]],
      restore_timer    => Optional[String[1]],
      type             => Optional[Restic::Repository::Type],
      user             => Optional[String[1]],
    }
  ]]

Restic::Repository::Type

All valid repository types

Alias of

Enum['s3']