Comment of ElasticSearch dump.

No need to be activated by default...
This commit is contained in:
Benoît S. 2014-01-09 17:00:51 +01:00
parent 3ca2623d70
commit b48b2a58fa

View file

@ -97,19 +97,19 @@ mkdir -p -m 700 /home/backup
# Dump Redis # Dump Redis
# cp /var/lib/redis/dump.rdb /home/backup/ # cp /var/lib/redis/dump.rdb /home/backup/
# Dump ElasticSearch ## Dump ElasticSearch
# Disable ES translog flush ## Disable ES translog flush
curl -s -XPUT 'localhost:9200/_settings' -d '{"index.translog.disable_flush": true}' >/dev/null #curl -s -XPUT 'localhost:9200/_settings' -d '{"index.translog.disable_flush": true}' >/dev/null
# Flushes translog ## Flushes translog
curl -s 'localhost:9200/_flush' | grep -qe '"ok":true' #curl -s 'localhost:9200/_flush' | grep -qe '"ok":true'
# If it succeed, do an rsync of the datadir ## If it succeed, do an rsync of the datadir
if [ $? -eq 0 ]; then #if [ $? -eq 0 ]; then
rsync -a /var/lib/elasticsearch /home/backup/ # rsync -a /var/lib/elasticsearch /home/backup/
else #else
echo "Error when flushing ES translog indexes." # echo "Error when flushing ES translog indexes."
fi #fi
# In any case re-enable translog flush ## In any case re-enable translog flush
curl -s -XPUT 'localhost:9200/_settings' -d '{"index.translog.disable_flush": false}' > /dev/null #curl -s -XPUT 'localhost:9200/_settings' -d '{"index.translog.disable_flush": false}' > /dev/null
# Dump MBR / table partitions # Dump MBR / table partitions
# dd if=/dev/sda of=/home/backup/MBR bs=512 count=1 2>&1 | egrep -v "(records in|records out|512 bytes)" # dd if=/dev/sda of=/home/backup/MBR bs=512 count=1 2>&1 | egrep -v "(records in|records out|512 bytes)"