diff --git a/zzz_evobackup b/zzz_evobackup index 5cbfc97..09ec4ea 100755 --- a/zzz_evobackup +++ b/zzz_evobackup @@ -123,24 +123,11 @@ mkdir -p -m 700 /home/backup ## ElasticSearch : example with rsync (warning: don't forget to use NFS if you have a cluster) # DATE=$(date +%F) -## Disable ES translog flush -# curl -s -XPUT 'localhost:9200/_settings' -d '{"index.translog.disable_flush": true}' >/dev/null -## Flushes translog and check if snapshot has not already been made today -# curl -s 'localhost:9200/_flush' | grep -qe '"ok":true' && -# curl -s -XDELETE "localhost:9200/_snapshot/snaprepo/snapshot_${DATE}" | grep -qv 404 -## If it succeed, do a snapshot and remove old ones -# if [ $? -eq 0 ]; then -# curl -s -XPUT "localhost:9200/_snapshot/snaprepo/snapshot_${DATE}?wait_for_completion=true" -o /tmp/es_snapshot_${DATE}.log -# cd /home/backup-elasticsearch/snaprepo -# for i in $(curl -s -XGET "localhost:9200/_snapshot/snaprepo/_all?pretty=true" | grep '^ *"snapshot" : "snapshot_.*",$' | cut -d_ -f2 | sed 's/",$//' | head -n-10); do -# curl -s -XDELETE "localhost:9200/_snapshot/snaprepo/snapshot_${i}" -# done -# cd - -# else -# echo "Error when flushing ES translog indexes." -# fi -## In any case re-enable translog flush -# curl -s -XPUT 'localhost:9200/_settings' -d '{"index.translog.disable_flush": false}' > /dev/null +## If it succeed, do a snapshot and remove old ones +# curl -s -XPUT "localhost:9200/_snapshot/snaprepo/snapshot_${DATE}?wait_for_completion=true" -o /tmp/es_snapshot_${DATE}.log +# for i in $(curl -s -XGET "localhost:9200/_snapshot/snaprepo/_all?pretty=true" | grep '^ *"snapshot" : "snapshot_.*",$' | cut -d_ -f2 | sed 's/",$//' | head -n-10); do +# curl -s -XDELETE "localhost:9200/_snapshot/snaprepo/snapshot_${i}" +# done ## RabbitMQ : export config #rabbitmqadmin export /home/backup/rabbitmq.config >> /var/log/evobackup.log