WARNING: Version 2.1 of Elasticsearch has passed its EOL date.
This documentation is no longer being maintained and may be removed. If you are running this version, we strongly advise you to upgrade. For the latest information, see the current release documentation.
Back Up Your Data!
editBack Up Your Data!
editAlways back up your data before performing an upgrade. This will allow you to roll back in the event of a problem. The upgrades sometimes include upgrades to the Lucene libraries used by Elasticsearch to access the index files, and after an index file has been updated to work with a new version of Lucene, it may not be accessible to the versions of Lucene present in earlier Elasticsearch releases.
Always back up your data before upgrading
You cannot roll back to an earlier version unless you have a backup of your data.
Backing up 1.0 and later
editTo back up a running 1.0 or later system, it is simplest to use the snapshot feature. See the complete instructions for backup and restore with snapshots.
Backing up 0.90.x and earlier
editTo back up a running 0.90.x system:
Step 1: Disable index flushing
editThis will prevent indices from being flushed to disk while the backup is in process:
PUT /_all/_settings { "index": { "translog.disable_flush": "true" } }
Step 2: Disable reallocation
editThis will prevent the cluster from moving data files from one node to another while the backup is in process:
PUT /_cluster/settings { "transient": { "cluster.routing.allocation.enable": "none" } }
Step 3: Backup your data
editAfter reallocation and index flushing are disabled, initiate a backup of Elasticsearch’s data path using your favorite backup method (tar, storage array snapshots, backup software).
Step 4: Reenable allocation and flushing
editWhen the backup is complete and data no longer needs to be read from the Elasticsearch data path, allocation and index flushing must be re-enabled:
PUT /_all/_settings { "index": { "translog.disable_flush": "false" } } PUT /_cluster/settings { "transient": { "cluster.routing.allocation.enable": "all" } }