Elasticsearch Register Snapshot Repository

Elasticsearch Register Snapshot Repository

Opster Team

March 2021

In addition to reading this guide, we recommend you run the Elasticsearch Health Check-Up. It will detect issues and improve your Elasticsearch performance by analyzing your shard sizes, threadpools, memory, snapshots, disk watermarks and more.

The Elasticsearch Check-Up is free and requires no installation.

Run the Elasticsearch check-up to receive recommendations like this:

checklist Run Check-Up

The following configuration error was detected on node 123...



This error can have a severe impact on your system. It's important to understand that it was caused by...



In order to resolve this issue and prevent it from occurring again, we recommend that you begin by changing the configuration to...


X-PUT curl -H "Content-Type: application/json" [customized recommendation]


To backup Elasticsearch indices you need to use the Elasticsearch snapshot mechanism. It is not sufficient to have backups of the individual data directories of the data nodes, because if you were to restore these directories there is no guarantee that the data recovered would form a consistent copy of the cluster. At best, data could be lost, and at worst it could be impossible to restore the cluster entirely.

To create and restore snapshots, you need to register a snapshot repository with every Elasticsearch node in the cluster.

How to resolve it

Specific installation instructions will depend on the plugin / storage system used. The basic steps required are:

  • Create a storage container with your chosen provider (like fs, cloud storage, etc)
  • Create access credentials to access the storage container using your provider
  • Install the required plugin on each Elasticsearch node
  • Add the access credentials to each Elasticsearch node
  • Create the repository in the cluster using the required Elasticsearch command.

Upon creation, the repository is verified automatically on all nodes.  If this verification fails, then the repository creation command will raise an error.

If you want to manually verify a repository you can also run:

POST /_snapshot/my_repository/_verify

Detailed instructions for creating a repository on a shared mounted file system can be found here.

You can also find information about using plugins for alternative storage methods here.

Run the Check-Up to get a customized report like this:

Analyze your cluster