2021-04-29 14:58:12 +02:00
|
|
|
[Unit]
|
|
|
|
Description=Backup {{ item.name }} using restic
|
2022-08-28 01:17:41 +02:00
|
|
|
{% if item.lvm is defined %}
|
|
|
|
Conflicts=fstrim.service
|
|
|
|
After=fstrim.timer
|
|
|
|
{% endif %}
|
2021-04-29 14:58:12 +02:00
|
|
|
|
|
|
|
[Service]
|
|
|
|
Type=oneshot
|
2022-08-28 01:17:41 +02:00
|
|
|
{% if item.lvm is defined %}
|
|
|
|
PrivateMounts=on
|
|
|
|
{% endif %}
|
2024-01-04 18:52:05 +01:00
|
|
|
{% 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"
|