mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-08-07 00:57:00 +02:00
Update to 2021-12-01 19:13
This commit is contained in:
14
roles/wordpress/templates/pre-backup.sh.j2
Normal file
14
roles/wordpress/templates/pre-backup.sh.j2
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eo pipefail
|
||||
|
||||
/usr/bin/mysqldump \
|
||||
{% if not wp_db_server in ['localhost', '127.0.0.1'] %}
|
||||
--user={{ wp_db_user }} \
|
||||
--password={{ wp_db_pass | quote }} \
|
||||
--host={{ wp_db_server }} \
|
||||
--port={{ wp_db_port }} \
|
||||
{% endif %}
|
||||
--quick --single-transaction \
|
||||
--add-drop-table {{ wp_db_name }} | zstd -c > {{ wp_root_dir }}/backup/{{ wp_db_name }}.sql.zst
|
||||
|
Reference in New Issue
Block a user