Update to 2020-04-23 09:00

master
Daniel Berteaud 5 years ago
parent 4d757b64bc
commit f84a065354
  1. 2
      README.md
  2. 2
      roles/bitwarden_rs/templates/pre-backup.sh.j2
  3. 4
      roles/freepbx/templates/pre_backup.sh.j2
  4. 2
      roles/glpi/templates/dump_db.j2
  5. 2
      roles/mysql_server/templates/mariadb_create_dumps.sh.j2
  6. 2
      roles/postgresql_server/templates/postgresql_create_dumps.sh.j2
  7. 2
      roles/psono/templates/pre-backup.sh.j2
  8. 4
      roles/wordpress/templates/pre-backup.sh.j2
  9. 6
      roles/zabbix_server/templates/pre_backup.sh.j2

@ -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'

@ -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 %}

@ -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

@ -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

@ -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 %}

@ -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' %}

@ -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

@ -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 }}

@ -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 %}

Loading…
Cancel
Save