mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-08-04 07:37:20 +02:00
Update to 2022-03-07 16:00
This commit is contained in:
15
roles/unmaintained/itop/templates/pre-backup.sh.j2
Normal file
15
roles/unmaintained/itop/templates/pre-backup.sh.j2
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eo pipefail
|
||||
|
||||
/usr/bin/mysqldump \
|
||||
{% if itop_db_server not in ['127.0.0.1','localhost'] %}
|
||||
--user={{ itop_db_user }} \
|
||||
--password={{ itop_db_pass | quote }} \
|
||||
--host={{ itop_db_server }} \
|
||||
{% if itop_db_port is defined %}
|
||||
--port={{ itop_db_port }} \
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
--quick --single-transaction \
|
||||
--add-drop-table {{ itop_db_name }} | zstd -c > {{ itop_root_dir }}/backup/{{ itop_db_name }}.sql.zst
|
Reference in New Issue
Block a user