TomonoriSoejima / Tejun

notes related to working cases
5 stars 3 forks source link

snapshot #57

Open TomonoriSoejima opened 3 years ago

TomonoriSoejima commented 3 years ago
PUT _snapshot/my_backup
{
    "type": "fs",
    "settings": {
        "location": "/Users/surfer/elastic/labs/snapshot",
        "compress": true
    }
}

PUT snap1/_doc/1
{
  "memo" : "initial doc"
}

PUT /_snapshot/my_backup/snapshot_1?wait_for_completion=true
{
  "indices": "snap1",
  "include_global_state": true
}

PUT snap1/_doc/2
{
  "memo" : "after making the first snapshot"
}

DELETE snap1

POST /_snapshot/my_backup/snapshot_1/_restore
{
  "indices": "snap1",
  "include_global_state": true
}

GET snap1/_search