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

#3 Add healthcheck to docker app crontabs

parent 43c05ded
No related branches found
No related tags found
No related merge requests found
......@@ -47,8 +47,8 @@
- name: Crontabs
copy:
content: |
55 */6 * * * PATH=$PATH:/usr/bin /usr/bin/borgmatic --stats -v 0 2>&1
30 23 1 * * PATH=$PATH:/usr/bin /usr/local/bin/borgmatic --check -v 0 2>&1
55 */6 * * * PATH=$PATH:/usr/bin /usr/bin/borgmatic --stats -v 0 2>&1 && {{ lookup('healthchecks', '', user='root', jobname=['Backup', application, application_id]|join(' '), schedule='55 */6 * * *', disabled=crons_disabled|default(false)) }}
30 23 1 * * PATH=$PATH:/usr/bin /usr/local/bin/borgmatic --check -v 0 2>&1 && {{ lookup('healthchecks', '', user='root', jobname=['Check Backup', application, application_id]|join(' '), schedule='30 23 1 * *', disabled=crons_disabled|default(false)) }}
dest: '{{ application_root }}/borgconfig/crontab.txt'
owner: root
group: root
......
......@@ -30,7 +30,6 @@ consistency:
- repository
- archives
hooks:
{% if application_id is defined %}
mysql_databases:
- name: '{{ application_id }}'
hostname: db
......@@ -38,7 +37,6 @@ hooks:
username: '{{ application_id }}'
password: '{{ application_id }}'
options: '--skip-comments'
{% endif %}
before_backup:
- echo "`date` - Starting backup"
after_backup:
......
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