44The `elasticsearch-node` command enables you to perform certain unsafe
55operations on a node that are only possible while it is shut down. This command
66allows you to adjust the <<modules-node,role>> of a node and may be able to
7- recover some data after a disaster.
7+ recover some data after a disaster or start a node even if it is incompatible
8+ with the data on disk.
89
910[float]
1011=== Synopsis
1112
1213[source,shell]
1314--------------------------------------------------
14- bin/elasticsearch-node repurpose|unsafe-bootstrap|detach-cluster
15+ bin/elasticsearch-node repurpose|unsafe-bootstrap|detach-cluster|override-version
1516 [--ordinal <Integer>] [-E <KeyValuePair>]
1617 [-h, --help] ([-s, --silent] | [-v, --verbose])
1718--------------------------------------------------
1819
1920[float]
2021=== Description
2122
22- This tool has three modes:
23+ This tool has four modes:
2324
2425* `elasticsearch-node repurpose` can be used to delete unwanted data from a
2526 node if it used to be a <<data-node,data node>> or a
@@ -36,6 +37,11 @@ This tool has three modes:
3637 cluster bootstrapping was not possible, it also enables you to move nodes
3738 into a brand-new cluster.
3839
40+ * `elasticsearch-node override-version` enables you to start up a node
41+ even if the data in the data path was written by an incompatible version of
42+ {es}. This may sometimes allow you to downgrade to an earlier version of
43+ {es}.
44+
3945[[node-tool-repurpose]]
4046[float]
4147==== Changing the role of a node
@@ -109,6 +115,25 @@ way forward that does not risk data loss, but it may be possible to use the
109115`elasticsearch-node` tool to construct a new cluster that contains some of the
110116data from the failed cluster.
111117
118+ [[node-tool-override-version]]
119+ [float]
120+ ==== Bypassing version checks
121+
122+ The data that {es} writes to disk is designed to be read by the current version
123+ and a limited set of future versions. It cannot generally be read by older
124+ versions, nor by versions that are more than one major version newer. The data
125+ stored on disk includes the version of the node that wrote it, and {es} checks
126+ that it is compatible with this version when starting up.
127+
128+ In rare circumstances it may be desirable to bypass this check and start up an
129+ {es} node using data that was written by an incompatible version. This may not
130+ work if the format of the stored data has changed, and it is a risky process
131+ because it is possible for the format to change in ways that {es} may
132+ misinterpret, silently leading to data loss.
133+
134+ To bypass this check, you can use the `elasticsearch-node override-version`
135+ tool to overwrite the version number stored in the data path with the current
136+ version, causing {es} to believe that it is compatible with the on-disk data.
112137
113138[[node-tool-unsafe-bootstrap]]
114139[float]
@@ -262,6 +287,9 @@ one-node cluster.
262287`detach-cluster`:: Specifies to unsafely detach this node from its cluster so
263288it can join a different cluster.
264289
290+ `override-version`:: Overwrites the version number stored in the data path so
291+ that a node can start despite being incompatible with the on-disk data.
292+
265293`--ordinal <Integer>`:: If there is <<max-local-storage-nodes,more than one
266294node sharing a data path>> then this specifies which node to target. Defaults
267295to `0`, meaning to use the first node in the data path.
@@ -423,3 +451,32 @@ Do you want to proceed?
423451Confirm [y/N] y
424452Node was successfully detached from the cluster
425453----
454+
455+ [float]
456+ ==== Bypassing version checks
457+
458+ Run the `elasticsearch-node override-version` command to overwrite the version
459+ stored in the data path so that a node can start despite being incompatible
460+ with the data stored in the data path:
461+
462+ [source, txt]
463+ ----
464+ node$ ./bin/elasticsearch-node override-version
465+
466+ WARNING: Elasticsearch MUST be stopped before running this tool.
467+
468+ This data path was last written by Elasticsearch version [x.x.x] and may no
469+ longer be compatible with Elasticsearch version [y.y.y]. This tool will bypass
470+ this compatibility check, allowing a version [y.y.y] node to start on this data
471+ path, but a version [y.y.y] node may not be able to read this data or may read
472+ it incorrectly leading to data loss.
473+
474+ You should not use this tool. Instead, continue to use a version [x.x.x] node
475+ on this data path. If necessary, you can use reindex-from-remote to copy the
476+ data from here into an older cluster.
477+
478+ Do you want to proceed?
479+
480+ Confirm [y/N] y
481+ Successfully overwrote this node's metadata to bypass its version compatibility checks.
482+ ----
0 commit comments