Skip to content
Snippets Groups Projects
Commit 31606028 authored by jurgenhaas's avatar jurgenhaas
Browse files

Prevent reboot while backup is running

parent 5f2aa731
No related branches found
No related tags found
No related merge requests found
......@@ -56,7 +56,7 @@
minute: 0
cron_file: borgmatic
user: root
job: /usr/local/bin/borgmatic -v 1 create prune >> /var/log/borg.log 2>&1 && {{ lookup('healthchecks', '', user='root', jobname='borgmatic', schedule=['0',borgbackup_cron_hour|default('4'),'*','*','*']|join(' '), duration=borgbackup_cron_duration|default(7200)) }}
job: systemd-inhibit --why="Backup is running" --who="Borg" /usr/local/bin/borgmatic -v 1 create prune >> /var/log/borg.log 2>&1 && {{ lookup('healthchecks', '', user='root', jobname='borgmatic', schedule=['0',borgbackup_cron_hour|default('4'),'*','*','*']|join(' '), duration=borgbackup_cron_duration|default(7200)) }}
tags:
- cron
......@@ -68,7 +68,7 @@
minute: 30
cron_file: borgmatic
user: root
job: /usr/local/bin/borgmatic -v 1 check > /var/log/borg-check.log 2>&1 && {{ lookup('healthchecks', '', user='root', jobname='borgmatic-check', schedule=['30','23','1','*','*']|join(' '), duration=7200) }}
job: systemd-inhibit --why="Backup Check is running" --who="Borg Check" /usr/local/bin/borgmatic -v 1 check > /var/log/borg-check.log 2>&1 && {{ lookup('healthchecks', '', user='root', jobname='borgmatic-check', schedule=['30','23','1','*','*']|join(' '), duration=7200) }}
tags:
- cron
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment