Update to 2021-11-23 16:00

master
Daniel Berteaud 3 years ago
parent 4a464d9013
commit adcc06ae33
  1. 6
      roles/elasticsearch/templates/post-backup.j2
  2. 3
      roles/mysql_server/templates/pre-backup.j2

@ -1,9 +1,5 @@
#!/bin/bash -e #!/bin/bash -e
{% if es_backup_dir != '' and es_backup_dir != '/' %} curl -X DELETE http://localhost:{{ es_port }}/_snapshot/lbkp/lbkp
rm -rf {{ es_backup_dir }}/*
{% else %}
# Can't delete elasticsearch dumps, set es_backup_dir to a non empty path
{% endif %}
umount /home/lbkp/es umount /home/lbkp/es
fstrim -a -v fstrim -a -v

@ -11,6 +11,9 @@ DEST=/home/lbkp/mysql
for DB in $(/usr/bin/mysqlshow | /bin/awk '{print $2}' | /bin/grep -v Databases) for DB in $(/usr/bin/mysqlshow | /bin/awk '{print $2}' | /bin/grep -v Databases)
do do
if [[ "$DB" == "information_schema" ]]; then
continue
fi
{% for db in mysql_skip_backup %} {% for db in mysql_skip_backup %}
# {{ db }} is configured not to be backed up # {{ db }} is configured not to be backed up
if [[ "$DB" == "{{ db }}" ]]; then if [[ "$DB" == "{{ db }}" ]]; then

Loading…
Cancel
Save