Elasticsearch使用快照的办法将数据从Windows转移到CentOS7

其他杂项170字数 556阅读1分51秒阅读模式

Windwos上操作:

###第一步,创建储存库
PUT _snapshot/my_backup 
{
    "type": "fs", 
    "settings": {
        "location": "/backup" 
    }
}

###第二步,创建索引快照
PUT /_snapshot/my_backup/snapshot_2?wait_for_completion=true
{
  "indices": "xx0,xx1,xx2",
  "ignore_unavailable": true,
  "include_global_state": false,
  "metadata": {
    "taken_by": "kimchy",
    "taken_because": "backup before upgrading"
  }
}

CentOS7上操作:

###第一步,创建储存库
PUT _snapshot/my_backup 
{
    "type": "fs", 
    "settings": {
        "location": "/data/backup" 
    }
}

###第二步,还原索引快照 
POST /_snapshot/my_backup/snapshot_1/_restore
{
  "indices": "xxx0,xx1,xx2",
  "ignore_unavailable": true,
  "include_global_state": false, } 

 最后更新:2021-10-24
  • 本文由 asdfasd 发表于 2021-10-2223:03:23
  • 转载请务必保留本文链接:http://wp.fangfa.me/other-note/elasticsearch%e4%bd%bf%e7%94%a8%e5%bf%ab%e7%85%a7%e7%9a%84%e5%8a%9e%e6%b3%95%e5%b0%86%e6%95%b0%e6%8d%ae%e4%bb%8ewindows%e8%bd%ac%e7%a7%bb%e5%88%b0centos7.html