2017-09-14 65 views
1

我的本地Linux機器上安裝了elasticsearch 2.3。 我有Amazon S3存儲:我知道區域,bucketname,accesskey和secretkey。將elasticsearch快照存儲在amazon s3存儲庫中。它是如何工作的

我想在S3存儲中創建elasticsearch索引的快照。有關於它的文檔here,但它不能解釋我什麼(我是全新的)。

因此,舉例來說,我試圖執行此命令:

curl -XPUT 'localhost:9200/_snapshot/my_s3_repository?pretty' -H 'Content-Type: application/json' -d '{"type": "s3", 
"settings": {"bucket": "ilyabackuptest1", "region": "us-east-1" }}' 

而且我得到迴應:

{ 
    "error" : { 
    "root_cause" : [ { 
     "type" : "repository_exception", 
     "reason" : "[my_s3_repository] failed to create repository" 
    } ], 
    "type" : "repository_exception", 
    "reason" : "[my_s3_repository] failed to create repository", 
    "caused_by" : { 
     "type" : "illegal_argument_exception", 
     "reason" : "Unknown [repository] type [s3]" 
    } 
    }, 
    "status" : 500 
} 

那麼它是怎樣工作的?

更新: 安裝repository-s3後,我使用相同的命令,並得到它。它應該如何工作?

{ 
    "error" : { 
    "root_cause" : [ { 
     "type" : "process_cluster_event_timeout_exception", 
     "reason" : "failed to process cluster event (put_repository [my_s3_repository]) within 30s" 
    } ], 
    "type" : "process_cluster_event_timeout_exception", 
    "reason" : "failed to process cluster event (put_repository [my_s3_repository]) within 30s" 
    }, 
    "status" : 503 
} 

回答

1

你只需要安裝S3 repository plugin第一:

bin/plugin install repository-s3 

然後,你可以再次運行命令來創建S3回購。

+0

bin中沒有elasticsearch-plugin文件,所以這個命令不能執行。我怎樣才能安裝這個插件? –

+0

我已更新我的回答 – Val

+0

這對我也不適用。 bin/plugin:沒有這樣的文件或目錄 –