#!/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.zstd mount -o bind,ro {{ wp_root_dir }}/backup/ /home/lbkp/wordpress_{{ wp_id }}