I'm running Elasticsearch on aws ec2, self-hosting, and snapshot to s3. Snapshot works fine except that it always copy ALL indices. Here're commands I used:
(1) curl -XPUT localhost:9200/_snapshot/mybackup -H 'Content-Type: application/json' -d
'{"indices":"index1,index2","type":"s3","settings":{"bucket":"mybucket","base_path":"path1/mysnapshot","region":"us-east-1"}}'
(2) curl -XPUT localhost:9200/_snapshot/mybackup/mysnapshot
I also tried {"indices":["index1","index2"], ...}, that didn't help -- still ALL indices get copied to s3.
Thanks for the response. Finally got it to work with this sequence:
(1) curl -XPUT localhost:9200/_snapshot/mybackup -H 'Content-Type: application/json' -d
'{"indices":"index1,index2","type":"s3","settings":{"bucket":"mybucket","base_path":"path1/mysnapshot","region":"us-east-1"}}'
(2) curl -XPUT localhost:9200/_snapshot/mybackup/snapshot1 -H 'Content-Type: application/json' -d
'{"indices":"index1,index2","type":"s3","settings":{"bucket":"mybucket","base_path":"path1/mysnapshot","region":"us-east-1"}}'
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.