Correction - the body of the request was messed up because I was trying to reorder its content. The correct PUT body is and error are:
$ curl -XPUT 'http://localhost:9200/_snapshot/amos0' -d '{ "s3dev0": { "settings": { "base_path": "elasticsearch/dev/snapshots0", "bucket": "streamco-backup", "region": "ap-southeast-1" }, "type": "s3" } }' {"error":"ActionRequestValidationException[Validation Failed: 1: type is missing;]","status":400} On Tuesday, 27 January 2015 16:20:30 UTC+11, Amos S wrote: > > Hello, > > For some investigation work, I'm trying to restore specific indices from > our production ES cluster to a single one-off node. > > We run a cluster of ES 1.4.2 on EC2, the data is stored locally on each > EC2 instance with snapshots stored on an S3 bucket. > > I've setup a one-off EC2 instance and am trying to restore a single index > from snapshot into that new instance. > > The instance has its own cluster name and node name, and I've setup a > read-only S3 role for it so it doesn't accidentally overwrite our backup. > > Trying to follow instructions I found in various locations on the web, I > think the next step for me is to configure the S3 snapshot bucket as a > repository on the new instance, is that correct? > > So I did the following to find the S3 snapshot repository configuration in > the production environment: > > $ curl -XGET http://production-cluster:9200/_snapshot/ | python > -mjson.tool > { > "s3prod0": { > "settings": { > "base_path": "elasticsearch/prod/snapshots0", > "bucket": "prod-es-backup", > "region": "ap-southeast-1" > }, > "type": "s3" > } > } > > I then tried to feed this into my new node's configuration: > > $ curl -XPUT 'http://localhost:9200/_snapshot/amos0' -d ' > { > "type": "s3", > "s3prod0": { > "settings": { > "base_path": "elasticsearch/prod/snapshots0", > "bucket": "prod-es-backup", > "region": "ap-southeast-1" > } > } > } > ' > {"error":"RepositoryException[[amos0] failed to create repository]; > nested: CreationException[Guice creation errors:\n\n1) Error injecting > constructor, org.elasticsearch.repositories.RepositoryException: [amos0] No > bucket defined for s3 gateway\n at > org.elasticsearch.repositories.s3.S3Repository.<init>(Unknown Source)\n > while locating org.elasticsearch.repositories.s3.S3Repository\n while > locating org.elasticsearch.repositories.Repository\n\n1 error]; nested: > RepositoryException[[amos0] No bucket defined for s3 gateway]; > ","status":500} > > What am I missing here? > > Thanks. > > --Amos > > -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/03ff2966-7f03-4add-9260-c647deba12b6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
