1. Repository and policy #
Automating.
Configuration #
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/statsGood to know: Snapshots are incremental at the segment level: only new data is copied. Thefsrepository requires a shared file system declared inpath.repoon 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).
My progress
Sign in to track your progress and take notes. Sign in
💬 Recent discussions about this course
- Elasticsearch : supprimer automatiquement les logs de plus de 30 jours✓ solved · 1 reply(ies)
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...