ansible_role_restic/templates/restic.service.j2

20 lines
478 B
Text
Raw Normal View History

2021-04-29 14:58:12 +02:00
[Unit]
Description=Backup {{ item.name }} using restic
{% if item.lvm is defined %}
Conflicts=fstrim.service
After=fstrim.timer
{% endif %}
2021-04-29 14:58:12 +02:00
[Service]
Type=oneshot
{% if item.lvm is defined %}
PrivateMounts=on
{% endif %}
{% if item.niceness is defined %}
ExecStart=/usr/bin/nice -n {{ item.niceness }} {{ restic_script_dir }}/backup-{{ item.name }}.sh
{% else %}
ExecStart={{ restic_script_dir }}/backup-{{ item.name }}.sh
{% endif %}
2021-12-07 17:47:51 +01:00
TimeoutStartSec=0
2021-04-29 14:58:12 +02:00
Environment="CRON=true"