RousselTMLEARNING

Article · Elasticsearch: from discovery to expertise

Snapshot Lifecycle Management

1. Repository and policy #

Automating.

Configuration #

Snapshots and restore
PUT _snapshot/backups
{ "type": "s3", "settings": { "bucket": "es-backups-prod", "base_path": "cluster-eu" } }

PUT _slm/policy/nightly
{
  "schedule": "0 30 1 * * ?",
  "name": "<nightly-{now/d}>",
  "repository": "backups",
  "config": { "indices": [ "*" ], "include_global_state": true },
  "retention": { "expire_after": "30d", "min_count": 5, "max_count": 50 }
}

POST _slm/policy/nightly/_execute          # tester tout de suite
GET _slm/stats
Good to know: Snapshots are incremental at the segment level: only new data is copied. The fs repository requires a shared file system declared in path.repo on all nodes.

2. Restoring #

The only test that counts.

Restore #

GET _snapshot/backups/_all?verbose=false

POST _snapshot/backups/nightly-2026.10.20/_restore
{ "indices": "logs-nginx-*", "rename_pattern": "(.+)", "rename_replacement": "restored-$1",
  "include_global_state": false }
Common mistake: A backup that has never been restored is not a backup. Schedule a regular restore test on a separate cluster, and measure how long it takes: that is your real RTO.
Good practice: Keep snapshots in a different region or cloud account from the cluster, with deletion protection (storage object lock).

📄 Snapshot Lifecycle Management: automated backups, restore and disaster recovery →

My progress

  • ⏱ Estimated time : ≈ 4 min

Sign in to track your progress and take notes. Sign in

⭐ Rate this lesson

5.0 initial rating from the teaching team

Sign in to rate this lesson →

💬 Recent discussions about this course

Ask a question about this lesson →See all discussions about this course

Course Glossary

RBAC (Role-Based Access Control)

An access control method where permissions are assigned to specific roles (e.g., admin, reader) rather than directly to individual users.

Authentication

The process of verifying the identity of a user or system (e.g., login/password, tokens, biometrics).

Authorization

The process that occurs after authentication to determine if the entity has the necessary rights and privileges to access a resource.

API Key

A unique alphanumeric code used to identify, authenticate, and authorize access to an Application Programming Interface (API).

Architecture

The overall structural design of an IT system, defining its various components, their relationships, and the principles guiding its evolution.

Repository

A centralized storage location. This can refer to a source code repository (e.g., Git) or an artifact and binary repository (e.g., Harbor, Nexus, Arti...

Elasticsearch

A distributed, RESTful search and analytics engine capable of addressing a growing number of use cases, built on Apache Lucene.

Recommended Articles

Index Lifecycle Management (ILM): data tiers, rollover and retention

Automate the index lifecycle with ILM: hot, warm, cold and frozen data tiers, rollover by size an...

Cross-cluster search and cross-cluster replication: multi-cluster Elasticsearch architectures

Design multi-cluster Elasticsearch architectures: remote clusters, cross-cluster search, cross-cl...

OpenSearch in production: ISM, backups, security and best practices

Automate the lifecycle with ISM, back up with snapshots, manage roles and size an OpenSearch clus...

Elasticsearch best practices: mappings, shards, lifecycle and operations

Elasticsearch best practices: shard sizing, explicit mappings, templates, ILM, JVM memory, securi...

Advanced Elasticsearch security: TLS, certificates, API keys, FLS, DLS and audit

Secure Elasticsearch in depth: transport and HTTP TLS, certificate management with elasticsearch-...

Transforms and enrich: summarising and enriching data in Elasticsearch

Build entity-centric indices with pivot and latest transforms, and enrich documents at ingest tim...

Elasticsearch distributed architecture: node roles, shards, replicas and allocation

Understand how Elasticsearch works as a distributed system: node roles, master nodes and quorum, ...

Elasticsearch mappings and text analysis: field types, analyzers and dynamic mapping

Master Elasticsearch mappings: field types (text, keyword, numeric, date, ip, nested), multi-fiel...

Elasticsearch ingestion: Bulk API, ingest pipelines, enrich and reindex

Ingest and transform data in Elasticsearch: Bulk API, ingest pipelines and processors (grok, diss...

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!