Skip to content

Snapshots

Repositories

Create

PUT /_snapshot/my_backup
{
    "type": "fs",
    "settings": {
      "location": "/usr/share/elasticsearch/snapshots/backup"
    }

}

List

GET /_cat/repositories?v
GET /_snapshot/_all

Delete

DELETE /_snapshot/{repository}

Snapshots

  • Elasticsearch config

Change parameter in elastic search config file for all nodes

The path.repo needs to be a shared folder beetween the cluster

path.repo: ["/usr/share/elasticsearch/snapshots"]

Create

PUT /_snapshot/{repository}/{snapshot}?wait_for_completion=true

List all Snapshots from a repo

GET /_cat/snapshots/{repository}?v&s=id

Delete

DELETE /_snapshot/{repository}/{snapshot}

Restore

Restore - Official Doc

Restore From one Snapshot

POST /_snapshot/{repository}/{snapshot}/_restore