[英]Elasticsearch snapshot
如果Elasticsearch快照包含多個索引(例如:Wikipedia,ehow,howStaffWorks),我們可以僅將這些索引之一加載到Elasticsearch服務器中,還是在加載快照時必須加載所有索引?
elasticsearch網站上的文檔顯示了如何從快照恢復特定索引:
curl -XPOST "localhost:9200/_snapshot/my_backup/snapshot_1/_restore" -d '{
"indices": "index_1,index_2",
"ignore_unavailable": "true",
"include_global_state": false,
"rename_pattern": "index_(.+)",
"rename_replacement": "restored_index_$1"
}'
請參閱上面的indices
。
是的你可以。 無需加載所有索引。
curl -XPOST "localhost:9200/_snapshot/my_backup/snapshot_1/_restore" -d '{
"indices": "index_1",
"ignore_unavailable": "true",
"include_global_state": false,
"rename_pattern": "index_(.+)",
"rename_replacement": "restored_index_$1"
}'
為了加載所有索引,您可以使用以下代碼(sense插件)
PUT /_snapshot/my_backup/snapshot_1?wait_for_completion=true
是的,我們可以加載。
$ curl -XPUT 'http://localhost:9200/twitter/' -d '
"index" : {
"number_of_shards" : 3,
"number_of_replicas" : 2
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.