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
resticwith theresticprofiletool.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
resticprofilein prom format andwritten to the
/backup/status/status.promfile.This role also allows to configure ntfy notifications for errors.
To query the repository and run various commands manually, we also
install the
resticprofilehelper 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:
f872d3a8bc7df22837dc7df22837dcf40c171319f40c17131902961dfed002961dfed06047aa6161WIP: resticto feat(restic): add restic backup role6047aa61612734f78c282734f78c289f75a6d931two 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: truewhy 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
9f75a6d931c9733621ea