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:
11
roles/glpi/templates/pre_backup.j2
Normal file
11
roles/glpi/templates/pre_backup.j2
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eo pipefail
|
||||
|
||||
/usr/bin/mysqldump --user={{ glpi_mysql_user | quote }} \
|
||||
--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 }}/backup/{{ glpi_mysql_db }}.sql.zst
|
||||
|
||||
[ -e {{ glpi_root_dir }}/web/config/glpicrypt.key ] && cp {{ glpi_root_dir }}/web/config/glpicrypt.key {{ glpi_root_dir }}/backup/
|
Reference in New Issue
Block a user