Elasticsearch Restore



Elasticsearch Restore

Opster Team

July 2020, Version: 1.7-7.9


Before you begin reading the explanation below, try running the free Elasticsearch Health Check-Up get actionable recommendations that can improve Elasticsearch performance and prevent serious incidents. Just 2 minutes to complete and you can check threadpools, memory, snapshots and many more.

Restore in Elasticsearch

What it is

In Elasticsearch, restore refers to a snapshot restore mechanism. A snapshot restore can be carried out once you have already set up the snapshot repository and have taken the snapshot. You can restore the entire cluster from the snapshot or restore an individual index or selected indices.

Examples

To restore the whole snapshot :

POST /_snapshot/my_backup/snapshot-01-11-2019/_restore

To restore an individual index :

POST /_snapshot/my_backup/snapshot-01-11-2019/_restore
{
  "indices": "my_index"
}
Notes
  • The snapshot restore capability must be enabled in elasticsearch.yml in case you are using security tools like Searchguard. Otherwise, it will throw a security exception.
Common Problems:
  • If an index or indices already exist with the same names as those you are going to restore, they need to either be closed or deleted before you can restore from a snapshot. Otherwise, the restore operation will fail due to an error that the index already exists.

Related log errors to this ES concept


Failed to update restore state
Store cannot be marked as corrupted
Cant read metadata from store; will not reuse local files during restore
Failed to restore snapshot
Failed to delete file during snapshot cleanup
Cant calculate hash from blog for file
Failed to list directory some of files might not be deleted
Failed to update snapshot status for
Failed to update snapshot status to
Restore is done
Failed to sync restore state after master switch



Improve ES Configuration

Try The Tool