ansible_role_restic/templates
Martin Kennedy ae270aeebd [v2] feat: lvm: Add lvm-based backup functionality
This commit implements the needs of #75[^1]: it allows for the
creation of atomic backups when the backup target is a file/dir whose
fs rests on LVM. This ensures the snapshot will be atomic.

By using a mount namespace, the LVM snapshot can be done in the same
directory -- so existing LVM-based applications of ansible_role_restic
can be migrated to this implementation without any discontinuity in
what appears to be backed up.

This combination of LVM's snapshotting layer and mount namespaces
comes with some caveats:

- you cannot backup / due to namespace issues
- subdirs with a separate fs won't be correctly detected
- not all filesystems are happy about LVM snapshots -- btrfs, e.g.
- LVM snapshots come with a performance penalty when active
- fstrim and LVM snapshots don't like each other whatsoever

[^1]: https://github.com/roles-ansible/ansible_role_restic/issues/75

--
Changes in v2:
- Use `findmnt -v` to find snapshot when cleaning up
- Check for _snap before `lvremove -y`

Signed-off-by: Martin Kennedy <hurricos@gmail.com>
2022-08-28 16:12:46 -04:00
..
restic.service.j2 [v2] feat: lvm: Add lvm-based backup functionality 2022-08-28 16:12:46 -04:00
restic.timer.j2 change ansible to use FQCN and lowercase restic_systemd_timer_default_OnCalendar 2022-04-01 11:07:52 +02:00
restic_access_Linux.j2 Added support for Backblaze B2 (#18) 2020-09-08 10:17:46 +02:00
restic_script_Linux.j2 [v2] feat: lvm: Add lvm-based backup functionality 2022-08-28 16:12:46 -04:00