diff --git a/README.md b/README.md index d659ee8..796f874 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,7 @@ zabbix_agent_servers: "{{ zabbix_ip }}" zabbix_proxy_encryption: psk zabbix_proxy_server: 'zabbix.example.com' ``` -* group_vars/fws/vars.yml : variables here will be inherited by hosts in the **fws** group + * group_vars/fws/vars.yml : variables here will be inherited by hosts in the **fws** group ``` sshd_src_ip: "{{ trusted_ip }}" postfix_relay_host: '[smtp.example.com]:587' diff --git a/roles/bitwarden_rs/templates/pre-backup.sh.j2 b/roles/bitwarden_rs/templates/pre-backup.sh.j2 index 95fa847..f145133 100644 --- a/roles/bitwarden_rs/templates/pre-backup.sh.j2 +++ b/roles/bitwarden_rs/templates/pre-backup.sh.j2 @@ -10,7 +10,7 @@ cp {{ bitwarden_root_dir }}/data/rsa* {{ bitwarden_root_dir }}/backup/ --host='{{ bitwarden_db_server }}' \ {% endif %} --quick --single-transaction \ - --add-drop-table {{ bitwarden_db_name }} | zstd -T0 -c > {{ bitwarden_root_dir }}/backup/{{ bitwarden_db_name }}.sql.zstd + --add-drop-table {{ bitwarden_db_name }} | zstd -T0 -c > {{ bitwarden_root_dir }}/backup/{{ bitwarden_db_name }}.sql.zst {% else %} sqlite3 {{ bitwarden_root_dir }}/data/db.sqlite3 ".backup '{{ bitwarden_root_dir }}/backup/db.sqlite3'" {% endif %} diff --git a/roles/freepbx/templates/pre_backup.sh.j2 b/roles/freepbx/templates/pre_backup.sh.j2 index 69af611..ec7f850 100644 --- a/roles/freepbx/templates/pre_backup.sh.j2 +++ b/roles/freepbx/templates/pre_backup.sh.j2 @@ -7,7 +7,7 @@ --password='{{ fpbx_db_pass }}' \ --host={{ fpbx_db_server }} \ {% endif %} - --add-drop-table {{ fpbx_db_name }} | zstd -T0 -c > {{ fpbx_root_dir }}/backup/{{ fpbx_db_name }}.sql.zstd + --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'] %} @@ -15,4 +15,4 @@ --password='{{ fpbx_db_pass }}' \ --host={{ fpbx_db_server }} \ {% endif %} - --add-drop-table {{ fpbx_cdr_db_name }} | zstd -T0 -c > {{ fpbx_root_dir }}/backup/{{ fpbx_cdr_db_name }}.sql.zstd + --add-drop-table {{ fpbx_cdr_db_name }} | zstd -T0 -c > {{ fpbx_root_dir }}/backup/{{ fpbx_cdr_db_name }}.sql.zst diff --git a/roles/glpi/templates/dump_db.j2 b/roles/glpi/templates/dump_db.j2 index eeba83e..95ddcdb 100644 --- a/roles/glpi/templates/dump_db.j2 +++ b/roles/glpi/templates/dump_db.j2 @@ -4,4 +4,4 @@ --password={{ glpi_mysql_pass | quote }} \ --host={{ glpi_mysql_server | quote }} \ --quick --single-transaction \ - --add-drop-table {{ glpi_mysql_db | quote }} | zstd -T0 -c > {{ glpi_root_dir }}/db_dumps/{{ glpi_mysql_db }}.sql.zstd + --add-drop-table {{ glpi_mysql_db | quote }} | zstd -T0 -c > {{ glpi_root_dir }}/db_dumps/{{ glpi_mysql_db }}.sql.zst diff --git a/roles/mysql_server/templates/mariadb_create_dumps.sh.j2 b/roles/mysql_server/templates/mariadb_create_dumps.sh.j2 index 9f99741..d261305 100644 --- a/roles/mysql_server/templates/mariadb_create_dumps.sh.j2 +++ b/roles/mysql_server/templates/mariadb_create_dumps.sh.j2 @@ -29,7 +29,7 @@ do {% elif mysql_compress_cmd is search('lz4') %} {% set compext = 'lz4' %} {% elif mysql_compress_cmd is search('zstd') %} -{% set compext = 'zstd' %} +{% set compext = 'zst' %} {% else %} {% set compext = 'z' %} {% endif %} diff --git a/roles/postgresql_server/templates/postgresql_create_dumps.sh.j2 b/roles/postgresql_server/templates/postgresql_create_dumps.sh.j2 index 6afeb79..5558818 100644 --- a/roles/postgresql_server/templates/postgresql_create_dumps.sh.j2 +++ b/roles/postgresql_server/templates/postgresql_create_dumps.sh.j2 @@ -28,7 +28,7 @@ do {% set comp_ext = 'lzo' %} {% elif pg_compress_cmd is search('lz4') %} {% set comp_ext = 'lz4' %} -{% elif pg_compress_cmd is search('zstd') %} +{% elif pg_compress_cmd is search('zst') %} {% set comp_ext = 'zstd' %} {% else %} {% set comp_ext = 'z' %} diff --git a/roles/psono/templates/pre-backup.sh.j2 b/roles/psono/templates/pre-backup.sh.j2 index bb354a9..7dd0291 100644 --- a/roles/psono/templates/pre-backup.sh.j2 +++ b/roles/psono/templates/pre-backup.sh.j2 @@ -5,4 +5,4 @@ PGPASSWORD='{{ psono_db_pass }}' /usr/pgsql-11/bin/pg_dump \ --username={{ psono_db_user }} \ --host={{ psono_db_server }} \ {{ psono_db_name }} | \ - zstd -T0 -c > {{ psono_root_dir }}/backup/{{ psono_db_name }}.sql.zstd + zstd -T0 -c > {{ psono_root_dir }}/backup/{{ psono_db_name }}.sql.zst diff --git a/roles/wordpress/templates/pre-backup.sh.j2 b/roles/wordpress/templates/pre-backup.sh.j2 index 4e167a9..b6e4cd4 100644 --- a/roles/wordpress/templates/pre-backup.sh.j2 +++ b/roles/wordpress/templates/pre-backup.sh.j2 @@ -10,6 +10,6 @@ mkdir -p /home/lbkp/wordpress_{{ wp_id }} --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 + --add-drop-table '{{ wp_db_name }}' | zstd -T0 > {{ wp_root_dir }}/backup/{{ wp_db_name }}.sql.zst -mount -o bind,ro {{ wp_root_dir }}/backup/ /home/lbkp/wordpress_{{ wp_id }} +mountpoint -q /home/lbkp/wordpress_{{ wp_id }}/ || mount -o bind,ro {{ wp_root_dir }}/backup/ /home/lbkp/wordpress_{{ wp_id }} diff --git a/roles/zabbix_server/templates/pre_backup.sh.j2 b/roles/zabbix_server/templates/pre_backup.sh.j2 index 09a86ef..a684367 100644 --- a/roles/zabbix_server/templates/pre_backup.sh.j2 +++ b/roles/zabbix_server/templates/pre_backup.sh.j2 @@ -8,7 +8,7 @@ mkdir -p /home/lbkp/zabbix --port={{ zabbix_server_db_port }} \ --no-data \ --quick --single-transaction \ - --add-drop-table {{ zabbix_server_db_name | quote }} | zstd -T0 -c > /home/lbkp/zabbix/{{ zabbix_server_db_name }}_schema.sql.zstd + --add-drop-table {{ zabbix_server_db_name | quote }} | zstd -T0 -c > /home/lbkp/zabbix/{{ zabbix_server_db_name }}_schema.sql.zst # Then, backup data {% if zabbix_server_backup_on_full_only %} @@ -20,7 +20,7 @@ if [[ "$1" == "full" ]]; then --no-create-info \ --quick --single-transaction \ --add-locks \ - {{ zabbix_server_db_name | quote }} | zstd -T0 -c > /home/lbkp/zabbix/{{ zabbix_server_db_name }}_data.sql.zstd + {{ zabbix_server_db_name | quote }} | zstd -T0 -c > /home/lbkp/zabbix/{{ zabbix_server_db_name }}_data.sql.zst else {% endif %} /usr/bin/mysqldump --user={{ zabbix_server_db_user | quote }} \ @@ -33,7 +33,7 @@ else {% endfor %} --quick --single-transaction \ --add-locks \ - {{ zabbix_server_db_name | quote }} | zstd -T0 -c > /home/lbkp/zabbix/{{ zabbix_server_db_name }}_data.sql.zstd + {{ zabbix_server_db_name | quote }} | zstd -T0 -c > /home/lbkp/zabbix/{{ zabbix_server_db_name }}_data.sql.zst {% if zabbix_server_backup_on_full_only %} fi {% endif %}