restic : restart on-failure
parent
f3d51c3469
commit
1c7c69592a
|
@ -3,9 +3,15 @@
|
|||
[Unit]
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
StartLimitBurst=3
|
||||
StartLimitInterval=24h
|
||||
|
||||
[Service]
|
||||
Restart=on-failure
|
||||
RestartSec=30
|
||||
|
||||
EnvironmentFile=/etc/restic/{{ item.0 }}.env
|
||||
ExecStartPre=restic unlock
|
||||
ExecStart=restic backup --files-from=/etc/restic/{{ item.0 }}-includes --exclude-file=/etc/restic/{{ item.0 }}-excludes{{ restic.config[item.0].backup_extra_param | default("") }}
|
||||
ExecStartPost=restic forget --prune{% for freq, n in restic.config[item.0].retention %} {{ freq }} {{ n }}{% endfor %}
|
||||
|
||||
|
|
Loading…
Reference in New Issue