Simplify and store deletion logs in /tmp

This commit is contained in:
Alexis Ben Miloud--Josselin 2018-04-05 16:02:07 +02:00
parent 6548c5a1d8
commit 7a9e4c6168

View file

@ -122,12 +122,9 @@ mkdir -p -m 700 /home/backup
# cp /var/lib/redis/dump.rdb /home/backup/
## ElasticSearch : example with rsync (warning: don't forget to use NFS if you have a cluster)
# DATE=$(date +%F)
# 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}"
# rm /tmp/es_snapshot_${i}.log
# done
## Here we have one snapshot a day.
# curl -s -XDELETE "localhost:9200/_snapshot/snaprepo/snapshot.daily" -o /tmp/es_delete_snapshot.daily.log
# curl -s -XPUT "localhost:9200/_snapshot/snaprepo/snapshot.daily?wait_for_completion=true" -o /tmp/es_snapshot.daily.log
## RabbitMQ : export config
#rabbitmqadmin export /home/backup/rabbitmq.config >> /var/log/evobackup.log