diff options
author | Christian Pointner <equinox@spreadspace.org> | 2022-01-11 00:04:35 +0100 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2022-01-11 00:04:35 +0100 |
commit | 5f3230aad459d06cfd257616564bddc4cd9ad7cc (patch) | |
tree | 62987e7d565077a7a8aee4f7460bb1b4789d9158 /roles/storage/zfs/syncoid/templates/pull.service.j2 | |
parent | disable syncoid for some testvms (diff) |
zfs/syncoid: add error handling to pull
Diffstat (limited to 'roles/storage/zfs/syncoid/templates/pull.service.j2')
-rw-r--r-- | roles/storage/zfs/syncoid/templates/pull.service.j2 | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/roles/storage/zfs/syncoid/templates/pull.service.j2 b/roles/storage/zfs/syncoid/templates/pull.service.j2 index 955161aa..cf8f61ae 100644 --- a/roles/storage/zfs/syncoid/templates/pull.service.j2 +++ b/roles/storage/zfs/syncoid/templates/pull.service.j2 @@ -2,13 +2,12 @@ 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_wrapper{% 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 %}root@{{ item.value.ssh_hostname }}:{{ path }} {{ zfs_syncoid_target_pool }}/{{ item.key }}/{{ path }} +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 %} -{% if zfs_syncoid_autosuspend %} -ExecStart=/var/lib/syncoid/syncoid_post -{% endif %} +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 %} |