Created
February 13, 2014 14:03
-
-
Save benoitjpnet/8975529 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Yout need to register a repository. | |
# This action need to be only done one time. | |
# $ curl -XPUT 'http://localhost:9200/_snapshot/backup' -d '{ | |
# "type": "fs", | |
# "settings": { | |
# "location": "/home/backup/elasticsearch", | |
# "compress": true | |
# } | |
# }' | |
date=$(date +%Y%m%d%H%M) | |
# Take a snapshot | |
curl -XPUT "localhost:9200/_snapshot/backup/snapshot_${date}?wait_for_completion=true" | |
# To restore: List snapshots, close all indexes & restore one snapshot. | |
# curl -XGET "localhost:9200/_snapshot/backup/_all?pretty=true" | |
# curl -XPOST "localhost:9200/_all/_close" | |
# curl -XPOST "localhost:9200/_snapshot/backup/snapshot_DATE/_restore?wait_for_completion=true" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment