| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 | [[backup]]=== Back Up Your Data!Always back up your data before performing an upgrade.  This will allow you toroll back in the event of a problem.  The upgrades sometimes include upgradesto the Lucene libraries used by Elasticsearch to access the index files, andafter an index file has been updated to work with a new version of Lucene, itmay not be accessible to the versions of Lucene present in earlierElasticsearch releases.[WARNING].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 laterTo back up a running 1.0 or later system, it is simplest to use the snapshotfeature.  See the complete instructions for<<modules-snapshots,backup and restore with snapshots>>.==== Backing up 0.90.x and earlierTo back up a running 0.90.x system:===== Step 1: Disable index flushingThis will prevent indices from being flushed to disk while the backup is inprocess:[source,js]-----------------------------------PUT /_all/_settings{  "index": {    "translog.disable_flush": "true"  }}-----------------------------------// AUTOSENSE===== Step 2: Disable reallocationThis will prevent the cluster from moving data files from one node to anotherwhile the backup is in process:[source,js]-----------------------------------PUT /_cluster/settings{  "transient": {    "cluster.routing.allocation.enable": "none"  }}-----------------------------------// AUTOSENSE===== Step 3: Backup your dataAfter reallocation and index flushing are disabled, initiate a backup ofElasticsearch's data path using your favorite backup method (tar, storagearray snapshots, backup software).===== Step 4: Reenable allocation and flushingWhen the backup is complete and data no longer needs to be read from theElasticsearch data path, allocation and index flushing must be re-enabled:[source,js]-----------------------------------PUT /_all/_settings{  "index": {    "translog.disable_flush": "false"  }}PUT /_cluster/settings{  "transient": {    "cluster.routing.allocation.enable": "all"  }}-----------------------------------// AUTOSENSE
 |