Ansible_workstation/roles/borgmatic/templates/service.j2

15 lines
563 B
Plaintext
Raw Permalink Normal View History

#jinja2: lstrip_blocks: "True", trim_blocks: "True"
2022-03-09 09:46:21 +00:00
{{ ansible_managed | comment }}
2022-03-08 13:42:14 +00:00
[Unit]
Description=borgmatic {{ borgmatic_name }}backup
2022-03-08 13:42:14 +00:00
Wants=network-online.target
After=network-online.target
[Service]
Type=oneshot
# Delay start to prevent backups running during boot. Note that systemd-inhibit requires dbus and
# dbus-user-session to be installed.
ExecStart=/usr/bin/systemd-inhibit --who="borgmatic {{ borgmatic_name }}" --why="Prevent interrupting scheduled backup" /usr/bin/borgmatic -c {{ borgmatic_config_file }} --verbosity -1 --syslog-verbosity 1