Ansible roles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
686 B

#!/bin/bash -e
/usr/bin/mysqldump \
--quick --single-transaction \
{% if fpbx_db_server not in ['127.0.0.1', 'localhost'] %}
--user={{ fpbx_db_user }} \
--password='{{ fpbx_db_pass }}' \
--host={{ fpbx_db_server }} \
{% endif %}
--add-drop-table {{ fpbx_db_name }} | zstd -T0 -c > {{ fpbx_root_dir }}/backup/{{ fpbx_db_name }}.sql.zstd
/usr/bin/mysqldump \
--quick --single-transaction \
{% if fpbx_db_server not in ['127.0.0.1', 'localhost'] %}
--user={{ fpbx_db_user }} \
--password='{{ fpbx_db_pass }}' \
--host={{ fpbx_db_server }} \
{% endif %}
--add-drop-table {{ fpbx_cdr_db_name }} | zstd -T0 -c > {{ fpbx_root_dir }}/backup/{{ fpbx_cdr_db_name }}.sql.zstd