Update to 2020-12-14 19:00

master
Daniel Berteaud 4 years ago
parent e83c6510b4
commit 19ee03f655
  1. 3
      roles/zabbix_server/defaults/main.yml
  2. 4
      roles/zabbix_server/templates/post_backup.sh.j2
  3. 4
      roles/zabbix_server/templates/pre_backup.sh.j2

@ -56,6 +56,9 @@ zabbix_server_auth_http: False
# pre-backup full
zabbix_server_backup_on_full_only: False
# Disable zabbix pre/post backup if you need to handle it with your own script
zabbix_server_backup_hooks: True
# You might want to ignore system proxy for Zabbix server itself,
# so its web monitoring can be direct
# This will only have an effect if system_proxy is defined

@ -1,3 +1,7 @@
#!/bin/bash -e
{% if zabbix_server_backup_hooks %}
rm -f /home/lbkp/zabbix/*
{% else %}
# pre and post backup hooks are disabled on this host
{% endif %}

@ -1,5 +1,6 @@
#!/bin/bash -e
{% if zabbix_server_backup_hooks %}
mkdir -p /home/lbkp/zabbix
# First, backup the schema
/usr/bin/mysqldump --user={{ zabbix_server_db_user | quote }} \
@ -39,3 +40,6 @@ else
{% if zabbix_server_backup_on_full_only %}
fi
{% endif %}
{% else %}
# pre and post backup hooks are disabled on this host
{% endif %}

Loading…
Cancel
Save