- Overview
- Module Description - What the module does and why it is useful
- Setup - The basics of getting started with puppet-restic
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
This module manages Restic backups via Puppet.
This module provides multiple Puppet classes that can be used to manage Restic repositories and backups.
- Installs the Restic package using the system package manager.
- Creates a new user/group to own backup repositories.
- Creates SystemD services and timers to automatically backup specified data on a set schedule.
This module uses the system package manager to install Restic. If your package manager doesn't have a Restic package then this probably won't work.
To get started, simply include the restic class as follows:
include ::resticYou then need to define a base repository to backup to. You can do this in Puppet code or via Hiera:
restic::repositories:
'/mnt/backup':
ensure: present
password: 'mysuperpassword'Now you can periodically backup to that repository with the following Hiera:
restic::backups:
'home':
path: '/home'
repository: '/mnt/backup'
password: "%{lookup('restic::repositories.\"/mnt/backup\".password')}"
timer: '*-*-* 06:00:00'This will backup the /home folder everyday at 6AM.
restic: The main class used to install the module and manage resources.restic::install: Installs Restic using the package manager and creates the required user and group.
restic::backup: Controls backing up data to arestic::repository.restic::repository: Creates a new Restic repository to store backed-up files.
This module has only been tested on Debian 9 and 10.
If you'd like to contribute, please see CONTRIBUTING.