summaryrefslogtreecommitdiff
path: root/roles/storage/zfs/syncoid/templates/systemd.service.j2
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2021-05-02 16:45:47 +0200
committerChristian Pointner <equinox@spreadspace.org>2021-05-02 16:45:47 +0200
commitfd1363eedadb183c439a00e143fd05ba8e10ad31 (patch)
tree8761cca63cdedcd5d0772bea48ac69262ca71f16 /roles/storage/zfs/syncoid/templates/systemd.service.j2
parentadapt backup sanoid template for ch-epimetheus only (diff)
add timer for syncoid backups
Diffstat (limited to 'roles/storage/zfs/syncoid/templates/systemd.service.j2')
-rw-r--r--roles/storage/zfs/syncoid/templates/systemd.service.j23
1 files changed, 3 insertions, 0 deletions
diff --git a/roles/storage/zfs/syncoid/templates/systemd.service.j2 b/roles/storage/zfs/syncoid/templates/systemd.service.j2
index ada34336..0d214595 100644
--- a/roles/storage/zfs/syncoid/templates/systemd.service.j2
+++ b/roles/storage/zfs/syncoid/templates/systemd.service.j2
@@ -6,6 +6,9 @@ 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 %}
+{% if 'periodic' in item.value %}
+TimeoutStartSec={{ item.value.periodic.timeout }}
+{% endif %}
PrivateTmp=yes
ProtectHome=yes
ProtectKernelTunables=yes