2022-03-13 13:36:23 +00:00
|
|
|
#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]
|
2022-03-13 10:20:57 +00:00
|
|
|
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.
|
2022-03-13 10:20:57 +00:00
|
|
|
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
|