mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-10-07 15:05:01 +02:00
Update to 2021-12-01 19:13
This commit is contained in:
20
roles/freepbx/templates/pre_backup.sh.j2
Normal file
20
roles/freepbx/templates/pre_backup.sh.j2
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eo pipefail
|
||||
|
||||
/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 | quote }} \
|
||||
--host={{ fpbx_db_server }} \
|
||||
{% endif %}
|
||||
--add-drop-table {{ fpbx_db_name }} | zstd -T0 -c > {{ fpbx_root_dir }}/backup/{{ fpbx_db_name }}.sql.zst
|
||||
/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 | quote }} \
|
||||
--host={{ fpbx_db_server }} \
|
||||
{% endif %}
|
||||
--add-drop-table {{ fpbx_cdr_db_name }} | zstd -T0 -c > {{ fpbx_root_dir }}/backup/{{ fpbx_cdr_db_name }}.sql.zst
|
Reference in New Issue
Block a user