The Elasticsearch cluster is RED after one data node died, and searches on the `logs-2026.11` index return errors.
IntermediateTroubleshootingData loss and corruption
Answer
Likely causes → Some primary shards have no copy left. The index had number_of_replicas: 0, or the replica lived on the same node, so losing the node lost the shard.
Diagnose →
curl -s localhost:9200/_cluster/health?pretty
curl -s 'localhost:9200/_cat/shards?v&h=index,shard,prirep,state,unassigned.reason' | grep UNASSIGNED
curl -s localhost:9200/_cluster/allocation/explain?pretty
Fix → Bring the node back if its disk survived; the shards recover. If the data is lost, restore the affected indices from a snapshot (POST _snapshot/repo/snap/_restore). As a last resort, allocate_empty_primary makes the cluster green again with that shard's data gone.
Prevent → At least one replica for any index you care about, shard allocation awareness across zones, and snapshot lifecycle management (SLM) to S3.
More on Data loss and corruption
An engineer ran `DELETE FROM orders;` on the production Postgres (forgot the `WHERE`) at 14:32.BeginnerA cleanup script deleted every object under `s3://acme-invoices/2025/`. Versioning is enabled.BeginnerYou need to restore last night's MySQL backup and discover the dump files for the past three months are 20 KB each.IntermediateUsers update their profile, the page reloads, and they see the old values; a minute later the new values show up.IntermediateA network partition between data centres lasted 4 minutes; afterwards you find both sites accepted writes as primary, and the same order IDs exist with different contents.AdvancedA deploy ran a migration that dropped the `phone` column; old pods still running during the rolling update threw 500s, and a background job wrote nulls into a new table.Intermediate