feat(restic): add restic backup role #133
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "restic"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds an opinionated backup solution for BTRFS volumes using
restic
with theresticprofile
tool.By default, this will create a daily backup of the configured target directories.
It ensures that they are consistent by using the native BTRFS snapshot functionality.
Every week, on sunday night, it will check the integrity and prune old
snapshots.
Metrics are also exposed through
resticprofile
in prom format andwritten to the
/backup/status/status.prom
file.This role also allows to configure ntfy notifications for errors.
To query the repository and run various commands manually, we also
install the
resticprofile
helper script, that can be run as root.Note: Backups cannot be done using the helper as the required mounts
are not included in the script.
We keep backups using the following retention strategy:
f872d3a8bc
to7df22837dc
7df22837dc
tof40c171319
f40c171319
to02961dfed0
02961dfed0
to6047aa6161
WIP: resticto feat(restic): add restic backup role6047aa6161
to2734f78c28
2734f78c28
to9f75a6d931
two suggestions, otherwise LGTM :)
@ -0,0 +1,33 @@
# restic_repository: "s3:s3.us-east-1.amazonaws.com/bucket_name"
# restic_repository_password:
restic_environment_vars:
Could we link to the relevant restic docs here?
https://restic.readthedocs.io/en/stable/040_backup.html#environment-variables
@ -0,0 +66,4 @@
- name: Reload systemd.
ansible.builtin.systemd:
daemon_reload: true
why not add this to the two tasks below?
Oh a bit micro optimization, didn't want to reload the daemon twice.
If you prefer, i can also put it back to both tasks
ah no that's fine, i was just wondering if there was a reason for it
9f75a6d931
toc9733621ea