homeserver/roles/mgrote.restic/templates/restic.service.j2
mg 16ebb0324e systemd: restic (#332)
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Reviewed-on: mg/ansible#332
Co-authored-by: mg <michael.grote@posteo.de>
Co-committed-by: mg <michael.grote@posteo.de>
2022-02-21 16:42:22 +01:00

14 lines
431 B
Django/Jinja

{{ file_header | default () }}
[Unit]
Description=Backup with restic
Requires=media-restic.mount
After=media-restic.mount
OnFailure=restic_mail.service
[Service]
Type=simple
EnvironmentFile={{ restic_conf_dir }}/restic.env
ExecStart=/usr/bin/restic backup --no-cache --exclude-file {{ restic_conf_dir }}/excludes {{ restic_folders_to_backup }}
User={{ restic_user }}
Group={{ restic_group }}
RestartSec={{ restic_failure_delay }}