|
|
@ -8,7 +8,7 @@ mkdir -p /home/lbkp/zabbix |
|
|
|
--port={{ zabbix_server_db_port }} \ |
|
|
|
--port={{ zabbix_server_db_port }} \ |
|
|
|
--no-data \ |
|
|
|
--no-data \ |
|
|
|
--quick --single-transaction \ |
|
|
|
--quick --single-transaction \ |
|
|
|
--add-drop-table {{ zabbix_server_db_name | quote }} | zstd -T0 -c > /home/lbkp/zabbix/{{ zabbix_server_db_name }}_schema.sql.zstd |
|
|
|
--add-drop-table {{ zabbix_server_db_name | quote }} | zstd -T0 -c > /home/lbkp/zabbix/{{ zabbix_server_db_name }}_schema.sql.zst |
|
|
|
|
|
|
|
|
|
|
|
# Then, backup data |
|
|
|
# Then, backup data |
|
|
|
{% if zabbix_server_backup_on_full_only %} |
|
|
|
{% if zabbix_server_backup_on_full_only %} |
|
|
@ -20,7 +20,7 @@ if [[ "$1" == "full" ]]; then |
|
|
|
--no-create-info \ |
|
|
|
--no-create-info \ |
|
|
|
--quick --single-transaction \ |
|
|
|
--quick --single-transaction \ |
|
|
|
--add-locks \ |
|
|
|
--add-locks \ |
|
|
|
{{ zabbix_server_db_name | quote }} | zstd -T0 -c > /home/lbkp/zabbix/{{ zabbix_server_db_name }}_data.sql.zstd |
|
|
|
{{ zabbix_server_db_name | quote }} | zstd -T0 -c > /home/lbkp/zabbix/{{ zabbix_server_db_name }}_data.sql.zst |
|
|
|
else |
|
|
|
else |
|
|
|
{% endif %} |
|
|
|
{% endif %} |
|
|
|
/usr/bin/mysqldump --user={{ zabbix_server_db_user | quote }} \ |
|
|
|
/usr/bin/mysqldump --user={{ zabbix_server_db_user | quote }} \ |
|
|
@ -33,7 +33,7 @@ else |
|
|
|
{% endfor %} |
|
|
|
{% endfor %} |
|
|
|
--quick --single-transaction \ |
|
|
|
--quick --single-transaction \ |
|
|
|
--add-locks \ |
|
|
|
--add-locks \ |
|
|
|
{{ zabbix_server_db_name | quote }} | zstd -T0 -c > /home/lbkp/zabbix/{{ zabbix_server_db_name }}_data.sql.zstd |
|
|
|
{{ zabbix_server_db_name | quote }} | zstd -T0 -c > /home/lbkp/zabbix/{{ zabbix_server_db_name }}_data.sql.zst |
|
|
|
{% if zabbix_server_backup_on_full_only %} |
|
|
|
{% if zabbix_server_backup_on_full_only %} |
|
|
|
fi |
|
|
|
fi |
|
|
|
{% endif %} |
|
|
|
{% endif %} |
|
|
|