summaryrefslogtreecommitdiff
path: root/roles/storage/zfs/syncoid/templates
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2021-05-01 20:15:49 +0200
committerChristian Pointner <equinox@spreadspace.org>2021-05-01 20:15:49 +0200
commita64636bdedf842402016b29932862896dd6a6265 (patch)
tree89cdb48408761bdeb64899f1fce3cd41aafcf93b /roles/storage/zfs/syncoid/templates
parentch-epimetheus: rename zfs pool to backup (diff)
add experimental syncoid zfs backup role
Diffstat (limited to 'roles/storage/zfs/syncoid/templates')
-rw-r--r--roles/storage/zfs/syncoid/templates/systemd.service.j216
1 files changed, 16 insertions, 0 deletions
diff --git a/roles/storage/zfs/syncoid/templates/systemd.service.j2 b/roles/storage/zfs/syncoid/templates/systemd.service.j2
new file mode 100644
index 00000000..5a6eba97
--- /dev/null
+++ b/roles/storage/zfs/syncoid/templates/systemd.service.j2
@@ -0,0 +1,16 @@
+[Unit]
+Description=Schlagergarten Stream Stats Collector
+
+[Service]
+Type=oneshot
+{% for path,config in item.value.paths.items() %}
+ExecStart=/var/lib/syncoid/syncoid_wrapper --dumpsnaps --quiet {{ config.recursive | default(false) | ternary('-r ', '') }}{{ config.skip_parent | default(false) | ternary('--skip-parent ', '') }}{% for re in config.exclude | default([]) %}--exclude='{{ re }}' {% endfor %}{% if 'ssh_port' in item.value %}--sshport {{ item.value.ssh_port }} {% endif %}root@{{ item.value.ssh_hostname }}:{{ path }} {{ zfs_syncoid_target_pool }}/{{ item.key }}/{{ path }}
+{% endfor %}
+PrivateTmp=yes
+ProtectHome=yes
+ProtectKernelTunables=yes
+ProtectControlGroups=yes
+RestrictRealtime=yes
+
+[Install]
+WantedBy=multi-user.target