From adcc06ae33261cadf7f8bf72264df18c4125650a Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Tue, 23 Nov 2021 16:00:07 +0100 Subject: [PATCH] Update to 2021-11-23 16:00 --- roles/elasticsearch/templates/post-backup.j2 | 6 +----- roles/mysql_server/templates/pre-backup.j2 | 3 +++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/roles/elasticsearch/templates/post-backup.j2 b/roles/elasticsearch/templates/post-backup.j2 index 59afb96..cc1bbfa 100644 --- a/roles/elasticsearch/templates/post-backup.j2 +++ b/roles/elasticsearch/templates/post-backup.j2 @@ -1,9 +1,5 @@ #!/bin/bash -e -{% if es_backup_dir != '' and es_backup_dir != '/' %} -rm -rf {{ es_backup_dir }}/* -{% else %} -# Can't delete elasticsearch dumps, set es_backup_dir to a non empty path -{% endif %} +curl -X DELETE http://localhost:{{ es_port }}/_snapshot/lbkp/lbkp umount /home/lbkp/es fstrim -a -v diff --git a/roles/mysql_server/templates/pre-backup.j2 b/roles/mysql_server/templates/pre-backup.j2 index 1444879..8f4adce 100644 --- a/roles/mysql_server/templates/pre-backup.j2 +++ b/roles/mysql_server/templates/pre-backup.j2 @@ -11,6 +11,9 @@ DEST=/home/lbkp/mysql for DB in $(/usr/bin/mysqlshow | /bin/awk '{print $2}' | /bin/grep -v Databases) do + if [[ "$DB" == "information_schema" ]]; then + continue + fi {% for db in mysql_skip_backup %} # {{ db }} is configured not to be backed up if [[ "$DB" == "{{ db }}" ]]; then