Add sanoid Ansible role for ZFS snapshots and replication

Replaces manually deployed config files with a fully idempotent role:
installs sanoid, templates sanoid.conf and syncoid service/timer from
variables, enables both systemd timers. Removes static proxmox/sanoid.*
files. README rebuild section updated accordingly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Adyrem
2026-05-16 04:22:05 +02:00
parent 18e05c2f88
commit 1cf6c81ac5
10 changed files with 128 additions and 51 deletions
-28
View File
@@ -1,28 +0,0 @@
# VM disks on SSD pool — snapshot daily/weekly
[rpool/data]
use_template = vms
recursive = yes
# Proxmox OS root — lighter schedule, mainly for recovery
[rpool/ROOT]
use_template = system
recursive = yes
#############################
[template_vms]
daily = 7
weekly = 4
monthly = 0
hourly = 0
frequently = 0
autosnap = yes
autoprune = yes
[template_system]
daily = 3
weekly = 2
monthly = 0
hourly = 0
frequently = 0
autosnap = yes
autoprune = yes
-8
View File
@@ -1,8 +0,0 @@
[Unit]
Description=Syncoid ZFS replication to HDD
After=zfs.target
[Service]
Type=oneshot
ExecStart=/usr/sbin/syncoid --recursive --no-privilege-elevation rpool/data hdd/backups/rpool-data
ExecStart=/usr/sbin/syncoid --no-privilege-elevation rpool/ROOT/pve-1 hdd/backups/pve-root
-11
View File
@@ -1,11 +0,0 @@
[Unit]
Description=Daily ZFS replication to HDD
After=sanoid.timer
[Timer]
OnCalendar=*-*-* 02:00:00
RandomizedDelaySec=10min
Persistent=true
[Install]
WantedBy=timers.target