Elasticsearch: Snapshot Backups on a Shared NFS
Disasters can happen. We experienced data loss on our Elasticsearch cluster a few weeks ago after a failed upgrade. That's why data redundancy isn't enough: even when you data is replicated on multiple nodes, your data isn't safe!
Backuping your elasticsearch cluster is another layer of security in case things go wrong:
- Failed Upgrade: in our case, that's what happened. The data was upgraded but elasticsearch was unable to read it. Several nodes had corrupted data,
- Intrusions: what if a hacker gains access to your database,
- Multiple node failures: data is usually replicated on
1+
nodes, but what if several nodes fail simultaneously? It's highly improbable, that's true.
This tutorial is going to explain how we use a shared Network File System connected to all our Elasticsearch nodes to save incremental snapshots of the database every night. Let's see how we can leverage NFS to store Elasticsearch snapshots.