Introduction
Elasticsearch is very commonly used as a datastore for logs and other kind of data, so if you store valuable data you also need tools to back up and restore this data to support disaster recovery.
In the first versions of Elasticsearch the only viable solution was to dump your data with a complete scan and then reindex it. As Elasticsearch matured as a complete product, it supported native functionalities to back up the data and to restore it.
In this chapter, we'll see how to configure a shared storage via NFS for storing your backups, and how to execute and restore a backup.
In the last recipe of the chapter we will see how to use the reindex functionality to clone data between different Elasticsearch clusters. This approach is very useful if you are not able to use standard backup/restore functionalities due to moving from an old Elasticsearch version to the new one.