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.
 
 
 
 
 
 

15 lines
561 B

#!/bin/bash -e
mkdir -p /home/lbkp/wordpress_{{ wp_id }}
/usr/bin/mysqldump \
{% if wp_db_server != 'localhost' and wp_db_server != '127.0.0.1' %}
--user='{{ wp_db_user }}' \
--password='{{ wp_db_pass }}' \
--host='{{ wp_db_server }}' \
--port='{{ wp_db_port }}' \
{% endif %}
--quick --single-transaction \
--add-drop-table '{{ wp_db_name }}' | zstd -T0 > {{ wp_root_dir }}/backup/{{ wp_db_name }}.sql.zst
mountpoint -q /home/lbkp/wordpress_{{ wp_id }}/ || mount -o bind,ro {{ wp_root_dir }}/backup/ /home/lbkp/wordpress_{{ wp_id }}