Skip to content

Instantly share code, notes, and snippets.

@EmmanuelDemey
Created March 10, 2026 15:04
Show Gist options
  • Select an option

  • Save EmmanuelDemey/102486df895e66b649c9d4f0339b8b7f to your computer and use it in GitHub Desktop.

Select an option

Save EmmanuelDemey/102486df895e66b649c9d4f0339b8b7f to your computer and use it in GitHub Desktop.

Lab 12: Snapshot And Restore

To finalize this practical exercise, here are some links that could be useful:

In this lab, we will set up a backup system for our index.

Add the following configuration to the elasticsearch.yml configuration file:

path:
  repo:
    - ./backups

Then restart your node.

You can then create a repository named my fs_backup of type fs. Take a snapshot of the person-v3 index in this repository.

Once this snapshot is taken, perform a restore to a new index that we will name similarly but suffixed with _backup.

  • You can also use the cluster stats API to view statistics about our cluster and try to understand their meaning.

As a bonus part, you can:

  • Repeat the same process but from the Kibana interface.
  • Create and execute a SLM (Snapshot Lifecycle Management) policy.

To execute an SLM without waiting, you can use the _execute endpoint:

POST _slm/policy/nightly-snapshots/_execute
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment