how to rename an index in a cluster?

前端 未结 8 1855
情话喂你
情话喂你 2020-12-07 09:48

I need to rename several indexes in a cluster (their name must be changed, I cannot use aliases).

I saw that there are no supported ways to do that,

8条回答
  •  一生所求
    2020-12-07 09:59

    For renaming your index you can use Elasticsearch Snapshot module.

    First you have to take snapshot of your index.while restoring it you can rename your index.

        POST /_snapshot/my_backup/snapshot_1/_restore
        {
         "indices": "jal",
         "ignore_unavailable": "true",
         "include_global_state": false,
         "rename_pattern": "jal",
         "rename_replacement": "jal1"
         }
    

    rename_replacement :-New indexname in which you want backup your data.

提交回复
热议问题