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

  • A+
所属分类:其他杂项
本文信息本文由方法SEO顾问发表于2021-10-2223:03:23,共 556 字,转载请注明:Elasticsearch使用快照的办法将数据从Windows转移到CentOS7_【方法SEO顾问】

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, } 

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: