[Unit] Description=syncoid-based backup for {{ item.key }} [Service] RuntimeDirectory=syncoid-pull-{{ item.key }} Type=oneshot {% for path,config in item.value.paths.items() %} ExecStart=-/var/lib/syncoid/syncoid_pull "root@{{ item.value.ssh_hostname }}" "{{ path }}" "{{ zfs_syncoid_target_pool }}/{{ item.key }}/{{ path }}" --{% if 'periodic' not in item.value %} --create-bookmark{% endif %} --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 %}{{ '' }} {% endfor %} ExecStart=/var/lib/syncoid/syncoid_finalize{% if 'report_prometheus_textfile_path' in item.value %} "root@{{ item.value.ssh_hostname }}" "{{ item.value.report_prometheus_textfile_path }}" --{% if 'ssh_port' in item.value %} -p {{ item.value.ssh_port }}{% endif %}{% endif %}{{ '' }} {% if 'periodic' in item.value %} TimeoutStartSec={{ item.value.periodic.timeout }} {% endif %} PrivateTmp=yes ProtectHome=yes ProtectKernelTunables=yes ProtectControlGroups=yes RestrictRealtime=yes [Install] WantedBy=multi-user.target